[ 
https://issues.apache.org/jira/browse/MCOMPILER-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17754365#comment-17754365
 ] 

Bruno Medeiros commented on MCOMPILER-446:
------------------------------------------

Ticket was closed with:
>  As described in the JIRA ticket, the maven-compiler-plugin should always use 
> --module-version based on the project version.

Given it's in the original description that:
> Because we set versions in pom to local-SNAPHOT

 

This issue was never about setting a different version, it's was suggested as a 
workaround, it was about `maven-compiler-plugin` crashing when a non-semver 
version is being used.

> JDK-8250678 fixed with Java 18
This is an upstream issue, then? No fixes for Java 17 should be expected, right?

> Compiler is crashing while setting JPMS module version
> ------------------------------------------------------
>
>                 Key: MCOMPILER-446
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-446
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.8.1
>            Reporter: Bruno Medeiros
>            Assignee: Robert Scholte
>            Priority: Major
>
> I have upgraded maven compiler plugin to 3.8.1 and I started getting this 
> error:
> {code:java}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile 
> (default-compile) on project common: Fatal error compiling: error: bad value 
> for --module-version option: 'local-SNAPSHOT' -> [Help 1]{code}
> Because we set versions in pom to local-SNAPHOT (and use maven-version-plugin 
> when we actually realease to set a proper version), all our builds are 
> failing locally.
> It seems javac does not like versions that do not have just alpha characters, 
> like ours local-SNAPHOT.
> I thought about a few ways to fix that:
>  * Allow the use of --module-version to be optional through config
>  * Allow the version itself to be configurable
>  * Validate if the version is a valid version for --module-version and not 
> set it in case it is not
> Let me know what you guys think, I can try to provide a PR with the given 
> solution.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to