Andrew Eisenberg created MNG-5291:
-------------------------------------
Summary: Breaking change to plexus compiler api 2.9
Key: MNG-5291
URL: https://jira.codehaus.org/browse/MNG-5291
Project: Maven 2 & 3
Issue Type: Bug
Components: Plugin API
Reporter: Andrew Eisenberg
Attachments: groovy-project-with-new-plexus-compiler.zip
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:
{code}
CompilerConfiguration.getCustomCompilerArguments() returns LinkedHashMap
{code}
in 1.9:
{code}
CompilerConfiguration.getCustomCompilerArguments() returns Map<String, String>
{code}
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:
{code}
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;
{code}
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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira