7 Replies Latest reply on Nov 28, 2007 8:39 AM by rg64

    Maven dependency problem w/FUSE ESB 3.3.0.5 Samples Camel Simple SU

    rg64

      I receive the following error attempting to invoke the maven goal "dependency:go-offline" for the FUSE ESB 3.3.0.5 Samples Camel Simple SU. Any suggestions?

       

      - Ron

       

      C:\development\java\apache-servicemix-3.3.0.5-fuse\src\samples\camel\camel-simple-su>mvn dependency:go-offline
      
      [INFO] Scanning for projects...
      [INFO] Searching repository for plugin with prefix: 'dependency'.
      [INFO] ----------------------------------------------------------------------------
      [INFO] Building ServiceMix :: Samples :: Camel :: Simple SU
      [INFO]    task-segment: [dependency:go-offline]
      [INFO] ----------------------------------------------------------------------------
      [INFO] Preparing dependency:go-offline
      [INFO] [dependency:resolve-plugins]
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.
      
      GroupId: org.apache.camel
      ArtifactId: camel-maven-plugin
      Version: RELEASE
      
      Reason: Unable to determine the release version
      
      Try downloading the file manually from the project website.
      
      Then, install it using the command:
          mvn install:install-file -DgroupId=org.apache.camel -DartifactId=camel-maven
      -plugin \
              -Dversion=RELEASE -Dpackaging=maven-plugin -Dfile=/path/to/file
      Alternatively, if you host your own repository you can deploy the file there:
        mvn deploy:deploy-file -DgroupId=org.apache.camel -DartifactId=camel-maven-plu
      gin \
              -Dversion=RELEASE -Dpackaging=maven-plugin -Dfile=/path/to/file \
               -Durl=[url] -DrepositoryId=[id]
      
      
        org.apache.camel:camel-maven-plugin:maven-plugin:RELEASE
      
      
      
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2 seconds
      [INFO] Finished at: Tue Nov 27 11:39:28 EST 2007
      [INFO] Final Memory: 5M/11M
      [INFO] ------------------------------------------------------------------------
      

       

        • 1. Re: Maven dependency problem w/FUSE ESB 3.3.0.5 Samples Camel Simple SU
          bsnyder

          I've filed an issue for this problem (see ESB-62 and have already fixed it. There are two possible solutions to the problem and either one will work:

           

          • Add the following version element like so:

           

          <groupId>org.apache.camel</groupId>
          <artifactId>camel-maven-plugin</artifactId>
          <version>${camel-version}</version>
          

           

          OR

           

          • Comment out the entire plugin element like so:

           

          <!--plugin>
          <groupId>org.apache.camel</groupId>
          <artifactId>camel-maven-plugin</artifactId>
          </plugin-->
          

           

          Either of these solutions will work around the problem.

           

          But I am curious about one thing - why execute the dependency:go-offline goal instead of just executing the install goal? Is there an advantage one way or the other?

           

          Bruce

          • 2. Re: Maven dependency problem w/FUSE ESB 3.3.0.5 Samples Camel Simple SU
            rg64

            In your comment, you mention that either solutions "work around" the problem. What problem are these solutions "working around"? Is there a problem with how the camel-maven-plugin is configured in the Maven repository that is causing this problem?

             

            The Maven dependency:go-offline goal resolves all project dependencies, including plugins and reports and their dependencies. This ensures that that all required artifacts for a build are downloaded into the local Maven repository. This is useful for executing subsequent builds in an offline/disconnected state.

             

            - Ron

            • 3. Re: Maven dependency problem w/FUSE ESB 3.3.0.5 Samples Camel Simple SU
              rg64

              BTW, I suspect some of the other Camel samples may also have this problem. I'll check and confirm shortly.

               

              Also, I am currently unable to see the contents of your checked-in fix. When I click on the SVN link in JIRA ESB-62, I receive the error below. Is that intentional?

               

              - Ron

               

              -


              "Secure Connection Failed

               

              projects.open.iona.com uses an invalid security certificate.

               

              The certificate is only valid for zeus.inthesource.com.

               

              (Error code: ssl_error_bad_cert_domain)

               

                   

              •   This could be a problem with the server's configuration, or it could be

                    someone trying to impersonate the server.

               

                   

              •   If you have connected to this server successfully in the past, the error may

                    be temporary, and you can try again later.

              -


               

              • 4. Re: Maven dependency problem w/FUSE ESB 3.3.0.5 Samples Camel Simple SU
                rg64

                FYI, it appears the other Camel samples are fine.

                 

                Also, I was able to successfully access the Open IONA SVN repository an hour later from a different computer. Not sure what is going there. I'll try to access the SVN repository again from the original problematic computer later today and let you know if there is still a problem.

                 

                Thanks,

                 

                - Ron

                • 5. Re: Maven dependency problem w/FUSE ESB 3.3.0.5 Samples Camel Simple SU
                  bsnyder

                   

                  The Maven dependency:go-offline goal resolves all project dependencies, including plugins and reports and their dependencies. This ensures that that all required artifacts for a build are downloaded into the local Maven repository. This is useful for executing subsequent builds in an offline/disconnected state.

                   

                   

                  Yes, this is true, but the install goal also achieves this task with the added benefit of compiling, packaging and installing the built artifacts into your local repo. The install goal allows you to work in offline mode as well. So I'm trying to understand the benefits of the dependency:go-offline goal vs. the install goal. It seems to me that the install goal achieves the same thing and more.

                   

                  Bruce

                  • 6. Re: Maven dependency problem w/FUSE ESB 3.3.0.5 Samples Camel Simple SU
                    rg64

                    Executing the dependency:go-offline goal causes some artifacts to be placed in the local repository that executing the install goal doesn't. Using apache-servicemix-3.3.0.5-fuse as an example, below I have listed a few artifacts that get placed in the local repository by executing dependency:go-offline and not install:

                     

                    cobertura\cobertura\cobertura-1.8.jar

                    urbanophile\java-getopt\1.0.9\java-getopt-1.0.9.jar

                    org\apache\maven\maven-plugin-surrogate-parent\5\maven-plugin-surrogate-parent-5.pom

                     

                    OTOH, executing the install goal causes its own set of artifacts to be placed in the local repository that executing the dependency:go-offline goal doesn't. So, I routinely execute both goals to ensure my local repository is "fully populated" in order to support subsequent disconnected operations.

                     

                    Does that make sense?

                     

                    - Ron

                    • 7. Re: Maven dependency problem w/FUSE ESB 3.3.0.5 Samples Camel Simple SU
                      bsnyder

                       

                      Does that make sense?

                       

                       

                      Not completely, no. So I did some digging and it seems that the dependency:go-offline goal downloads all dependencies for a project without going through the compilation phases, etc. Now I'm seeing the benefit of still downloading dependencies for a project even if the build is broken.

                       

                      Bruce