4 Replies Latest reply on Mar 28, 2013 9:57 AM by jcoders

    Issues with osgi:install

    jcoders

      Good Morning,

                           I downloaded the beta version of jboss fuse (jboss-fuse-6.0.0.redhat-015) and decided to try out the cbr sample.I run maven command "mvn clean install" and then started up the jboss fuse via commad line.At the karaf command line i tried to do the following

       

      osgi:install -s fab:mvn:org.jboss.fuse.examples/cbr/6.0.0.redhat-015

       

      It stays stuck at that for a while and then throws a error

       

      Error executing command: Error installing bundles: Unable to install bundle fab:mvn:org.jboss.fuse.examples/cbr/6.0.0.redhat-015

       

      When i look at the log file i see the following

       

      org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.jboss.fuse.examples:cbr:pom:6.0.0.redhat-015

       

      Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Could not transfer artifact org.jboss.fuse.examples:project:pom:6.0.0.redhat-015 from repos1 (http://repo.fusesource.com/nexus/content/groups/public): Error transferring file: Connection timed out: connect

          at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:119)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-015]

          at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:819)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-015]

          at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:670)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-015]

          at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:308)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-015]

          at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-015]

          at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:299)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-015]

          ... 32 more

      Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.jboss.fuse.examples:project:pom:6.0.0.redhat-015 from repos1 (http://repo.fusesource.com/nexus/content/groups/public): Error transferring file: Connection timed out: connect

          at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:488)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-015]

          at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:190)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-015]

          at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:115)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-015]

          ... 37 more

       

      I have my local repository in a non standard location and have the value in my settings.xml file.The settings.xml file also has the path to my in company nexus repository from which i had expected the application to pull/resolve the above.I also have the following settings changed in my "org.ops4j.pax.url.mvn.cfg" file

       

      org.ops4j.pax.url.mvn.settings=file:D:/Maven/settings.xml

       

      I am not sure why it is still going out to fusesource to resolve stuff.

        • 1. Re: Issues with osgi:install
          ffang

          Hi,

           

          What's your maven settings.xml looks like?

           

          It should have something like

          <mirrors>

          <mirror>

          <id>nexus</id>

          <mirrorOf>*</mirrorOf>

          <url>http://your_nexus_url</url>

          <layout>default</layout>

          </mirror>

          </mirrors>

           

          which can mirror all maven repo url to your nexus server

           

          Freeman

          • 2. Re: Issues with osgi:install
            jcoders

            Good Morning,

                                 The following is the snippet from my maven file with ref to mirror's

             

            <mirrors>

                    <mirror>

                        <id>FEI_Nexus_Central</id>

                        <name>FEI Nexus mirror of Maven Central</name>

                        <url>http://our comapny's nexus url</url>

                        <mirrorOf>central</mirrorOf>

                    </mirror>

                </mirrors>

            • 3. Re: Issues with osgi:install
              ffang

              Hi,

               

              Your mirror is

               

              <mirrors>

                              <mirror>

                                      <id>FEI_Nexus_Central</id>

                                      <name>FEI Nexus mirror of Maven Central</name>

                                      <url>http://{Company's nexus url here}</url>

                                      <mirrorOf>central</mirrorOf>

                              </mirror>

                      </mirrors>

               

               

               

              It only mirror central maven repo to your company's nexus server, it should be

              <mirrorOf>*</mirrorOf>

              instead, which means mirror all maven repo urls(including the fuse maven repo) your company's nexus server.

               

              Freeman

               

               

              • 4. Re: Issues with osgi:install
                jcoders

                I did the following steps

                 

                1) Cleaned out my local maven repo to start fresh, changed the <mirrorOf>central</mirrorOf> to <mirrorOf>*</mirrorOf>, started up the Fuse IDE and went window>preferences>maven>user settings and hit on update for it to pick up stuff.My pom.xml file threw out a red flag that it couldnt find the following dependency - which tells me the repo we are pointing to via nexus doesnt have that jar/pom file(camel-blueprint) ?

                 

                <dependency>

                            <groupId>org.apache.camel</groupId>

                            <artifactId>camel-blueprint</artifactId>

                            <version>2.10.0.fuse-71-047</version>

                            <scope>provided</scope>

                        </dependency>

                 

                when i change <mirrorOf>*</mirrorOf> back to <mirrorOf>central</mirrorOf> it seems to pick it up, maybe becoz i have proxy settings setup on the ide, so it goes out to the world n gets it ?

                 

                I think the issue is IDE using proxy versus command line running of server not using any proxy(settings.xml file has no proxy info in it) ? I will disable the proxy settings in the IDE and add them to the settings.xml instead and see if it works