Skip to content

Commit 2ea8c35

Browse files
authored
Merge pull request #715 from bci-oss/713-update-to-java-21
Update to Java 21
2 parents 310f89b + 476c295 commit 2ea8c35

File tree

45 files changed

+192
-1035
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+192
-1035
lines changed

.github/workflows/pull-request-check.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ jobs:
1212
strategy:
1313
fail-fast: true
1414
matrix:
15-
os: [windows-latest, ubuntu-20.04, macos-13]
15+
os: [windows-latest, ubuntu-latest, macos-13]
1616
steps:
1717
- name: Checkout repository
1818
uses: actions/checkout@v4
1919
with:
2020
submodules: recursive
2121

2222
- name: Check code style
23-
if: matrix.os == 'ubuntu-20.04'
23+
if: matrix.os == 'ubuntu-latest'
2424
uses: dbelyaev/action-checkstyle@e89baf0f8b488b946345b7de8e975be1e3606387 # v1.5.6
2525
with:
2626
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -30,9 +30,9 @@ jobs:
3030
fail_on_error: true
3131

3232
- name: Setup JDK
33-
uses: graalvm/setup-graalvm@2f25c0caae5b220866f732832d5e3e29ff493338 # v1.2.1
33+
uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # v1.3.3
3434
with:
35-
java-version: '17.0.10'
35+
java-version: '21.0.6'
3636
distribution: 'graalvm'
3737
components: 'native-image,js'
3838
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -59,7 +59,7 @@ jobs:
5959
disk-root: "C:"
6060

6161
- name: Set Swap Space (Linux)
62-
if: matrix.os == 'ubuntu-20.04'
62+
if: matrix.os == 'ubuntu-latest'
6363
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c # master
6464
with:
6565
swap-size-gb: 12
@@ -86,9 +86,9 @@ jobs:
8686
mvn -B -pl tools/samm-cli clean verify -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
8787
bundle="samm-bundle-DEV-SNAPSHOT-$(date +%s)"
8888
mkdir ${bundle}
89-
curl -Lo jre.tar.gz https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jre_x64_mac_hotspot_21.0.3_9.tar.gz
89+
curl -Lo jre.tar.gz https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.6%2B7/OpenJDK21U-jre_x64_mac_hotspot_21.0.6_7.tar.gz
9090
tar -xvf jre.tar.gz
91-
cp -r ./jdk-21.0.3+9-jre/Contents/Home ./${bundle}/jre
91+
cp -r ./jdk-21.0.6+7-jre/Contents/Home ./${bundle}/jre
9292
cp tools/samm-cli/target/samm-cli-DEV-SNAPSHOT.jar ./${bundle}/
9393
9494
cat <<EOF > ./${bundle}/run.sh
@@ -116,18 +116,18 @@ jobs:
116116
uses: actions/setup-java@v4
117117
with:
118118
distribution: 'temurin'
119-
java-version: '17'
119+
java-version: '21'
120120
overwrite-settings: false
121121

122122
- name: Test executable jar on Temurin
123-
if: matrix.os == 'ubuntu-20.04'
123+
if: matrix.os == 'ubuntu-latest'
124124
run: |
125125
cd tools/samm-cli
126126
mvn -B -Denforcer.skip -Dskip.maven.surefire failsafe:integration-test -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
127127
128128
- name: Upload executable jar
129129
# We only need one OS job to upload the jar
130-
if: matrix.os == 'ubuntu-20.04'
130+
if: matrix.os == 'ubuntu-latest'
131131
uses: actions/upload-artifact@v4
132132
with:
133133
name: samm-cli-jar
@@ -145,7 +145,7 @@ jobs:
145145
tools/samm-cli/target/lib/
146146
147147
- name: Upload binary (Linux)
148-
if: matrix.os == 'ubuntu-20.04'
148+
if: matrix.os == 'ubuntu-latest'
149149
uses: actions/upload-artifact@v4
150150
with:
151151
name: samm-cli-binary-${{ matrix.os }}

.github/workflows/release-workflow.yml

+18-18
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ on:
88
jobs:
99
check-preconditions:
1010
name: Check preconditions
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515
with:
1616
submodules: recursive
1717

1818
# Required for Maven
19-
- name: Set up JDK 17
19+
- name: Set up JDK 21
2020
uses: actions/setup-java@v4
2121
with:
2222
distribution: 'temurin'
23-
java-version: '17'
23+
java-version: '21'
2424
overwrite-settings: false
2525

