Skip to content

Commit

Permalink
Update READMEs and scripts to 3.11.0.
Browse files Browse the repository at this point in the history
Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
  • Loading branch information
boaks committed Mar 14, 2024
1 parent 60d88a4 commit 4cef09e
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 54 deletions.
32 changes: 12 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,20 @@ Executable JARs of the examples with all dependencies can be found in the `demo-
The build-process in branch `main` is tested for jdk 7, jdk 8, jdk 11 and jdk 17.
For jdk 7 the revapi maven-plugin is disabled, it requires at least java 8.

Note: the build **has been" tested long ago. In the meantime too much has changed. Please focus on using jdk 17 to build it.

To generate the javadocs, add "-DcreateJavadoc=true" to the command line and set the `JAVA_HOME`.

```sh
$ mvn clean install -DcreateJavadoc=true
```
## Build earlier release

## !!! Since 29. October 2021 !!!
**The hostname "non-existing.host" is now existing and all builds of version and tags before that date will fail the tests. Therefore use -DskipTests**

To (re-)build versions before that date the unit tests must therefore be skipped.

```sh
$ mvn clean install -DskipTests
```

Earlier versions (3.0.0-Mx, 2.6.5 and before) may also fail to build with newer JDKs, especially, if java 17 is used! That is cause by the unit test dependency to a deprecated version of "mockito". If such a (re-)build is required, the unit tests must be skipped (which is in the meantime anyway required caused by the "non-existing.host").

In combination with the "non-existing.host" now existing, the build with unit test only works for the current heads of the branches `2.6.x`, `2.7.x`, `2.8.x` and `main`!

## Build jdk7 compliant

In the meantime, JDK 7 is pretty deprecated! The next major version (4) will not longer support it! It hopefully comes this year (2024).

Californium 2.x and newer can be used with java 7 or newer. In order to use plugins,
which are only supported for newer jdks, the `--release` option is used (requires java 9 or newer).
which are only supported for newer jdks, the `--release` option is used (requires java 9 or newer to build it).

If you want to build it with a jdk 7, the toolchain plugin could be used, but requires
manually remove the `maven.compiler.release` property in the pom.xml. That requires
Expand Down Expand Up @@ -130,17 +120,17 @@ With that, it gets very time consuming to test all combinations. Therefore, if y

# Using Californium in Maven Projects

We are publishing Californium's artifacts for milestones and releases to [Maven Central](https://search.maven.org/search?q=g:org.eclipse.californium%20a:parent%20v:3.10.0).
We are publishing Californium's artifacts for milestones and releases to [Maven Central](https://search.maven.org/search?q=g:org.eclipse.californium%20a:parent%20v:3.11.0).
To use the latest released version as a library in your projects, add the following dependency
to your `pom.xml` (without the dots):
to your `pom.xml` (without the dots `...`):

```xml
<dependencies>
...
<dependency>
<groupId>org.eclipse.californium</groupId>
<artifactId>californium-core</artifactId>
<version>3.10.0</version>
<version>3.11.0</version>
</dependency>
...
</dependencies>
Expand All @@ -164,7 +154,7 @@ You will therefore need to add the Eclipse Repository to your `pom.xml` first:
...
</repositories>
```
You can then simply depend on `3.11.0-SNAPSHOT`.
You can then simply depend on `3.12.0-SNAPSHOT`.

# Eclipse

Expand All @@ -187,9 +177,11 @@ In IntelliJ, choose *[File.. &raquo; Open]* then select the location of the clon

A test server is running at <a href="coap://californium.eclipseprojects.io:5683/">coap://californium.eclipseprojects.io:5683/</a>

It is an instance of the [cf-plugtest-server](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-plugtest-server/3.10.0/cf-plugtest-server-3.10.0.jar) from the demo-apps.
It is an instance of the [cf-plugtest-server](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-plugtest-server/3.11.0/cf-plugtest-server-3.11.0.jar) from the demo-apps.
The root resource responds with its current version.

For a preview to the [Return Routability Check for DTLS 1.2 and DTLS 1.3](https://tlswg.org/dtls-rrc/draft-ietf-tls-dtls-rrc.html) experimental support, please read [feature/rrc - branch](https://github.com/eclipse-californium/californium/tree/feature/rrc).

**Please note:**
The server is intended to test the interoperability of CoAP and DTLS 1.2. Data sent to that server is typically "Hello world". The data is public visible to all other users and is removed on any restart. Please don't send data, which requires "data privacy", the sandbox server is not intended for such usage.

Expand Down
6 changes: 3 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ For more details, please look at [https://www.eclipse.org/security](https://www.

| Version | Supported |
| ------- | ------------------ |
| 3.11.0-SNAPSHOT (main) | :heavy_check_mark: |
| 3.10.0 | :heavy_check_mark: |
| 3.9.1, 3.9.0, 3.8.0,<br/> 3.7.0, 3.6.0, 3.5.0,<br/> 3.4.0, 3.3.1, 3.2.0,<br/> 3.1.0, 3.0.0 | :question: |
| 3.12.0-SNAPSHOT (main) | :heavy_check_mark: |
| 3.11.0 | :heavy_check_mark: |
| 3.10.0, 3.9.1, 3.9.0,<br/> 3.8.0, 3.7.0, 3.6.0,<br/> 3.5.0, 3.4.0, 3.3.1,<br/> 3.2.0, 3.1.0, 3.0.0 | :question: |
| 2.8.0 | :question: |
| 2.7.4, 2.6.6, 2.5.0,<br/> 2.4.1, 2.3.1, 2.2.3,<br/> 2.1.0, 2.0.0 | :question: |
| before 2.0.0 | :x: |
Expand Down
2 changes: 1 addition & 1 deletion cf-utils/cf-nat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In order to test NAT and LoadBalancer specific situations, this module contains

# Download

[Eclipse Release Repository](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-nat/3.10.0/cf-nat-3.10.0.jar)
[Eclipse Release Repository](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-nat/3.11.0/cf-nat-3.11.0.jar)

#Usage

Expand Down
2 changes: 1 addition & 1 deletion demo-apps/cf-android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ android {


dependencies {
def californiumVersion = '3.10.0'
def californiumVersion = '3.11.0'

implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'org.eclipse.californium:californium-core:' + californiumVersion
Expand Down
4 changes: 2 additions & 2 deletions demo-apps/cf-extplugtest-client/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ echo
# cat /proc/sys/vm/max_map_count
# prlimit

CF_JAR=cf-extplugtest-client-3.11.0.jar
CF_JAR=cf-extplugtest-client-3.12.0.jar
CF_JAR_FIND="cf-extplugtest-client-*.jar"
CF_EXEC="org.eclipse.californium.extplugtests.BenchmarkClient"
#CF_OPT="-XX:+UseG1GC -Xmx6g -Xverify:none"
CF_OPT="-XX:+UseZGC -Xmx10g"

export CALIFORNIUM_STATISTIC="3.11.0"
export CALIFORNIUM_STATISTIC="3.12.0"

if [ -z "$1" ] ; then
CF_HOST=localhost
Expand Down
4 changes: 2 additions & 2 deletions demo-apps/cf-extplugtest-client/hono-benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ echo
# cat /proc/sys/vm/max_map_count
# prlimit

CF_JAR=cf-extplugtest-client-3.11.0.jar
CF_JAR=cf-extplugtest-client-3.12.0.jar
CF_JAR_FIND='cf-extplugtest-client-*.jar'
CF_EXEC="org.eclipse.californium.extplugtests.BenchmarkClient"
CF_OPT="-XX:+UseG1GC -Xmx6g -Xverify:none"

export CALIFORNIUM_STATISTIC="3.10.0-hono"
export CALIFORNIUM_STATISTIC="3.12.0-hono"

# store psk credentials in "hono.psk"
# format:
Expand Down
14 changes: 7 additions & 7 deletions demo-apps/cf-extplugtest-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ java -jar cf-nat-<version>.jar :5784 <host>:15784 <host>:25784 <host>:35784
Start nodes in a container using port `5784`, and `<any>:5884` as own cluster-management-interface. Additionally provide the external port of the cluster-management-interface also with `5884`.
```
CMD ["java", "-XX:+UseContainerSupport", "-XX:MaxRAMPercentage=75", "-jar", "/opt/app/cf-extplugtest-server-3.10.0.jar", "--no-plugtest", "--no-tcp", "--diagnose", "--benchmark", "--k8s-dtls-cluster", ":5784;:5884;5884"]
CMD ["java", "-XX:+UseContainerSupport", "-XX:MaxRAMPercentage=75", "-jar", "/opt/app/cf-extplugtest-server-3.11.0.jar", "--no-plugtest", "--no-tcp", "--diagnose", "--benchmark", "--k8s-dtls-cluster", ":5784;:5884;5884"]
```
Example `CMD` statement for docker (":5884" for "<any>:5884", "5884" for just port 5884, see [Dockerfile](service/Dockerfile)).
Expand Down Expand Up @@ -602,7 +602,7 @@ write-cid:
ext-master-secret: true
newest-record: true
message-size-limit: 1367
server: Cf 3.10.0
server: Cf <version>
===============================================================
```
Expand All @@ -620,7 +620,7 @@ java -jar cf-client-<version>.jar --method GET coaps://<nat>:5784/mycontext
### Test the dtls-cid-cluster with Cf-NAT
To test, that the dtls-cid-cluster even works, if the client's address is changed, such a address change can be simulated using [Cf-NAT](https://github.com/eclipse/californium/tree/main/cf-utils/cf-nat) (download available in the [Eclipse Release Repository](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-nat/3.10.0/cf-nat-3.10.0.jar)).
To test, that the dtls-cid-cluster even works, if the client's address is changed, such a address change can be simulated using [Cf-NAT](https://github.com/eclipse/californium/tree/main/cf-utils/cf-nat) (download available in the [Eclipse Release Repository](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-nat/3.11.0/cf-nat-3.11.0.jar)).
```sh
java -jar cf-nat-<version>.jar :5784 <host>:30784
Expand All @@ -641,7 +641,7 @@ remove <host:port> - remove destination from load balancer
reverse (on|off) - enable/disable reverse address updates.
```
Start two [cf-browser-3.10.0](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-browser/3.10.0/cf-browser-3.10.0.jar) instances. Enter as destination `coaps://<nat-host>:5784/mycontext` and execute a `GET` in both clients. Do they show different `node-ids`? If not, restart one as long as you get two different `node-id`s. Also check, if the line with `read-cid` is missing. If so, the DTLS Connection ID support is not enabled. Check, if `DTLS_CONNECTION_ID_LENGTH` is set in "Californium3.properties" to a number. Even `0` will enable it. But a empty value disables the DTLS Connection ID support!
Start two [cf-browser-3.11.0](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-browser/3.11.0/cf-browser-3.11.0.jar) instances. Enter as destination `coaps://<nat-host>:5784/mycontext` and execute a `GET` in both clients. Do they show different `node-ids`? If not, restart one as long as you get two different `node-id`s. Also check, if the line with `read-cid` is missing. If so, the DTLS Connection ID support is not enabled. Check, if `DTLS_CONNECTION_ID_LENGTH` is set in "Californium3.properties" to a number. Even `0` will enable it. But a empty value disables the DTLS Connection ID support!
```
ip: ?.?.?.?
Expand All @@ -655,7 +655,7 @@ write-cid:
ext-master-secret: true
newest-record: true
message-size-limit: 1399
server: Cf 3.10.0
server: Cf <version>
```
Now, press `<enter>` on the console of the NAT.
Expand Down Expand Up @@ -687,7 +687,7 @@ write-cid:
ext-master-secret: true
newest-record: true
message-size-limit: 1399
server: Cf 3.10.0
server: Cf <version>
```
You may retry that, you should see the same ip-address/port (5-tuple), if you retry it within the NATs timeout (30s).
Expand All @@ -709,7 +709,7 @@ write-cid:
ext-master-secret: true
newest-record: true
message-size-limit: 1399
server: Cf 3.10.0
server: Cf <version>
```
You may even restart the NAT, the coaps communication will still work.
Expand Down
2 changes: 1 addition & 1 deletion demo-apps/cf-extplugtest-server/service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ FROM eclipse-temurin:17-jre-focal

