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

Add support for maven.compiler.release/testRelease #167

Merged
merged 1 commit into from
Sep 23, 2020

Conversation

joschi
Copy link
Contributor

@joschi joschi commented May 13, 2020

Add support for the maven.compiler.release and maven.compiler.testRelease properties which can be used to since Java 9 to provide the --release argument for the Java compiler.

The release version (releaseVersion, testReleaseVersion) is being used over the target version (targetVersion, testTargetVersion) if it was defined, otherwise the target version is being used.

Add support for the `maven.compiler.release` and
`maven.compiler.testRelease` properties which can be used to since
Java 9 to provide the `--release` argument for the Java compiler.

The release version is being used over the target version if it was
defined, otherwise the target version is being used.

* https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#release
* https://maven.apache.org/plugins/maven-compiler-plugin/testCompile-mojo.html#testRelease
* https://docs.oracle.com/javase/9/tools/javac.htm#GUID-AEEC9F07-CB49-4E96-8BC7-BCC2C7F725C9__GUID-D343F6B4-3FDD-43A8-AD24-43DD70214471
@uschindler
Copy link
Member

Hi @joschi
sorry for the delay. I was not yet able to look into this. I will come back later!
Uwe

@uschindler uschindler self-assigned this May 19, 2020
@uschindler uschindler added this to the 3.1 milestone Jun 3, 2020
@uschindler
Copy link
Member

Hi,
I am not yet sure what should happen if both releaseVersion and targetVersion are set. Maybe ignore this, but throw exception if they differ?

Of course this must also be added to Gradle and possibly Ant. Maybe the logic to handle both properties and possible differences should be moved to the Checker / Signatures class itsself.

Nevertheless I will target this for version 3.1.

Many thanks!

@uschindler uschindler merged commit 6b7b8d7 into policeman-tools:master Sep 23, 2020
@uschindler
Copy link
Member

Thanks @joschi !

@joschi joschi deleted the maven-compiler-release branch September 23, 2020 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants