[
https://issues.apache.org/jira/browse/MPLUGIN-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Scholte updated MPLUGIN-373:
-----------------------------------
Fix Version/s: (was: 3.6.2)
> Java 16 features not supported by maven-plugin-plugin:3.6.1
> ------------------------------------------------------------
>
> Key: MPLUGIN-373
> URL: https://issues.apache.org/jira/browse/MPLUGIN-373
> Project: Maven Plugin Tools
> Issue Type: Bug
> Components: Plugin Plugin
> Affects Versions: 3.6.1
> Environment: Linux Mint 21.0 Cinnamon, Linux Kernel 5.4.0-71-generic,
> arch amd64, OpenJDK 16.0.1, Apache Maven 3.6.3.
> Reporter: Maciej Gorywoda
> Priority: Major
>
> Even though compilation works, `mvn install` fails with:
> {noformat}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor
> (default-descriptor) on project maven-plugin-minimal: Execution
> default-descriptor of goal
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor failed: syntax
> error @[27,1] in
> [file:/home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java|file:///home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java]
> -> [Help 1]
> {noformat}
> That syntax error @[27,1] is
> ```
> {color:#0033b3}record
> {color}{color:#000000}KaBoom{color}({color:#000000}String {color}foo) {}
> ```
> Tested on openjdk-16 and graalvm-21.1.0 for Java 16.
> {color:#0033b3}maven-compiler-plugin version: 3.8.1{color}
> {color:#0033b3}maven-plugin-plugin version: 3.6.1{color}
> I made a minimal example and put it on GitHub:
> [https://github.com/makingthematrix/maven-plugin-minimal]
> And here are the logs:
> —
> {noformat}
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ java
> -version
> openjdk version "16.0.1" 2021-04-20
> OpenJDK Runtime Environment (build 16.0.1+9-24)
> OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn
> --version
> Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
> Maven home: /opt/mvn
> Java version: 16.0.1, vendor: Oracle Corporation, runtime: /opt/jdk-16.0.1
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "5.4.0-71-generic", arch: "amd64", family: "unix"
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn clean
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --------------< io.makingthematrix:maven-plugin-minimal
> >---------------
> [INFO] Building Maven Plugin Minimal 0.0.1
> [INFO] ----------------------------[ maven-plugin
> ]----------------------------
> [INFO]
> [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ maven-plugin-minimal
> —
> [INFO] Deleting /home/makingthematrix/workspace/maven-plugin-minimal/target
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 0.184 s
> [INFO] Finished at: 2021-04-30T19:07:36+02:00
> [INFO]
> ------------------------------------------------------------------------
>
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn compile
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --------------< io.makingthematrix:maven-plugin-minimal
> >---------------
> [INFO] Building Maven Plugin Minimal 0.0.1
> [INFO] ----------------------------[ maven-plugin
> ]----------------------------
> [INFO]
> [INFO] — maven-resources-plugin:2.6:resources (default-resources) @
> maven-plugin-minimal —
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory
> /home/makingthematrix/workspace/maven-plugin-minimal/src/main/resources
> [INFO]
> [INFO] — maven-compiler-plugin:3.8.1:compile (default-compile) @
> maven-plugin-minimal —
> [INFO] Changes detected - recompiling the module!
> [WARNING] File encoding has not been set, using platform encoding UTF-8,
> i.e. build is platform dependent!
> [INFO] Compiling 1 source file to
> /home/makingthematrix/workspace/maven-plugin-minimal/target/classes
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1.262 s
> [INFO] Finished at: 2021-04-30T19:08:15+02:00
> [INFO]
> ------------------------------------------------------------------------
>
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn install
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --------------< io.makingthematrix:maven-plugin-minimal
> >---------------
> [INFO] Building Maven Plugin Minimal 0.0.1
> [INFO] ----------------------------[ maven-plugin
> ]----------------------------
> [INFO]
> [INFO] — maven-resources-plugin:2.6:resources (default-resources) @
> maven-plugin-minimal —
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory
> /home/makingthematrix/workspace/maven-plugin-minimal/src/main/resources
> [INFO]
> [INFO] — maven-compiler-plugin:3.8.1:compile (default-compile) @
> maven-plugin-minimal —
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] — maven-plugin-plugin:3.6.1:descriptor (default-descriptor) @
> maven-plugin-minimal —
> [WARNING] Using platform encoding (UTF-8 actually) to read mojo source
> files, i.e. build is platform dependent!
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1.044 s
> [INFO] Finished at: 2021-04-30T19:08:44+02:00
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor
> (default-descriptor) on project maven-plugin-minimal: Execution
> default-descriptor of goal
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor failed: syntax
> error @[27,1] in
> [file:/home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java|file:///home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java]
> -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
> [ERROR] [Help 1]
> [http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException]
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)