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

workaround for error: FA³ST Service not compilable with Java16+ #142

Closed
wants to merge 5 commits into from

Conversation

HansMees01
Copy link
Contributor

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

…t variables which is no longer allowed anymore from JDK 16

(Caused problems with SystemLambda.WithEnvironmentVariables.execute() in AppTest.java)
Copy link
Member

@mjacoby mjacoby left a 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>
Copy link
Member

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>
Copy link
Member

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
) which breaks the CI pipeline.
Is there any other way to do this?

Copy link
Contributor Author

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.

@HansMees01 HansMees01 closed this Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants