Skip to content

Commit 03954ef

Browse files
committed
Merge branch 'main' into bugfix/302-code-generation-optional-with-constraint
# Conflicts: # core/esmf-test-aspect-models/src/main/resources/valid/bamm_2_0_0/io.openmanufacturing.test/1.0.0/AspectWithOptionalPropertyAndConstraint.ttl # core/sds-aspect-model-java-generator/src/main/java/io/openmanufacturing/sds/aspectmodel/java/AspectModelJavaUtil.java # core/sds-aspect-model-java-generator/src/test/java/io/openmanufacturing/sds/aspectmodel/java/AspectModelJavaGeneratorTest.java # core/sds-aspect-model-java-generator/src/test/java/io/openmanufacturing/sds/aspectmodel/java/GenerationResult.java # core/sds-test-aspect-models/src/main/java/io/openmanufacturing/sds/test/TestAspect.java
2 parents 93a6336 + fb2f6ad commit 03954ef

File tree

1,994 files changed

+43072
-43691
lines changed

Some content is hidden

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

1,994 files changed

+43072
-43691
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
# This seems to be caused by running out of memory; increasing page file
3939
# size suggested here:
4040
# https://github.com/actions/virtual-environments/issues/3420#issuecomment-861342418
41-
uses: al-cheb/configure-pagefile-action@v1.2
41+
uses: al-cheb/configure-pagefile-action@v1.3
4242
with:
4343
minimum-size: 16GB
4444
maximum-size: 16GB
@@ -54,8 +54,8 @@ jobs:
5454
run: |
5555
java --version
5656
export MAVEN_OPTS="-Xmx4096m"
57-
mvn -B -pl '!io.openmanufacturing:bamm-cli' clean install -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
58-
cd tools/bamm-cli
57+
mvn -B -pl '!org.eclipse.esmf:samm-cli' clean install -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
58+
cd tools/samm-cli
5959
mvn -B clean verify -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
6060
mvn -B verify -Pnative -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
6161
shell: bash
@@ -65,23 +65,23 @@ jobs:
6565
if: matrix.os == 'ubuntu-20.04'
6666
uses: actions/upload-artifact@v3
6767
with:
68-
name: bamm-cli-jar
69-
path: tools/bamm-cli/target/bamm-cli-*.jar
68+
name: samm-cli-jar
69+
path: tools/samm-cli/target/samm-cli-*.jar
7070

