[ 
https://jira.codehaus.org/browse/MCOMPILER-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=300068#comment-300068
 ] 

Jason van Zyl commented on MCOMPILER-172:
-----------------------------------------

@Andrew if we release and then update the defaults in Maven we should mitigate 
the 2.5 version not working. If we do this soon enough there probably won't be 
many people affect. We'll just tell people to stay away from 2.5.
                
> Breaking change to plexus compiler api 1.9
> ------------------------------------------
>
>                 Key: MCOMPILER-172
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-172
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>            Reporter: Olivier Lamy
>            Assignee: Jason van Zyl
>             Fix For: 2.6
>
>         Attachments: groovy-project-with-new-plexus-compiler.zip
>
>
> 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

        

Reply via email to