4 Replies Latest reply on Mar 2, 2009 10:07 AM by wjbustraan

    Feature install behind a firewall?

    wjbustraan

      Is there any way to configure ServiceMix 4 to use a proxy?

       

      I'd like to use the 'feature install' commands, but I understand that they connect to the Iona Maven repository in order to download the correct bundles. I need to go through a web proxy in order to get to the Internet. Is there any way to configure this?

        • 1. Re: Feature install behind a firewall?
          gertv

          L.S.,

           

          This should be possible by enabling a proxy in the ~/.m2/settings.xml (cfr. http://maven.apache.org/guides/mini/guide-proxies.html). 

           

          We use Pax URL for accessing the Maven repository and it will default to the Maven settings.  You can also override these and provide a specific settings.xml file for SMX4 by setting the org.ops4j.pax.url.mvn.settings in the etc/org.ops4j.pax.url.mvn.config file.  Have a look at http://wiki.ops4j.org/display/ops4j/PaxURL-+mvn for more information about this.

           

          Regards,

           

          Gert

          • 2. Re: Feature install behind a firewall?
            wjbustraan

            That's puzzling, then. I do have a ~/.m2/settings.xml configured with a proxy. Maven itself and the m2eclipse Eclipse plugin are both able to download files just fine. However, when I try to list installable features from the ServiceMix/FUSE console, it lists nothing.

             

            Any suggestions on any other commands to try? For example, I wanted to install the camel-jms bundle using that method, but ended up manually downloading the jar from the Iona Maven repository and dropping it in the deploy folder. I'd rather use the feature installer functionality, because it sounds like it has dependency resolution.

            • 3. Re: Feature install behind a firewall?
              joe.luo

              I am not sure why you can not list all installable features even though you have configured with a proxy and was able to download some files through the proxy.

               

              Were you able to install a single OSGI bundle that does not have any dependencies through the proxy from your servicemix console? For instance, try to do this from your console to see if it works for you:

              *osgi install -s mvn:org.apache.servicemix.management/org.apache.servicemix.

              management.core/4.0.0-fuse-SNAPSHOT*

               

              If it does not work, then you might need to reconfigure your proxy though.

               

              In addition, you could also add URL from a local file instead of maven repository on the internet. For instance, you could download the feature xml file from:

              http://repo.open.iona.com/maven2/org/apache/servicemix/features/apache-servicemix/4.0.0.4-fuse/apache-servicemix-4.0.0.4-fuse-features.xml onto your local drive (say, E:\download") and then use "file:" protocol instead of "mvn:":

              features addUrl file:///E:/download/apache-servicemix-4.0.0.4-fuse-features.xml

               

              The "file:" protocal also works if you would like to install an OSGI bundle from locally:

              osgi install -s file:///E:/download/some_bundle_file.jar

               

              The camel-jms feature is defined in http://repo.open.iona.com/maven2/org/apache/servicemix/camel/org.apache.servicemix.camel.features/4.0.0.4-fuse/org.apache.servicemix.camel.features-4.0.0.4-fuse-features.xml

               

              Edited by: joeluo on Mar 2, 2009 2:07 PM

              • 4. Re: Feature install behind a firewall?
                wjbustraan

                I'm not certain what has changed, but it started working this morning.

                 

                Here's a sample of the command line:

                 

                -


                servicemix features> list

                  State          Version       Name

                ERROR ConnectException: Connection timed out: connect

                servicemix features> list

                  State          Version       Name

                \[installed  ]  \[      0.0.0] servicemix-validation

                \[uninstalled]  \[      0.0.0] camel-nmr

                \[installed  ]  \[      0.0.0] transaction

                \[installed  ]  \[      0.0.0] servicemix-quartz

                \[installed  ]  \[      0.0.0] servicemix-cxf-bc

                ...

                -


                 

                The two 'list' commands were typed minutes apart and I didn't make any changes to the config.

                 

                Edited by: wjbustraan on Mar 2, 2009 3:06 PM - Fixed formatting issues