7171
- name: Upload binary (Windows)
7272
if: matrix.os == 'windows-latest'
7373
uses: actions/upload-artifact@v3
7474
with:
75-
name: bamm-cli-binary-${{ matrix.os }}
75+
name: samm-cli-binary-${{ matrix.os }}
7676
path: |
77-
tools/bamm-cli/target/bamm.exe
78-
tools/bamm-cli/target/*.dll
79-
tools/bamm-cli/target/lib/
77+
tools/samm-cli/target/samm.exe
78+
tools/samm-cli/target/*.dll
79+
tools/samm-cli/target/lib/
8080
8181
- name: Upload binary (Linux/Mac)
8282
if: matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-latest'
8383
uses: actions/upload-artifact@v3
8484
with:
85-
name: bamm-cli-binary-${{ matrix.os }}
85+
name: samm-cli-binary-${{ matrix.os }}
8686
path: |
87-
tools/bamm-cli/target/bamm
87+
tools/samm-cli/target/samm

.github/workflows/release-workflow.yml

Lines changed: 86 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
# Required for Maven
1717
- name: Set up JDK 17
18-
uses: actions/setup-java@v2
18+
uses: actions/setup-java@v3
1919
with:
2020
distribution: 'temurin'
2121
java-version: '17'
@@ -42,7 +42,7 @@ jobs:
4242
4343
# The Linux build will upload the local Nexus deployment repository
4444
# (i.e., what will be deployed to OSSRH/Maven Central)
45-
# and the Linux-specific bamm-cli binary to the build artifacts
45+
# and the Linux-specific samm-cli binary to the build artifacts
4646
build-linux:
4747
name: Linux build
4848
needs: [check-preconditions]
@@ -51,6 +51,18 @@ jobs:
5151
- name: Checkout
5252
uses: actions/checkout@v3
5353

54+
# Even though the build itself is done using the GraalVM JDK
55+
# (see below), we use the setup-java action to have GPG configured
56+
# so that it can be used from the maven-gpg-plugin.
57+
- name: Configure GPG
58+
uses: actions/setup-java@v3
59+
with:
60+
distribution: 'temurin'
61+
java-version: '17'
62+
gpg-private-key: ${{ secrets.PGP_KEY }}
63+
gpg-passphrase: PGP_KEY_PASSWORD
64+
overwrite-settings: false
65+
5466
- name: Setup JDK
5567
uses: graalvm/setup-graalvm@v1
5668
with:
@@ -84,27 +96,33 @@ jobs:
8496
mvn versions:commit
8597
8698
# Actual build of core SDK
87-
mvn -B -pl '!io.openmanufacturing:bamm-cli' clean deploy -Dmaven.wagon.httpconnectionManager.ttlSeconds=60 -DaltDeploymentRepository=local::default::file://nexus-staging -Psign
99+
mvn -B -pl '!org.eclipse.esmf:samm-cli' clean deploy -Dmaven.wagon.httpconnectionManager.ttlSeconds=60 -DaltDeploymentRepository=local::default::file://nexus-staging -Psign
88100
# Build of CLI
89-
cd tools/bamm-cli
101+
pushd tools/samm-cli
90102
mvn -B clean verify -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
91103
mvn -B verify -Pnative -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
92-
93-
# Create zip of bamm-cli
94-
cd tools/bamm-cli/target
95-
chmod a+x bamm
96-
tar cfvz bamm-cli-linux.tar.gz bamm
104+
popd
105+
106+
# Create .tar.gz of samm-cli
107+
pushd tools/samm-cli/target
108+
chmod a+x samm
109+
tar cfvz samm-cli-linux.tar.gz samm
110+
popd
111+
mv tools/samm-cli/target/samm-cli-linux.tar.gz .
112+
mv tools/samm-cli/target/samm-cli-*.jar .
113+
env:
114+
PGP_KEY_PASSWORD: ${{ secrets.PGP_KEY_PASSWORD }}
97115

98116
- name: Upload staging directory and Linux binary
99117
uses: actions/upload-artifact@v3
100118
with:
101119
name: linux-artifacts
102120
path: |
103121
nexus-staging/
104-
tools/bamm-cli/target/bamm-cli-linux.tar.gz
105-
tools/bamm-cli/target/bamm-cli-*.jar
122+
samm-cli-linux.tar.gz
123+
samm-cli-*.jar
106124
107-
# The Windows build will build the Windows-specific bamm-cli
125+
# The Windows build will build the Windows-specific samm-cli
108126
# and upload the binary to the build artifacts
109127
build-windows:
110128
name: Windows build
@@ -136,7 +154,7 @@ jobs:
136154
# This seems to be caused by running out of memory; increasing page file
137155
# size suggested here:
138156
# https://github.com/actions/virtual-environments/issues/3420#issuecomment-861342418
139-
uses: al-cheb/configure-pagefile-action@v1.2
157+
uses: al-cheb/configure-pagefile-action@v1.3
140158
with:
141159
minimum-size: 16GB
142160
maximum-size: 16GB
@@ -151,9 +169,9 @@ jobs:
151169
mvn versions:commit
152170
153171
# Actual build of core SDK
154-
mvn -B -pl '!io.openmanufacturing:bamm-cli' clean install -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
172+
mvn -B -pl '!org.eclipse.esmf:samm-cli' clean install -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
155173
# Build of CLI
156-
cd tools/bamm-cli
174+
cd tools/samm-cli
157175
mvn -B clean verify -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
158176
mvn -B verify -Pnative -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
159177
shell: bash
@@ -163,11 +181,12 @@ jobs:
163181
with:
164182
name: windows-artifacts
165183
path: |
166-
tools/bamm-cli/target/bamm.exe
167-
tools/bamm-cli/target/*.dll
168-
tools/bamm-cli/target/lib/
184+
tools/samm-cli/target/samm.exe
185+
tools/samm-cli/target/*.dll
186+
tools/samm-cli/target/lib/
169187
170188
release:
189+
name: Release
171190
needs: [build-linux, build-windows]
172191
runs-on: ubuntu-latest
173192
steps:
@@ -176,18 +195,28 @@ jobs:
176195
- name: Checkout
177196
uses: actions/checkout@v3
178197

198+
# Required to have Maven settings.xml set up correctly
179199
- name: Set up JDK 17
180-
uses: actions/setup-java@v2
200+
uses: actions/setup-java@v3
181201
with:
182202
distribution: 'temurin'
183203
java-version: '17'
184204
server-id: ossrh
185205
server-username: OSSRH_USERNAME
186206
server-password: OSSRH_TOKEN
187-
gpg-private-key: ${{ secrets.PGP_KEY }}
188-
gpg-passphrase: PGP_KEY_PASSWORD
189207
overwrite-settings: false
190208

209+
# Required to run the mvn:versions, since enforcer plugin
210+
# will check for GraalVM JDK
211+
- name: Setup JDK
212+
uses: graalvm/setup-graalvm@v1
213+
with:
214+
version: '22.3.1'
215+
java-version: '17'
216+
components: 'native-image,js'
217+
github-token: ${{ secrets.GITHUB_TOKEN }}
218+
native-image-job-reports: 'false'
219+
191220
- name: Fetch Linux Artifacts
192221
uses: actions/download-artifact@v3
193222
with:
@@ -201,59 +230,69 @@ jobs:
201230
- name: Prepare release
202231
run: |
203232
# Create Windows CLI zip
204-
zip -9 -r bamm-cli-windows.zip bamm.exe *.dll lib/
233+
zip -9 -r samm-cli-windows.zip samm.exe *.dll lib/
205234
206235
# Full release: Maven Central
236+
# The (apparently) only way to retrieve the staging profile id
237+
# is the undocumented rc-list-profiles command of the
238+
# nexus-staging-maven-plugin:
239+
# mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:rc-list-profiles -DnexusUrl=https://oss.sonatype.org/ -DserverId=ossrh
207240
- name: Release to OSSRH/Maven Central
208241
if: ${{ !contains( github.event.inputs.release_version, '-M' ) }}
209242
run: |
210-
mvn nexus-staging:deploy-staged-repository -DrepositoryDirectory=nexus-staging -Prelease-build
243+
mkdir deploy
244+
mv nexus-staging deploy
245+
cd deploy
246+
mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy-staged-repository \
247+
-DnexusUrl=https://oss.sonatype.org/ \
248+
-DserverId=ossrh \
249+
-DrepositoryDirectory=nexus-staging \
250+
-DstagingProfileId=7e73217781f2e
211251
env:
252+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
253+
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
212254
# Workaround for https://issues.sonatype.org/browse/OSSRH-66257
213255
# as described in https://stackoverflow.com/a/70157413
214256
MAVEN_OPTS: --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED
215257

216-
- name: Create release commit
258+
- name: Set versions
217259
continue-on-error: true
218260
run: |
219-
git config user.name github-actions
220-
git config user.email [email protected]
221-
222261
release_version=${{ github.event.inputs.release_version }}
223262
release_branch_name=${release_version%.*}.x
224263
echo "release_branch_name=$release_branch_name" >> $GITHUB_ENV
225264
226-
git fetch
227-
git checkout -b $release_branch_name --track origin/$release_branch_name || true
228-
git checkout -b $release_branch_name
229-
230265
# Set version in pom.xml files
231-
mvn clean install -DskipTests -Dmaven.javadoc.skip=true
232-
mvn versions:set -DnewVersion=${{ github.event.inputs.release_version }}
233-
mvn versions:commit
266+
mvn -B clean install -DskipTests -Dmaven.javadoc.skip=true
267+
mvn -B versions:set -DnewVersion=${{ github.event.inputs.release_version }}
268+
mvn -B versions:commit
234269
# Set version in Antora module
235270
yq eval -i '.version = "${{ github.event.inputs.release_version }}"' documentation/developer-guide/antora.yml
236-
# Push changes
237-
git add .
238-
if git commit -m "Add version ${{ github.event.inputs.release_version}}"; then
239-
git push origin ${{ env.release_branch_name }}
240-
fi
271+
272+
- name: Commit version changes and push to upstream repository
273+
uses: stefanzweifel/git-auto-commit-action@v4
274+
with:
275+
branch: ${{ env.release_branch_name }}
276+
commit_user_name: github-actions
277+
commit_user_email: [email protected]
278+
commit_author: Author <[email protected]>
279+
file_pattern: 'documentation/developer-guide/antora.yml pom.xml */*/pom.xml'
241280

