[ https://issues.apache.org/jira/browse/MCOMPILER-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17907024#comment-17907024 ]
ASF GitHub Bot commented on MCOMPILER-579: ------------------------------------------ mguillem opened a new pull request, #273: URL: https://github.com/apache/maven-compiler-plugin/pull/273 Allow module-version configuration (like in master branch). Following this checklist to help us incorporate your contribution quickly and easily: - [X] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MCOMPILER) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [X] Each commit in the pull request should have a meaningful subject line and body. - [X] Format the pull request title like `[MCOMPILER-XXX] - Fixes bug in ApproximateQuantiles`, where you replace `MCOMPILER-XXX` with the appropriate JIRA issue. Best practice is to use the JIRA issue title in the pull request title and in the first line of the commit message. - [X] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [X] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [X] You have run the integration tests successfully (`mvn -Prun-its clean verify`). If your pull request is about ~20 lines of code you don't need to sign an [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure please ask on the developers list. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [X] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). > JPMS modules and `--module-version` > ----------------------------------- > > Key: MCOMPILER-579 > URL: https://issues.apache.org/jira/browse/MCOMPILER-579 > Project: Maven Compiler Plugin > Issue Type: Bug > Affects Versions: 3.8.1, 3.9.0, 3.10.0, 3.11.0, 3.12.0 > Reporter: Sam Gammon > Priority: Major > > Hello Maven devs, > > I've hit an issue converting some Java libraries to JPMS. Guava is a popular > Java library, built with Maven, and I was working on a PR to add JPMS > support, but got stuck at an issue in the latest Maven version's compiler > plugin: > Maven sets the module version to the project's version, which is sensible for > release versions. But during development, many projects use a string version > convention like HEAD-SNAPSHOT, or 1.0-SNAPSHOT, and these are not valid > values for --module-version. > This also appears to be unconditional behavior[1], making it very hard for > modules to both ship a module descriptor _and_ remain flexible with their > versioning scheme. > For libraries like Guava, this may make JPMS support a non-starter > altogether, because Google may have internal scripts and other infrastructure > which rely on these string versions. Normally that would just be a problem. > But with Guava being the #1 artifact in Core Utilities and #4 in terms of > alltime transitive usage[2] in Maven Central, this means Guava must either: > > * Stay behind on Maven 3.8.0 or earlier > * Avoid shipping a module info > * Change versioning scheme to be numeric in all circumstances > > All seem to be especially poor options, particularly #2, as it would continue > to impact downstream library or application authors who want to package with > `jlink` et al. The transitive closure of Guava being unable to use `jlink` > encompasses a vast amount of the greater Java ecosystem. > > [1]: > [https://github.com/apache/maven-compiler-plugin/blob/74cfc72acae4f55708bca189b2170167e83df6b3/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java#L304-L305] > [2]: [https://mvnrepository.com/artifact/com.google.guava/guava] -- This message was sent by Atlassian Jira (v8.20.10#820010)