4 Replies Latest reply on Nov 19, 2013 12:33 PM by baluyot

    Fabric maven proxy settings: how to specify internet proxy user + password

    alstsever_alain.saint-sever

      Hi,

       

      I've installed Fuse ESB Enterprise + FMC. My maven installation is ok (I use a corporate Nexus repository server but I can also bypass it using my internet proxy account).

       

      My issue: the fabric agent in my child container can't resolve the feature and artifacts for the 'example-camel' profile (I use FMC to provision the profile). The maven repositories are correctly set (I can see in the log the fabric agent trying each repository) so it is clearly about the credentials and my internet access.

       

       

      1) How can I give the Fabric agent my credentials or tell him to use my Nexus server?

       

      2) I don't really understand the role of the etc/org.fusesource.fabric.maven.cfg file. The useful settings seem to be in 'org.fusesource.fabric.agent'.

      Moreover, the config:list command only displays 'org.fusesource.fabric.maven' content in the root ESB instance but it is missing from the child containers (not present in their etc folders nor by running the config:list command in the child containers shell). Can you provide some explanations regarding this org.fusesource.fabric.maven.cfg file and how/when the fabric agent deals with it?

       

      Thank you.

        • 1. Re: Fabric maven proxy settings: how to specify internet proxy user + password
          iocanel

          How can I give the Fabric agent my credentials or tell him to use my Nexus server?

           

          The fabric agent will use the repositories defined in org.fusesource.fabric.agent pid. The credentials can be specified as part of the repo url with a format similar to http://username:password@host:port. You can use this format to specify your nexus repo there.

           

          On top of the list of repositories in org.fusesource.fabric.agent, fabric will also find all the fabric-maven-proxies registered and use them too. In fact the fabric-maven-proxies will be looked before the actual list of repos.

           

          I don't really understand the role of the etc/org.fusesource.fabric.maven.cfg

           

          This is used to configure the fabric-maven-proxy. The purpose of the fabric-maven-proxy is to play the role of a simple maven repository manager (download/upload artifacts) so that the containers in the cluster can use them.

           

          The fabric-maven-proxy can be configured to act as a proxy to existing remote repositories (configured inside org.fusesource.fabric.maven). The fabric-maven-proxy will run on any container that has the fabric-maven-proxy feature installed (the root container will by default install that feature). So you will only see the org.fusesource.fabric.maven pid on containers that run this feature.

           

          An other option you have is to specify your nexus repo inside the org.fusesource.fabric.maven pid in the containers that run as fabric-maven-proxies.

           

          Example: Any container that needs an artifact will:

          1. Look up for fabric-maven-proxies registered in the fabric registry.

          2. Request the artifact from the fabric-maven-proxy

          3. If not found request the artifact from the repos defined in org.fusesource.fabric.agent.

           

          If you define the nexus repo in the org.fusesource.fabric.maven pid then it will be downloaded on step (2) from the maven proxy.

           

          If you define the nexus repo in the org.fusesource.fabric.agent, the artifact will be downloaded by the fabric-agent directly from the nexus repo. See step (3).

          • 2. Re: Fabric maven proxy settings: how to specify internet proxy user + password
            davsclaus

            Ioannis, these are good answers. I wonder if we should add those as FAQ to the Fuse Fabric docs at

            http://fuse.fusesource.org/fabric/faq.html

            • 3. Re: Fabric maven proxy settings: how to specify internet proxy user + password
              alstsever_alain.saint-sever

              Thank you Ioannis. As Claus suggests it, it would be great to add all this kind of details to the Fabric documentation.

              • 4. Re: Fabric maven proxy settings: how to specify internet proxy user + password
                baluyot

                Sorry to resurrect an old thread but I have a question pertaining to the same subject matter. I created a custom offline repository as specified in one of the Fuse documents. How do I to configure the maven proxy to look for artifacts in the file system where I deploy my custom offline repository. What I'm trying to avoid is having to setup/use a remote repository like Nexus for my fabric profile repository. Any ideas?