2626
- name: Setup Git
@@ -48,7 +48,7 @@ jobs:
4848
build-linux:
4949
name: Linux build
5050
needs: [check-preconditions]
51-
runs-on: ubuntu-20.04
51+
runs-on: ubuntu-latest
5252
steps:
5353
- name: Checkout
5454
uses: actions/checkout@v4
@@ -62,15 +62,15 @@ jobs:
6262
uses: actions/setup-java@v4
6363
with:
6464
distribution: 'temurin'
65-
java-version: '17'
65+
java-version: '21'
6666
gpg-private-key: ${{ secrets.PGP_KEY }}
6767
gpg-passphrase: PGP_KEY_PASSWORD
6868
overwrite-settings: false
6969

7070
- name: Setup JDK
71-
uses: graalvm/setup-graalvm@2f25c0caae5b220866f732832d5e3e29ff493338 # v1.2.1
71+
uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # v1.3.3
7272
with:
73-
java-version: '17.0.10'
73+
java-version: '21.0.6'
7474
distribution: 'graalvm'
7575
components: 'native-image,js'
7676
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -122,7 +122,7 @@ jobs:
122122
uses: actions/setup-java@v4
123123
with:
124124
distribution: 'temurin'
125-
java-version: '17'
125+
java-version: '21'
126126
overwrite-settings: false
127127

128128
- name: Test executable jar on Temurin
@@ -153,9 +153,9 @@ jobs:
153153
submodules: recursive
154154

155155
- name: Setup JDK
156-
uses: graalvm/setup-graalvm@2f25c0caae5b220866f732832d5e3e29ff493338 # v1.2.1
156+
uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # v1.3.3
157157
with:
158-
java-version: '17.0.10'
158+
java-version: '21.0.6'
159159
distribution: 'graalvm'
160160
components: 'native-image,js'
161161
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -187,9 +187,9 @@ jobs:
187187
run: |
188188
bundle="samm-bundle-$(date +%s)"
189189
mkdir ${bundle}
190-
curl -Lo jre.tar.gz https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jre_x64_mac_hotspot_21.0.3_9.tar.gz
190+
curl -Lo jre.tar.gz https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.6%2B7/OpenJDK21U-jre_x64_mac_hotspot_21.0.6_7.tar.gz
191191
tar -xvf jre.tar.gz
192-
cp -r ./jdk-21.0.3+9-jre/Contents/Home ./${bundle}/jre
192+
cp -r ./jdk-21.0.6+7-jre/Contents/Home ./${bundle}/jre
193193
cp tools/samm-cli/target/samm-cli-${{ github.event.inputs.release_version }}.jar ./${bundle}/
194194
195195
cat <<EOF > ./${bundle}/run.sh
@@ -228,9 +228,9 @@ jobs:
228228
submodules: recursive
229229

230230
- name: Setup JDK
231-
uses: graalvm/setup-graalvm@2f25c0caae5b220866f732832d5e3e29ff493338 # v1.2.1
231+
uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # v1.3.3
232232
with:
233-
java-version: '17.0.10'
233+
java-version: '21.0.6'
234234
distribution: 'graalvm'
235235
components: 'native-image,js'
236236
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -291,11 +291,11 @@ jobs:
291291
uses: actions/checkout@v4
292292

293293
# Required to have Maven settings.xml set up correctly
294-
- name: Set up JDK 17
294+
- name: Set up JDK 21
295295
uses: actions/setup-java@v4
296296
with:
297297
distribution: 'temurin'
298-
java-version: '17'
298+
java-version: '21'
299299
server-id: ossrh
300300
server-username: OSSRH_USERNAME
301301
server-password: OSSRH_TOKEN
@@ -304,9 +304,9 @@ jobs:
304304
# Required to run the mvn:versions, since enforcer plugin
305305
# will check for GraalVM JDK
306306
- name: Setup JDK
307-
uses: graalvm/setup-graalvm@2f25c0caae5b220866f732832d5e3e29ff493338 # v1.2.1
307+
uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # v1.3.3
308308
with:
309-
java-version: '17.0.10'
309+
java-version: '21.0.6'
310310
distribution: 'graalvm'
311311
components: 'native-image,js'
312312
github-token: ${{ secrets.GITHUB_TOKEN }}

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ Are you having trouble with ESMF SDK? We want to help!
5454
## Build and contribute
5555

