-
Notifications
You must be signed in to change notification settings - Fork 11
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
workaround for error: FA³ST Service not compilable with Java16+ #142
Conversation
…t variables which is no longer allowed anymore from JDK 16 (Caused problems with SystemLambda.WithEnvironmentVariables.execute() in AppTest.java)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this approach breaks the CI as it seems overrides CLI parameter passed to maven.
starter/pom.xml
Outdated
<dependency> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>2.22.2</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
introduce maven property holding version information (name should be maven.plugin.surefire.version) and valu should be latest version of the plugin.
starter/pom.xml
Outdated
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<argLine>--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED</argLine> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this solution backward-compatible, i.e. does this cause any issues when used with older JREs?
Also this seems to be overriding the command-line parameters passed via -Dxxx=yyy
(used here
mvn -B verify --settings maven-ci-settings.xml -P coverage sonar:sonar -Dsonar.projectKey=FraunhoferIOSB_FAAAST-Service -Dmaven.javadoc.skip=true |
Is there any other way to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is backwards compatible (tested with java 11) but
I realise that my suggestion is not a proper solution.
Since the problem is caused by the library performing non-java 16 compliant actions, I would have a look if there is another way to perform the corresponding test cases.
…vironment variables which is no longer allowed anymore from JDK 16" This reverts commit 8ce5f67.
…mpatibility problems with java 16
add maven-surefire-plugin with arguments to allow changing environment variables which is no longer allowed from JDK 16
(Caused problems with SystemLambda.WithEnvironmentVariables.execute() in AppTest.java)
Known Problem in com.github.stefanbirkner.systemlambda.SystemLambda: stefanbirkner/system-lambda#23