Skip to content

Commit ee973b3

Browse files
authored
Feature: Update to latest Java SDK and change from spring to micronaut for Better performance (#83)
* Add changes * Change project from spring to micronaut * Remove lombok because of problems with micronaut * Update bruno api endpoints * Fix some shading problems * Add graalvm config * Make graalvm native image work on for micronaut * Adjust testing WIP * Adjust Package Service Test file * Update ModelService test * Adjust testing files * Fix unit test on micronaut * Update pom.xml * Change test ttl file * Update ModelServiceTest.java * Update Movement.ttl * Upgrade to newest graalvm and esmf sdk version * Update test files to migrate * Use esmf java sdk substitution * Change pom for new graal version * Remove reduced pom xml from source code * Update to bruno and run it on pom.xml * Update github workflows * Fix workflow * Update mac and ubuntu runner * Update pom.xml * Fix bruno test * Update copyright and change some configuration * Add information into namespaces * Update pom.xml * Add better method to delete safe windows file when is locked * Change logic to delete files * Delete quitly
1 parent ef2d757 commit ee973b3

File tree

165 files changed

+7112
-26554
lines changed

Some content is hidden

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

165 files changed

+7112
-26554
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
22
name: Task
3-
about: Suggest a task for this project. This can be any type of work item like for example a feature request.
3+
about: Suggest a task for this project. This can be any type of work item like for example a feature request.
44
title: '[Task]'
55
labels: task
66
assignees: ''
77

88
---
99

1010
**Is your task related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Examples are "I am always frustrated when [...]", or "I think it is cumbersome to [...]", "There seems to be a better way to [...]"
11+
A clear and concise description of what the problem is. Examples are "I am always frustrated when [...]", or "I think it is cumbersome to [...]", "There seems
12+
to be a better way to [...]"
1213

1314
**Describe the solution you'd like**
1415
A clear and concise description of what you want to happen.

.github/workflows/codeql-scanning.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
analyze:
1313
name: Analyze
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-latest
1515
permissions:
1616
actions: read
1717
contents: read
@@ -21,7 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
language: [ 'java' ]
24-
java: [ '17' ]
24+
java: [ '21' ]
2525

2626
steps:
2727
- name: Checkout repository

.github/workflows/pull_request_check.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
os: [ macos-12, windows-latest, ubuntu-20.04 ]
16+
os: [ macos-13, windows-latest, ubuntu-latest ]
1717

1818
steps:
1919
- name: Checkout project
@@ -34,9 +34,8 @@ jobs:
3434
- name: Setup graalvm ce
3535
uses: graalvm/setup-graalvm@v1
3636
with:
37-
version: '22.3.1'
38-
java-version: '17'
39-
components: 'native-image,js'
37+
java-version: '21'
38+
distribution: 'graalvm'
4039
github-token: ${{ secrets.GITHUB_TOKEN }}
4140

4241
- name: Cache maven packages
@@ -48,14 +47,14 @@ jobs:
4847
${{ runner.os }}-maven-
4948
5049
- name: Creating native image (Mac)
51-
if: matrix.os == 'macos-12'
52-
run: mvn install -P native-image -Dos.platform=mac -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
50+
if: matrix.os == 'macos-13'
51+
run: mvn install -P native-image,native-test-config -Dos.platform=mac -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
5352
env:
5453
TOKEN: ${{ secrets.GITHUB_TOKEN }}
5554

5655
- name: Creating native image (Linux)
57-
if: matrix.os == 'ubuntu-20.04'
58-
run: mvn install -P native-image -Dos.platform=linux -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
56+
if: matrix.os == 'ubuntu-latest'
57+
run: mvn install -P native-image,native-test-config -Dos.platform=linux -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
5958
env:
6059
TOKEN: ${{ secrets.GITHUB_TOKEN }}
6160

@@ -65,25 +64,25 @@ jobs:
6564

6665
- name: Creating native image (Win)
6766
if: matrix.os == 'windows-latest'
68-
run: mvn install -P native-image -D os.platform=win -D maven.wagon.httpconnectionManager.ttlSeconds=60
67+
run: mvn install -P native-image,native-test-config -D os.platform=win -D maven.wagon.httpconnectionManager.ttlSeconds=60
6968
env:
7069
TOKEN: ${{ secrets.GITHUB_TOKEN }}
7170

7271
- name: Performing integration test for Mac
73-
if: matrix.os == 'macos-12'
74-
run: mvn install -DskipTests -P dependencies-for-integration-tests,start-unix-native-image-for-integration-tests,run-postman-integration-tests -Dos.platform=mac
72+
if: matrix.os == 'macos-13'
73+
run: mvn install -DskipTests -P dependencies-for-integration-tests,start-unix-native-image-for-integration-tests,run-bruno-integration-tests -Dos.platform=mac
7574
env:
7675
TOKEN: ${{ secrets.GITHUB_TOKEN }}
7776

7877
- name: Performing integration test for Linux
79-
if: matrix.os == 'ubuntu-20.04'
80-
run: mvn install -DskipTests -P dependencies-for-integration-tests,start-unix-native-image-for-integration-tests,run-postman-integration-tests -Dos.platform=linux
78+
if: matrix.os == 'ubuntu-latest'
79+
run: mvn install -DskipTests -P dependencies-for-integration-tests,start-unix-native-image-for-integration-tests,run-bruno-integration-tests -Dos.platform=linux
8180
env:
8281
TOKEN: ${{ secrets.GITHUB_TOKEN }}
8382

8483
- name: Performing integration test for Windows
8584
if: matrix.os == 'windows-latest'
86-
run: mvn install -DskipTests -P dependencies-for-integration-tests,start-windows-native-image-for-integration-tests,run-postman-integration-tests -D os.platform=win
85+
run: mvn install -DskipTests -P dependencies-for-integration-tests,start-windows-native-image-for-integration-tests,run-bruno-integration-tests -D os.platform=win
8786
env:
8887
TOKEN: ${{ secrets.GITHUB_TOKEN }}
8988

@@ -99,7 +98,7 @@ jobs:
9998
aspect-model-editor-runtime/target/lib/
10099
101100
- name: Upload binary (Linux)
102-
if: matrix.os == 'ubuntu-20.04'
101+
if: matrix.os == 'ubuntu-latest'
103102
uses: actions/upload-artifact@v4
104103
with:
105104
name: ame-backend-linux
@@ -108,7 +107,7 @@ jobs:
108107
aspect-model-editor-runtime/target/*.so
109108
110109
- name: Upload binary (Mac)
111-
if: matrix.os == 'macos-12'
110+
if: matrix.os == 'macos-13'
112111
uses: actions/upload-artifact@v4
113112
with:
114113
name: ame-backend-mac

.github/workflows/tagged_release.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
os: [ macos-12, windows-latest, ubuntu-20.04 ]
17+
os: [ macos-13, windows-latest, ubuntu-latest ]
1818

1919
steps:
2020
- name: Checkout project
@@ -40,9 +40,8 @@ jobs:
4040
- name: Setup graalvm ce
4141
uses: graalvm/setup-graalvm@v1
4242
with:
43-
version: '22.3.1'
44-
java-version: '17'
45-
components: 'native-image,js'
43+
java-version: '21'
44+
distribution: 'graalvm'
4645
github-token: ${{ secrets.GITHUB_TOKEN }}
4746

4847
- name: Cache maven packages
@@ -54,22 +53,22 @@ jobs:
5453
${{ runner.os }}-maven-
5554
5655
- name: Set versions
57-
if: matrix.os == 'ubuntu-20.04'
56+
if: matrix.os == 'ubuntu-latest'
5857
run: |
5958
release_version=${{ github.event.inputs.release_version }}
6059
release_branch_name=${release_version%.*}.x
6160
echo "release_branch_name=$release_branch_name" >> $GITHUB_ENV
6261
6362
- name: Create Release branch
64-
if: matrix.os == 'ubuntu-20.04'
63+
if: matrix.os == 'ubuntu-latest'
6564
run: |
6665
git config --global user.email "[email protected]"
6766
git config --global user.name "github-actions"
6867
git checkout -b ${{ env.release_branch_name }}
6968
git push origin ${{ env.release_branch_name }}
7069
7170
- name: Set maven version
72-
if: matrix.os == 'macos-12' || matrix.os == 'ubuntu-20.04'
71+
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-latest'
7372
run: mvn versions:set -DnewVersion=${{ github.event.inputs.release_version }}
7473
env:
7574
TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -81,14 +80,14 @@ jobs:
8180
TOKEN: ${{ secrets.GITHUB_TOKEN }}
8281

8382
- name: Creating native image (Mac)
84-
if: matrix.os == 'macos-12'
85-
run: mvn install -P native-image -DskipTests -Dos.platform=mac -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
83+
if: matrix.os == 'macos-13'
84+
run: mvn install -P native-image,native-test-config -DskipTests -Dos.platform=mac -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
8685
env:
8786
TOKEN: ${{ secrets.GITHUB_TOKEN }}
8887

8988
- name: Creating native image (Linux)
90-
if: matrix.os == 'ubuntu-20.04'
91-
run: mvn install -P native-image -DskipTests -Dos.platform=linux -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
89+
if: matrix.os == 'ubuntu-latest'
90+
run: mvn install -P native-image,native-test-config -DskipTests -Dos.platform=linux -Dmaven.wagon.httpconnectionManager.ttlSeconds=60
9291

9392
env:
9493
TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -99,7 +98,7 @@ jobs:
9998

10099
- name: Creating native image (Win)
101100
if: matrix.os == 'windows-latest'
102-
run: mvn install -P native-image -DskipTests -D os.platform=win -D maven.wagon.httpconnectionManager.ttlSeconds=60
101+
run: mvn install -P native-image,native-test-config -DskipTests -D os.platform=win -D maven.wagon.httpconnectionManager.ttlSeconds=60
103102
env:
104103
TOKEN: ${{ secrets.GITHUB_TOKEN }}
105104

@@ -127,22 +126,22 @@ jobs:
127126
aspect-model-editor-runtime/target/lib/
128127
129128
- name: Upload binary (Mac)
130-
if: matrix.os == 'macos-12'
129+
if: matrix.os == 'macos-13'
131130
uses: actions/upload-artifact@v4
132131
with:
133132
name: ame-backend-v${{ github.event.inputs.release_version }}-mac
134133
path: aspect-model-editor-runtime/target/ame-backend-${{ github.event.inputs.release_version }}-mac
135134

136135
- name: Upload binary (Linux)
137-
if: matrix.os == 'ubuntu-20.04'
136+
if: matrix.os == 'ubuntu-latest'
138137
uses: actions/upload-artifact@v4
139138
with:
140139
name: ame-backend-v${{ github.event.inputs.release_version }}-linux
141140
path: aspect-model-editor-runtime/target/ame-backend-${{ github.event.inputs.release_version }}-linux
142141

143142
# Release Linux executables
144143
- name: Create GitHub release (Linux)
145-
if: ${{ (matrix.os == 'ubuntu-20.04') && (!contains( github.ref, '-M' )) }}
144+
if: ${{ (matrix.os == 'ubuntu-latest') && (!contains( github.ref, '-M' )) }}
146145
uses: svenstaro/upload-release-action@latest
147146
with:
148147
file_glob: true
@@ -153,7 +152,7 @@ jobs:
153152
tag: v${{ github.event.inputs.release_version }}
154153

155154
- name: Create GitHub pre-release (Linux)
156-
if: ${{ (matrix.os == 'ubuntu-20.04') && (contains( github.ref, '-M' )) }}
155+
if: ${{ (matrix.os == 'ubuntu-latest') && (contains( github.ref, '-M' )) }}
157156
uses: svenstaro/upload-release-action@latest
158157
with:
159158
file_glob: true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ lsp
1818

1919
backup*
2020
test-packages/
21+
.DS_Store
22+
src-gen/
23+
dependency-reduced-pom.xml

CONVENTIONS.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@ if (someOptional != null && someOptional.isPresent()) ...
5353
* You should be using Objects.requireNonNull() for those sort of checks (or Guava's Preconditions if you're having more
5454
types of assertions than non-null and aim for a maximum of consistency).
5555

56-
### Lombok
57-
58-
We use Lombok in the ESMF Aspect Model Editor backend. Project Lombok is a Java library that automatically plugs into
59-
your
60-
editor and build tools. It removes the burden to write getter or equals methods, adds fully featured
61-
builders to a class with one annotation, automates logging variables, and much more. Consider using
62-
its features if you are in the need to do something like that.
63-
6456
## Documentation
6557

6658
### Source Code Documentation

aspect-model-editor-core/pom.xml

Lines changed: 57 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,67 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
~ Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
3+
~ Copyright (c) 2025 Robert Bosch Manufacturing Solutions GmbH
4+
~
5+
~ See the AUTHORS file(s) distributed with this work for
6+
~ additional information regarding authorship.
7+
~
8+
~ This Source Code Form is subject to the terms of the Mozilla Public
9+
~ License, v. 2.0. If a copy of the MPL was not distributed with this
10+
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
11+
~
12+
~ SPDX-License-Identifier: MPL-2.0
413
-->
514

6-
<project xmlns="http://maven.apache.org/POM/4.0.0"
7-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
15+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16+
xmlns="http://maven.apache.org/POM/4.0.0"
817
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
9-
<modelVersion>4.0.0</modelVersion>
18+
<modelVersion>4.0.0</modelVersion>
1019

11-
<parent>
12-
<groupId>org.eclipse.esmf</groupId>
13-
<artifactId>aspect-model-editor-parent</artifactId>
14-
<version>DEV-SNAPSHOT</version>
15-
</parent>
20+
<parent>
21+
<groupId>org.eclipse.esmf</groupId>
22+
<artifactId>aspect-model-editor-parent</artifactId>
23+
<version>DEV-SNAPSHOT</version>
24+
</parent>
1625

17-
<artifactId>aspect-model-editor-core</artifactId>
18-
<name>ESMF Aspect Model Editor Core</name>
26+
<artifactId>aspect-model-editor-core</artifactId>
27+
<name>ESMF Aspect Model Editor Core</name>
1928

20-
<dependencies>
21-
<!-- ESMF dependencies -->
22-
<dependency>
23-
<groupId>org.eclipse.esmf</groupId>
24-
<artifactId>esmf-aspect-model-starter</artifactId>
25-
</dependency>
26-
<dependency>
27-
<groupId>org.eclipse.esmf</groupId>
28-
<artifactId>esmf-aspect-model-urn</artifactId>
29-
</dependency>
30-
<dependency>
31-
<groupId>org.eclipse.esmf</groupId>
32-
<artifactId>esmf-aspect-meta-model-java</artifactId>
33-
</dependency>
34-
<dependency>
35-
<groupId>org.eclipse.esmf</groupId>
36-
<artifactId>esmf-aspect-model-validator</artifactId>
37-
</dependency>
29+
<dependencies>
30+
<!-- ESMF dependencies -->
31+
<dependency>
32+
<groupId>org.eclipse.esmf</groupId>
33+
<artifactId>esmf-aspect-model-starter</artifactId>
34+
</dependency>
35+
<dependency>
36+
<groupId>org.eclipse.esmf</groupId>
37+
<artifactId>esmf-aspect-model-urn</artifactId>
38+
</dependency>
39+
<dependency>
40+
<groupId>org.eclipse.esmf</groupId>
41+
<artifactId>esmf-aspect-meta-model-java</artifactId>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.eclipse.esmf</groupId>
45+
<artifactId>esmf-aspect-model-validator</artifactId>
46+
</dependency>
3847

39-
<!-- Third party dependencies for developing-->
40-
<dependency>
41-
<groupId>org.springframework.boot</groupId>
42-
<artifactId>spring-boot-starter-security</artifactId>
43-
</dependency>
44-
<dependency>
45-
<groupId>org.projectlombok</groupId>
46-
<artifactId>lombok</artifactId>
47-
</dependency>
48-
</dependencies>
48+
<!-- Third party dependencies for developing-->
49+
<dependency>
50+
<groupId>org.graalvm.sdk</groupId>
51+
<artifactId>graal-sdk</artifactId>
52+
<scope>provided</scope>
53+
</dependency>
54+
<dependency>
55+
<groupId>org.graalvm.truffle</groupId>
56+
<artifactId>truffle-api</artifactId>
57+
</dependency>
58+
<dependency>
59+
<groupId>io.micronaut</groupId>
60+
<artifactId>micronaut-inject-java</artifactId>
61+
</dependency>
62+
<dependency>
63+
<groupId>io.micronaut</groupId>
64+
<artifactId>micronaut-http-server-netty</artifactId>
65+
</dependency>
66+
</dependencies>
4967
</project>

0 commit comments

Comments
 (0)