5656
The top level elements of the SDK structure are all carried out as Maven multimodule projects.
57-
Building the SDK requires a Java 17-compatible [GraalVM JDK](https://www.graalvm.org/) with the 'js'
58-
component installed. If you want to build the samm-cli (see below), you will also have to have the
59-
'native-image' GraalVM component installed.
57+
Building the SDK requires a Java 21-compatible [GraalVM JDK](https://www.graalvm.org/).
6058

6159
To build the SDK core components, run the following command:
6260
```bash

core/esmf-aspect-meta-model-interface/src/main/java/org/eclipse/esmf/aspectmodel/MissingMetaModelVersionException.java

-19
This file was deleted.

core/esmf-aspect-meta-model-interface/src/main/java/org/eclipse/esmf/aspectmodel/MultipleMetaModelVersionsException.java

-19
This file was deleted.

core/esmf-aspect-meta-model-interface/src/main/java/org/eclipse/esmf/metamodel/Namespace.java

-13
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,6 @@ public interface Namespace extends ModelElementGroup, HasDescription {
2828
*/
2929
String ANONYMOUS = "urn:samm:anonymous.elements:0.0.0#";
3030

31-
/**
32-
* The package part of the model namespace is an identifier given in
33-
* <a href="https://en.wikipedia.org/wiki/Reverse_domain_name_notation">reverse domain name notation</a>, e.g.,
34-
* {@code com.example.myapp}.
35-
*
36-
* @return the package part of the namespace
37-
* @deprecated use {@link #namespaceMainPart()} instead
38-
*/
39-
@Deprecated( forRemoval = true )
40-
default String packagePart() {
41-
return namespaceMainPart();
42-
}
43-
4431
/**
4532
* The package part of the model namespace is an identifier given in
4633
* <a href="https://en.wikipedia.org/wiki/Reverse_domain_name_notation">reverse domain name notation</a>, e.g.,

core/esmf-aspect-meta-model-interface/src/main/java/org/eclipse/esmf/metamodel/characteristic/Collection.java

-8
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ public interface Collection extends Characteristic {
2929
*/
3030
boolean isOrdered();
3131

32-
/**
33-
* @deprecated Use {@link #allowsDuplicates()} instead
34-
*/
35-
@Deprecated( forRemoval = true )
36-
default boolean isAllowDuplicates() {
37-
return allowsDuplicates();
38-
}
39-
4032
/**
4133
* @return a {@link boolean} which determines whether the collection may contain duplicate values.
4234
*/

core/esmf-aspect-meta-model-java/pom.xml

+24-30
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,30 @@
9595
</sources>
9696
</configuration>
9797
</execution>
98+
<execution>
99+
<id>add-source</id>
100+
<phase>initialize</phase>
101+
<goals>
102+
<goal>add-source</goal>
103+
</goals>
104+
<configuration>
105+
<sources>
106+
<source>${generated-sources}/main/java</source>
107+
</sources>
108+
</configuration>
109+
</execution>
110+
<execution>
111+
<id>add-src-buildtime-source</id>
112+
<phase>initialize</phase>
113+
<goals>
114+
<goal>add-source</goal>
115+
</goals>
116+
<configuration>
117+
<sources>
118+
<source>${build-time-sources}/main/java</source>
119+
</sources>
120+
</configuration>
121+
</execution>
98122
</executions>
99123
</plugin>
100124

@@ -151,36 +175,6 @@
151175
</configuration>
152176
</plugin>
153177

154-
<plugin>
155-
<groupId>org.codehaus.mojo</groupId>
156-
<artifactId>build-helper-maven-plugin</artifactId>
157-
<executions>
158-
<execution>
159-
<id>add-source</id>
160-
<phase>initialize</phase>
161-
<goals>
162-
<goal>add-source</goal>
163-
</goals>
164-
<configuration>
165-
<sources>
166-
<source>${generated-sources}/main/java</source>
167-
</sources>
168-
</configuration>
169-
</execution>
170-
<execution>
171-
<id>add-src-buildtime-source</id>
172-
<phase>initialize</phase>
173-
<goals>
174-
<goal>add-source</goal>
175-
</goals>
176-
<configuration>
177-
<sources>
178-
<source>${build-time-sources}/main/java</source>
179-
</sources>
180-
</configuration>
181-
</execution>
182-
</executions>
183-
</plugin>
184178
<plugin>
185179
<groupId>org.apache.maven.plugins</groupId>
186180
<artifactId>maven-compiler-plugin</artifactId>

core/esmf-aspect-meta-model-java/src/main/java/org/eclipse/esmf/aspectmodel/loader/AspectModelLoader.java

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
*/
7878
public class AspectModelLoader implements ModelSource, ResolutionStrategySupport {
7979
private static final Logger LOG = LoggerFactory.getLogger( AspectModelLoader.class );
80-
private static final String ASPECT_MODELS_FOLDER = "aspect-models";
8180

8281
public static final Supplier<ResolutionStrategy> DEFAULT_STRATEGY = () -> {
8382
final Path currentDirectory = Path.of( System.getProperty( "user.dir" ) );

core/esmf-aspect-meta-model-java/src/main/java/org/eclipse/esmf/aspectmodel/resolver/exceptions/InvalidModelException.java

-27
This file was deleted.

0 commit comments

Comments
 (0)