RUN mkdir /opt/app
COPY ./service/build ./CaliforniumReceivetest3.properties /opt/app/
COPY ./target/cf-extplugtest-server-3.11.0-SNAPSHOT.jar /opt/app/cf-extplugtest-server.jar
COPY ./target/cf-extplugtest-server-3.12.0-SNAPSHOT.jar /opt/app/cf-extplugtest-server.jar

#EXPOSE 5683/udp
#EXPOSE 5683/tcp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ FROM eclipse-temurin:17-jre-focal

RUN mkdir /opt/app
COPY ./service/build ./CaliforniumReceivetest3.properties /opt/app/
COPY ./target/cf-extplugtest-server-3.11.0-SNAPSHOT.jar /opt/app/cf-extplugtest-server.jar
COPY ./target/cf-extplugtest-server-3.12.0-SNAPSHOT.jar /opt/app/cf-extplugtest-server.jar

#EXPOSE 5683/udp
#EXPOSE 5683/tcp
Expand Down
2 changes: 1 addition & 1 deletion demo-apps/cf-extplugtest-server/service/deploy_k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fi
: "${DOCKERFILE:=service/Dockerfile}"

CONTAINER=cf-extserver-jdk11-slim
VERSION=3.11.0
VERSION=3.12.0

if [ "$1" = "install" ] ; then
CONTAINER_VERSION="${CONTAINER}:${VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion demo-apps/cf-simplefile-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Please refer to the eclipse Californium project page for license, build, and ins

## Download

[Eclipse Release Repository](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-simplefile-server/3.10.0/cf-simplefile-server-3.10.0.jar)
[Eclipse Release Repository](https://repo.eclipse.org/content/repositories/californium-releases/org/eclipse/californium/cf-simplefile-server/3.11.0/cf-simplefile-server-3.11.0.jar)

## PREPARATION

Expand Down
Loading

0 comments on commit 4cef09e

Please sign in to comment.