Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin fails with Maven 3.1 - An API incompatibility was encountered during configuration of mojo #571

Closed
krotscheck opened this issue Aug 1, 2013 · 6 comments

Comments

@krotscheck
Copy link

Maven 3.1 was recently released and propagated via homebrew. The following output has been observed. Given the command mvn flyway:clean and the following pom:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>mygroup</groupId>
    <artifactId>MyArtifact</artifactId>
    <version>0.1.0-SNAPSHOT</version>

    <packaging>pom</packaging>

    <build>
        <plugins>
            <plugin>
                <groupId>com.googlecode.flyway</groupId>
                <artifactId>flyway-maven-plugin</artifactId>
                <version>2.2</version>
            </plugin>
        </plugins>
    </build>
</project>

The following output has been observed:

Under maven 3.0.5:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building MyArtifact 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- flyway-maven-plugin:2.2:clean (default-cli) @ MyArtifact ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.984s
[INFO] Finished at: Wed Jul 31 21:00:16 PDT 2013
[INFO] Final Memory: 7M/148M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.googlecode.flyway:flyway-maven-plugin:2.2:clean (default-cli) on project MyArtifact: The parameters 'url' for goal com.googlecode.flyway:flyway-maven-plugin:2.2:clean are missing or invalid -> [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/PluginParameterException

Under maven 3.1

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building MyArtifact 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- flyway-maven-plugin:2.2:clean (default-cli) @ MyArtifact ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.701s
[INFO] Finished at: Wed Jul 31 20:57:55 PDT 2013
[INFO] Final Memory: 8M/148M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.googlecode.flyway:flyway-maven-plugin:2.2:clean (default-cli) on project MyArtifact: An API incompatibility was encountered during configuration of mojo com.googlecode.flyway:flyway-maven-plugin:2.2:clean: java.lang.NoSuchMethodError: org.codehaus.plexus.component.configurator.converters.special.ClassRealmConverter.<init>(Lorg/codehaus/classworlds/ClassRealm;)V
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>com.googlecode.flyway:flyway-maven-plugin:2.2
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/mKrotscheck/.m2/repository/com/googlecode/flyway/flyway-maven-plugin/2.2/flyway-maven-plugin-2.2.jar
[ERROR] urls[1] = file:/Users/mKrotscheck/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[2] = file:/Users/mKrotscheck/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[3] = file:/Users/mKrotscheck/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
[ERROR] urls[4] = file:/Users/mKrotscheck/.m2/repository/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar
[ERROR] urls[5] = file:/Users/mKrotscheck/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar
[ERROR] urls[6] = file:/Users/mKrotscheck/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.2.1/maven-reporting-api-2.2.1.jar
[ERROR] urls[7] = file:/Users/mKrotscheck/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.1/doxia-sink-api-1.1.jar
[ERROR] urls[8] = file:/Users/mKrotscheck/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar
[ERROR] urls[9] = file:/Users/mKrotscheck/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar
[ERROR] urls[10] = file:/Users/mKrotscheck/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[11] = file:/Users/mKrotscheck/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[12] = file:/Users/mKrotscheck/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[13] = file:/Users/mKrotscheck/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.15/plexus-utils-1.5.15.jar
[ERROR] urls[14] = file:/Users/mKrotscheck/.m2/repository/com/googlecode/flyway/flyway-core/2.2/flyway-core-2.2.jar
[ERROR] urls[15] = file:/Users/mKrotscheck/Desktop/foo/target/test-classes
[ERROR] urls[16] = file:/Users/mKrotscheck/Desktop/foo/target/classes
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] -> [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/PluginConfigurationException
@axelfontaine
Copy link
Contributor

Thanks for pointing this out! Fixed.

@krotscheck
Copy link
Author

You're welcome!

@rreimann
Copy link

rreimann commented Aug 6, 2013

@axelfontaine are there any plans on a short-term 2.2.x release containing this fix?

@axelfontaine
Copy link
Contributor

Yes, probably by the end of this week as I'll be on holiday after that.

@sanchitbahal
Copy link

@axelfontaine Has this already been released? I am using flyway-maven-plugin v2.2 which still seems to have problem with Maven 3.1.

@axelfontaine
Copy link
Contributor

Not yet. I was on holiday. Should be out soon though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants