Skip to content

Commit

Permalink
GitHub actions, README and license update & gson update (#60)
Browse files Browse the repository at this point in the history
* README.md update / GitHub action

* License upgrade

* README.md - note about Ubuntu localhost

* lwm2m/pom.xml - upgrade gson to latest (2.10.1)

This resolves also the raised Dependabot issue.
- The package com.google.code.gson:gson before 2.8.9 is vulnerable to Deserialization
  of Untrusted Data via the writeReplace() method in internal classes,
  which may lead to denial of service attacks.

* pom.xml - update Mycilla & add exclusions for CI

* Remove CircleCI

Remove the whole .circleCI, we'll use GitHub actions instead.
  • Loading branch information
JanneKiiskila authored Sep 14, 2023
1 parent ad9f715 commit d301868
Show file tree
Hide file tree
Showing 251 changed files with 1,081 additions and 327 deletions.
70 changes: 0 additions & 70 deletions .circleci/config.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/PR-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: PR-checker
run-name: ${{ github.actor }} Pull Request - make all

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: java-coap-'${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

on: [push]
jobs:
mvn-clean-install-ci:
runs-on: ubuntu-22.04
env:
PDM_BINARY_ARTIFACTS_DIR: pdm-binary-artifacts
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: "8"
distribution: "temurin"
- name: Cloning pdm-binary-artifacts
uses: actions/checkout@v3
with:
repository: PelionIoT/pdm-binary-artifacts
token: ${{ secrets.ACCESS_TOKEN }}
path: ${{ env.PDM_BINARY_ARTIFACTS_DIR }}
- name: Initializing pdm-binary-artifacts
run: |
cd $PDM_BINARY_ARTIFACTS_DIR
bash init.sh --force
- name: Check hostname
run: |
HOST=$(hostname)
echo "Hostname is $HOST"
if [ "$HOST" != "localhost" ]; then
echo "Changing hostname to localhost, tests will fail otherwise."
sudo hostname localhost
fi
- run: mvn clean install -P ci
- name: Publish Test Report
if: success() || failure()
uses: scacap/action-surefire-report@v1
with:
check_name: mvn clean install -P ci test report

pysh-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Get scripts internal...
run: |
git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github.com/".insteadOf "[email protected]:"
git clone [email protected]:PelionIoT/scripts-internal.git
- name: Run no-more-lines w pysh-check
run: |
sudo apt install pycodestyle pydocstyle black
echo "." >scripts-internal/.nopyshcheck
scripts-internal/ci/more-lines-checker.sh ${{ github.event.repository.default_branch }} ${{ github.ref_name }} "scripts-internal/pysh-check/pysh-check.sh --workdir ."
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ mbed CoAP
[![codecov](https://codecov.io/gh/PelionIoT/java-coap/branch/master/graph/badge.svg)](https://codecov.io/gh/PelionIoT/java-coap)
[![Known Vulnerabilities](https://snyk.io/test/github/PelionIoT/java-coap/badge.svg)](https://snyk.io/test/github/PelionIoT/java-coap)

Maintenance
-----------
This repository is under minimal maintenance.
There is a more actively developed version available at [https://github.com/open-coap/java-coap](https://github.com/open-coap/java-coap) - you might want to check that repository out.
There are API differences, though.

Introduction
------------

This library makes it easy to integrate a Java SE enabled device with coap based services like [mbed Cloud](https://www.mbed.com/en/platform/cloud).
It can also help to emulate an embedded device for prototyping and testing purposes.
This library makes it easy to integrate a Java SE enabled device with CoAP based services like [Izuma Networks Device Management](https://www.izumanetworks.com).
It can also help to emulate an embedded device for prototyping and testing purposes.

The following features are supported by the library:

Expand Down Expand Up @@ -139,6 +145,24 @@ This [example client](example-client) demonstrates how to build coap client.
Development
-----------

### Issues with localhost on Ubuntu

Ubuntu has IP addresses for localhost, `127.0.0.1` and `127.0.1.1`.
This causes problems with CoAP packets, the request and response address does not match.
Change both addresses to `127.0.0.1` or comment or remove the latter from `/etc/hosts` and change hostname to localhost.

To check hostname:

```
hostname
```

To change hostname to localhost:

```
sudo hostname localhost
```

### Build

mvn clean install
Expand All @@ -151,7 +175,6 @@ Development

mvn com.mycila:license-maven-plugin:format


Contributions
-------------

Expand Down
3 changes: 3 additions & 0 deletions coap-core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<!--
Copyright (C) 2011-2018 ARM Limited. All rights reserved.
Copyright (c) 2023 Izuma Networks. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
5 changes: 4 additions & 1 deletion coap-core/src/main/java/com/mbed/coap/CoapConstants.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
5 changes: 4 additions & 1 deletion coap-core/src/main/java/com/mbed/coap/client/CoapClient.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
/*
* Copyright (C) 2011-2018 ARM Limited. All rights reserved.
* Copyright (c) 2023 Izuma Networks. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Loading

0 comments on commit d301868

Please sign in to comment.