2 Replies Latest reply on Nov 29, 2007 10:33 AM by pgier

    Problems with 2.1-jboss-1 version of maven-jar-plugin

    brian.stansberry

      Ourpatched jar plugin is a suspect in build troubles I'm having.

      I'm trying to build JBoss Cache core/2.1.0.CR2 and it always fails with:

      [INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-jar-plugin:2.1-jboss-1:jar': Unable to find the mojo 'org.apache.maven.plugins:maven-jar-plugin:2.1-jboss-1:jar' in the plugin 'org.apache.maven.plugins:maven-jar-plugin'
      org/apache/maven/archiver/MavenArchiveConfiguration

      What I'm doing is:

      mvn install -Dmaven.test.skip.exec=true

      Same problem with 'mvn install -Dmaven.test.skip=true'

      Any ideas? When I run with -e, it reveals the root problem is a CNFE for org.apache.maven.archiver.MavenArchiveConfiguration

        • 1. Re: Problems with 2.1-jboss-1 version of maven-jar-plugin
          pgier

          Hmm, I haven't seen that before.

          Do you have the jboss repositories defined in your settings.xml?
          Are you specifying the 2.1-jboss-1 version of the jar plugin in your pom?

          I will try to reproduce the problem locally.

          • 2. Re: Problems with 2.1-jboss-1 version of maven-jar-plugin
            pgier

            It seems to be a bug in the maven plugin resolution. It looks like it's getting the pom for maven-jar-plugin from the central repo, and then getting the jar from our repo, and then getting confused about which one it has.

            If you explicitly set the version in your pom it seems to resolve the issue. Just add

            <version>2.1</version>

            to the plugin declaration in the pom, and the problem goes away. It also works fine if you set the version to 2.1-jboss-1, so I don't think it's a problem with the patched plugin by itself. Just a problem when you don't set the version and maven doesn't seem to be able to figure out which one to use.

            I created this issue to remind myself to try to fix this when I have time.
            http://jira.jboss.com/jira/browse/JBBUILD-430