242281
# Full release: Github
243282
- name: "Create Github release (full)"
244283
if: ${{ !contains( github.event.inputs.release_version, '-M' ) }}
245284
uses: softprops/action-gh-release@v1
246-
id: sds_sdk_release
285+
id: esmf_sdk_release
247286
with:
248287
body: "Release version ${{ github.event.inputs.release_version }}."
249288
tag_name: v${{ github.event.inputs.release_version }}
250289
target_commitish: ${{ env.release_branch_name }}
251290
draft: false
252291
prerelease: false
253292
files: |
254-
bamm-cli-windows.zip
255-
bamm-cli-linux.tar.gz
256-
bamm-cli-*.jar
293+
samm-cli-windows.zip
294+
samm-cli-linux.tar.gz
295+
samm-cli-*.jar
257296
env:
258297
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
259298

@@ -291,7 +330,7 @@ jobs:
291330
# Milestone release: Maven deploy to Github
292331
- name: Publish to Github
293332
if: contains( github.event.inputs.release_version, '-M' )
294-
run: mvn -s ./settings.xml -B clean -pl '!sds-sdk-test-report,!documentation,!tools/bamm-cli' deploy -DskipTests -Pmilestone-build,sign
333+
run: mvn -s ./settings.xml -B clean -pl '!esmf-sdk-test-report,!documentation,!tools/samm-cli' deploy -DskipTests -Pmilestone-build,sign
295334
env:
296335
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
297336
PGP_KEY_PASSWORD: ${{ secrets.PGP_KEY_PASSWORD }}
@@ -308,8 +347,8 @@ jobs:
308347
draft: false
309348
prerelease: true
310349
files: |
311-
bamm-cli-windows.zip
312-
bamm-cli-linux.tar.gz
313-
bamm-cli-*.jar
350+
samm-cli-windows.zip
351+
samm-cli-linux.tar.gz
352+
samm-cli-*.jar
314353
env:
315354
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ build
145145
/core/sds-aspect-meta-model-legacy*/target
146146

147147
# Directories where classes are generated during unit tests
148-
core/sds-aspect-model-java-generator/src/test/java/io/openmanufacturing/test
149-
core/sds-aspect-model-jackson/src/main/java/io/openmanufacturing/test
148+
core/esmf-aspect-model-java-generator/src/test/java/org/eclipse/esmf/test
149+
core/esmf-aspect-model-jackson/src/main/java/org/eclipse/esmf/test
150150

151151
# jqwik
152152
.jqwik-database
@@ -155,4 +155,6 @@ core/sds-aspect-model-jackson/src/main/java/io/openmanufacturing/test
155155
.attach_pid*
156156

157157
# MacOS
158-
.DS_Store
158+
.DS_Store
159+
160+
/deploy

0 commit comments

Comments
 (0)