Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APPS-3060] Update JDK version to 21 #258

Merged
merged 9 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ updates:
interval: "daily"
ignore:
- dependency-name: "amazoncorretto"
versions: [">17"]
versions: [">21"]
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
java-version: '21'
- name: "Clean-up SNAPSHOT artifacts"
run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
Expand All @@ -75,6 +77,8 @@ jobs:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
java-version: '21'
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn install $MAVEN_CLI_OPTS -DskipTests=true -Dmaven.javadoc.skip=true
Expand All @@ -96,6 +100,8 @@ jobs:
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
java-version: '21'
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Release"
Expand All @@ -122,6 +128,8 @@ jobs:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
java-version: '21'
- name: "Publish artifacts"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn deploy $MAVEN_CLI_OPTS -DskipTests=true
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ contains a `docker-compose` file and scripts that allows you to build and run th

### Pre-Requisites

* Java version 17 or higher
* Java version 21 or higher
* Spring boot 3.1 or higher
* Maven version 3.3 or higher

Expand Down Expand Up @@ -311,7 +311,7 @@ More Information: [Configuring Alfresco Event Gateway](https://www.github.com/Al

### Pre-Requisites

* Java version 17 or higher
* Java version 21 or higher
* Maven version 3.3 or higher

### Build command
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<project.scm.repository>alfresco-java-sdk</project.scm.repository>
<project.year>2021</project.year>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<java.version>21</java.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check whether we can update java compile time as well to 21

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discused confirming the changes with java 21 compile time as well

<java.release>${java.version}</java.release>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
Expand Down
2 changes: 1 addition & 1 deletion samples/event-api-handlers/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM amazoncorretto:17-alpine3.18@sha256:6a3dc573328ced158ae25ffde792accbe8b1ff2e7b505c72d2d5e7b9bfa9ac26
FROM amazoncorretto:21-alpine3.18@sha256:6a3dc573328ced158ae25ffde792accbe8b1ff2e7b505c72d2d5e7b9bfa9ac26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify the image SHA

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed with devops to use the same SHA image


ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
Expand Down
8 changes: 4 additions & 4 deletions samples/event-api-handlers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ that log information about the handled events.

To properly build and run the project in a local environment it is required to have installed some tools.

* Java 17:
* Java 21:
```bash
$ java -version

openjdk version "17.0.4" 2022-07-19 LTS
OpenJDK Runtime Environment (build 17.0.4+8-LTS)
OpenJDK 64-Bit Server VM (build 17.0.4+8-LTS, mixed mode, sharing)
openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment (build 21.0.3+7-LTS-152)
OpenJDK 64-Bit Server VM (build 21.0.3+7-LTS-152, mixed mode, sharing)

```

Expand Down
2 changes: 1 addition & 1 deletion samples/event-api-spring-integration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM amazoncorretto:17-alpine3.18@sha256:6a3dc573328ced158ae25ffde792accbe8b1ff2e7b505c72d2d5e7b9bfa9ac26
FROM amazoncorretto:21-alpine3.18@sha256:6a3dc573328ced158ae25ffde792accbe8b1ff2e7b505c72d2d5e7b9bfa9ac26

ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
Expand Down
8 changes: 4 additions & 4 deletions samples/event-api-spring-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ to define sample Spring Integration flows that log information about specific ha

To properly build and run the project in a local environment it is required to have installed some tools.

* Java 17:
* Java 21:
```bash
$ java -version

openjdk version "17.0.4" 2022-07-19 LTS
OpenJDK Runtime Environment (build 17.0.4+8-LTS)
OpenJDK 64-Bit Server VM (build 17.0.4+8-LTS, mixed mode, sharing)
openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment (build 21.0.3+7-LTS-152)
OpenJDK 64-Bit Server VM (build 21.0.3+7-LTS-152, mixed mode, sharing)

```

Expand Down
2 changes: 1 addition & 1 deletion samples/extension-template/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM amazoncorretto:17-alpine3.18@sha256:6a3dc573328ced158ae25ffde792accbe8b1ff2e7b505c72d2d5e7b9bfa9ac26
FROM amazoncorretto:21-alpine3.18@sha256:6a3dc573328ced158ae25ffde792accbe8b1ff2e7b505c72d2d5e7b9bfa9ac26

ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
Expand Down
8 changes: 4 additions & 4 deletions samples/extension-template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ to define a sample [```EventHandler```](../../alfresco-java-event-api/alfresco-j

To properly build and run the project in a local environment it is required to have installed some tools.

* Java 17:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update the java version in the other read file as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the java version to 21 in readme file

* Java 21:
```bash
$ java -version

openjdk version "17.0.4" 2022-07-19 LTS
OpenJDK Runtime Environment (build 17.0.4+8-LTS)
OpenJDK 64-Bit Server VM (build 17.0.4+8-LTS, mixed mode, sharing)
openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment (build 21.0.3+7-LTS-152)
OpenJDK 64-Bit Server VM (build 21.0.3+7-LTS-152, mixed mode, sharing)
```

* [Maven](https://maven.apache.org/install.html) version 3.3 or higher:
Expand Down