Details
-
Type:
Test
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Duplicate
-
Labels:None
-
Number of attachments :
Description
The release of the plexus-compiler-api version 2.9 and release of the maven-compiler-plugin 2.5 has broken backwards compatibility. See GRECLIPSE-1441.
in 1.8.1:
CompilerConfiguration.getCustomCompilerArguments() returns LinkedHashMap
in 1.9:
CompilerConfiguration.getCustomCompilerArguments() returns Map<String, String>
This means that a plugins compiled against one version will not work
against the other (java.lang.NoSuchMethodError is thrown). Is this
right? Am I missing something or must there be a strict dependency on
plexus-compiler-api (and hence the maven-compiler-plugin)?
I am attaching a failing maven project. When you run mvn clean compile on this project, it will fail with this error:
ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project org.codehaus.groovy: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-compiler-plugin:2.5:compile: java.lang.NoSuchMethodError: org.codehaus.plexus.compiler.CompilerConfiguration.getCustomCompilerArguments()Ljava/util/LinkedHashMap;
If you edit the pom and change the maven-compile-plugin dependency to 2.3.2, the clean compile will succeed.
My suspicion is that if you change the signature of getCustomCompilerArguments to public LinkedHashMap<String, String> getCustomCompilerArguments(), this will succeed.
Issue Links
- relates to
-
GRECLIPSE-1441
Breaking change in plexus compiler api 2.9
-
oh gloups I wanted to move that to Maven Compiler plugin but it sucks grhhh