3 Replies Latest reply on Mar 6, 2009 10:48 AM by scranton_scranton

    No such method exception trying to bulid a service assembly

    nicolas-duminil

      Greetings,

       

      I've used the maven servicemix-service-assembly archetype to generate a pom. Running mvn package raises:

       

      Exception in thread "main" java.lang.NoSuchMethodError: org.apache.maven.artifact.resolver.ArtifactResolutionResult.setArtifactResolutionNodes(Ljava/util/Set;)V

           at org.apache.servicemix.maven.plugin.jbi.GraphArtifactCollector.collect(GraphArtifactCollector.java:92)

      ..................

       

      The whole fact as well as the pom is attched. Please help !

       

      Many thanks in advance,

       

      Nicolas

        • 1. Re: No such method exception trying to bulid a service assembly
          mielket

          What version of mvn do you use? I just ran mvn install against your attached pom.xml and it works fine. I am running Maven 2.0.9.

           

          Here is the mvn output:

          $ mvn install
          [INFO] Scanning for projects...
          [INFO] artifact org.apache.servicemix.tooling:jbi-maven-plugin: checking for upd
          ates from apache
          [INFO] ------------------------------------------------------------------------
          [INFO] Building Fuse Connectivity SA
          [INFO]    task-segment: [install]
          [INFO] ------------------------------------------------------------------------
          [INFO] [jbi:generate-jbi-service-assembly-descriptor]
          [INFO] Generating jbi.xml
          [INFO] [jbi:generate-depends-file]
          [INFO] Created: c:\Temp\target\classes\META-INF\maven\dependencies.properties
          [INFO] [resources:resources]
          [INFO] Using default encoding to copy filtered resources.
          [INFO] [compiler:compile]
          [INFO] No sources to compile
          [INFO] [resources:testResources]
          [INFO] Using default encoding to copy filtered resources.
          [INFO] [compiler:testCompile]
          [INFO] No sources to compile
          [INFO] [surefire:test]
          [INFO] No tests to run.
          [INFO] [jbi:jbi-service-assembly]
          [INFO] [jar:jar]
          [INFO] Building jar: c:\Temp\target\fuse-connectivity-0.0.1-SNAPSHOT.jar
          [INFO] [install:install]
          [INFO] Installing c:\Temp\target\fuse-connectivity-0.0.1-SNAPSHOT.jar to C:\Temp
          \.m2\repository\fr\rsi\fuse\fuse-connectivity\0.0.1-SNAPSHOT\fuse-connectivity-0
          .0.1-SNAPSHOT.zip
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD SUCCESSFUL
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 28 seconds
          [INFO] Finished at: Tue Mar 03 15:53:23 CET 2009
          [INFO] Final Memory: 16M/29M
          [INFO] ------------------------------------------------------------------------
          

           

          Edited by: tmielke on Mar 3, 2009 2:54 PM

          • 2. Re: No such method exception trying to bulid a service assembly
            martinmurphy

            By any chance are you using m2eclipse? This uses the latest version of maven embedded in the feature. If you set this to an external maven installation (using maven 2.0.9) this should go away.

            • 3. Re: No such method exception trying to bulid a service assembly
              scranton_scranton

              Nicholas,

               

              If you are using the latest m2eclipse, you'll need to upgrade the version of the jbi-maven-plugin in your pom.xml to the latest (4.0.0.2-fuse is the version I've been using successfully). It works correctly with both ServiceMix 3.4 and 4.0 builds from my experience.

               

              I can't find a good link to what the core issue was, something about changes in the latest m2eclipse...

               

              Hope this helps,

              Scott