Skip to content

Commit

Permalink
Upgrade source and target JDK to JDK17
Browse files Browse the repository at this point in the history
Most JDK11 builds are reaching EOL. We now target JDK17 and recommend that users run OpenJDK 17.
This means that eclair will no longer run on JDK11: users must upgrade!
  • Loading branch information
sstone committed Oct 7, 2024
1 parent 11b6a52 commit 5907fce
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: docker login
uses: docker/login-action@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/latest-bitcoind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
timeout-minutes: 90
steps:
- name: Checkout bitcoind master
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: bitcoin/bitcoin
path: bitcoin
Expand All @@ -34,14 +34,14 @@ jobs:
working-directory: ./bitcoin

- name: Checkout eclair master
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: eclair

- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: 'adopt'

- name: Configure OS settings
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: 'adopt'

- name: Cache Maven dependencies
Expand Down
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Requirements

- [OpenJDK 11](https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot).
- [OpenJDK 17](https://adoptium.net/temurin/releases/?version=17).
- [Maven](https://maven.apache.org/download.cgi) 3.6.0 or newer

## Build
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM adoptopenjdk/openjdk11:jdk-11.0.3_7-alpine as BUILD
FROM eclipse-temurin:17-alpine as BUILD

# Setup maven, we don't use https://hub.docker.com/_/maven/ as it declare .m2 as volume, we loose all mvn cache
# We can alternatively do as proposed by https://github.com/carlossg/docker-maven#packaging-a-local-repository-with-the-image
Expand Down Expand Up @@ -41,8 +41,8 @@ COPY . .
RUN mvn package -pl eclair-node -am -DskipTests -Dgit.commit.id=notag -Dgit.commit.id.abbrev=notag -o
# It might be good idea to run the tests here, so that the docker build fail if the code is bugged

# We currently use a debian image for runtime because of some jni-related issue with sqlite
FROM openjdk:11.0.4-jre-slim
# We currently use a ubuntu image for runtime because of some jni-related issue with sqlite
FROM eclipse-temurin:17-jre-noble
WORKDIR /app

# install jq for eclair-cli
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ rpcclienttimeout=30

Eclair is developed in [Scala](https://www.scala-lang.org/), a powerful functional language that runs on the JVM, and is packaged as a ZIP archive.

To run Eclair, you first need to install Java, we recommend that you use [OpenJDK 11](https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot). Other runtimes also work, but we don't recommend using them.
To run Eclair, you first need to install Java, we recommend that you use [OpenJDK 17](https://adoptium.net/temurin/releases/?version=17). Other runtimes also work, but we don't recommend using them.

Then download our latest [release](https://github.com/ACINQ/eclair/releases), unzip the archive and run the following command:

Expand Down
4 changes: 2 additions & 2 deletions contrib/arm64v8.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:11-jdk-jammy as BUILD
FROM eclipse-temurin:17-jdk-noble as BUILD

# Setup maven, we don't use https://hub.docker.com/_/maven/ as it declare .m2 as volume, we loose all mvn cache
# We can alternatively do as proposed by https://github.com/carlossg/docker-maven#packaging-a-local-repository-with-the-image
Expand Down Expand Up @@ -42,7 +42,7 @@ RUN mvn package -pl eclair-node -am -DskipTests -Dgit.commit.id=notag -Dgit.comm
# It might be good idea to run the tests here, so that the docker build fail if the code is bugged

# We currently use a debian image for runtime because of some jni-related issue with sqlite
FROM openjdk:11.0.4-jre-slim
FROM eclipse-temurin:17-jre-noble
WORKDIR /app

# install jq for eclair-cli
Expand Down
9 changes: 7 additions & 2 deletions docs/release-notes/eclair-vnext.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ To enable CoinGrinder at all fee rates and prevent the automatic consolidation o
consolidatefeerate=0
```

### Upgrade build and runtime platform to JDK 17

Eclair is now built with and targets JDK 17 and will no longer run on JDK11.


### Incoming obsolete channels will be rejected

Eclair will not allow remote peers to open new `static_remote_key` channels. These channels are obsolete, node operators should use `option_anchors` channels now.
Expand Down Expand Up @@ -68,7 +73,7 @@ $ sha256sum -c SHA256SUMS.stripped
Eclair builds are deterministic. To reproduce our builds, please use the following environment (*):

- Ubuntu 22.04
- AdoptOpenJDK 11.0.22
- AdoptOpenJDK 17.0.12
- Maven 3.9.2

Use the following command to generate the eclair-node package:
Expand All @@ -79,7 +84,7 @@ mvn clean install -DskipTests

That should generate `eclair-node/target/eclair-node-<version>-XXXXXXX-bin.zip` with sha256 checksums that match the one we provide and sign in `SHA256SUMS.asc`

(*) You may be able to build the exact same artefacts with other operating systems or versions of JDK 11, we have not tried everything.
(*) You may be able to build the exact same artefacts with other operating systems or versions of JDK 17, we have not tried everything.

## Upgrading

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@
<properties>
<project.build.outputTimestamp>2020-01-01T00:00:00Z</project.build.outputTimestamp>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
<scala.version>2.13.11</scala.version>
<scala.version.short>2.13</scala.version.short>
<akka.version>2.6.20</akka.version>
Expand Down Expand Up @@ -141,6 +140,7 @@
<arg>-Werror</arg>
<arg>-unchecked</arg>
<arg>-deprecation</arg>
<arg>-release:17</arg>
</args>
<jvmArgs>
<jvmArg>-Xmx1024m</jvmArg>
Expand Down

0 comments on commit 5907fce

Please sign in to comment.