You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "jira-importer (via GitHub)" <gi...@apache.org> on 2025/04/02 08:08:35 UTC

[I] [MPOM-264] Parameterize maven-compiler-plugin with parameter "release" when running on JDK 9+ [maven-apache-parent]

jira-importer opened a new issue, #479:
URL: https://github.com/apache/maven-apache-parent/issues/479

   **[Konrad Windszus](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=kwin)** opened **[MPOM-264](https://issues.apache.org/jira/browse/MPOM-264?redirect=false)** and commented
   
   Instead of using `source` and `target` the new parameter `release` (https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#release) should be used with Java 9+ as that also checks whether the used API is provided in the target Java release (https://docs.oracle.com/javase/9/tools/javac.htm#GUID-AEEC9F07-CB49-4E96-8BC7-BCC2C7F725C9__GUID-D343F6B4-3FDD-43A8-AD24-43DD70214471).
   
   To be able to support both compilation with Java < 9 and above a profile should be used which either configures `source` and `target` or `release`.
   You have  to observe though that the parameter values are different though, as the former supports 1.6, 1.7 and 1.8 while the latter only supports 6, 7 and 8.
   
   
   ---
   
   **Affects:** ASF-23
   
   **Issue Links:**
   - [MNG-6943](https://issues.apache.org/jira/browse/MNG-6943) Activate profile depending of jdk version used in toolchain
   
   - [MPOM-447](https://issues.apache.org/jira/browse/MPOM-447) activate javac's release flag when building with JDK supporting that feature
   
   
   **Remote Links:**
   - [GitHub Pull Request #188
   ](https://github.com/apache/maven-apache-parent/pull/188)
   - [GitHub Pull Request #48
   ](https://github.com/apache/maven-apache-parent/pull/48)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MPOM-264] Parameterize maven-compiler-plugin with parameter "release" when running on JDK 9+ [maven-apache-parent]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #479:
URL: https://github.com/apache/maven-apache-parent/issues/479#issuecomment-2771735752

   **[Konrad Windszus](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=kwin)** commented
   
   [Herve Boutemy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=hboutemy) Any reason why you haven't added this to ASF parent?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MPOM-264] Parameterize maven-compiler-plugin with parameter "release" when running on JDK 9+ [maven-apache-parent]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #479:
URL: https://github.com/apache/maven-apache-parent/issues/479#issuecomment-2771735767

   **[Konrad Windszus](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=kwin)** commented
   
   Fixed in https://github.com/apache/maven-apache-parent/commit/b938653652022a5754d7398168d3f897e55228af.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MPOM-264] Parameterize maven-compiler-plugin with parameter "release" when running on JDK 9+ [maven-apache-parent]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #479:
URL: https://github.com/apache/maven-apache-parent/issues/479#issuecomment-2771735730

   **[Konrad Windszus](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=kwin)** commented
   
   An example approach for this can be found in https://github.com/apache/sling-parent/blob/9480890829a3a8670d5ba0fcb648de9b598a1c86/sling-parent/pom.xml#L535 and https://github.com/apache/sling-parent/blob/9480890829a3a8670d5ba0fcb648de9b598a1c86/sling-parent/pom.xml#L566
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MPOM-264] Parameterize maven-compiler-plugin with parameter "release" when running on JDK 9+ [maven-apache-parent]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #479:
URL: https://github.com/apache/maven-apache-parent/issues/479#issuecomment-2771735741

   **[Slawomir Jaranowski](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=slawekjaranowski)** commented
   
   Done in MPOM-447 for Maven parent
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [MPOM-264] Parameterize maven-compiler-plugin with parameter "release" when running on JDK 9+ [maven-apache-parent]

Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #479:
URL: https://github.com/apache/maven-apache-parent/issues/479#issuecomment-2771735760

   **[Herve Boutemy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=hboutemy)** commented
   
   it is in maven-parent https://github.com/apache/maven-parent/blob/master/pom.xml#L1317
   in fact, I expected others to do it before me, and was surprised it had not been done, I suppose for a reason I did not know :)
   one aspect is 1.x vs x, that I finally took time to document why it is reasonable in MPOM-449
   
   but you're right, it's something that should be done at ASF level, not Maven only
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org