Downloading transitive dependency using nexus

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Downloading transitive dependency using nexus

nchaurasia
I recently set up nexus on my windows7 machine. I have made following entry in settings.xml for maven.

<mirror>
       
        <id>nexus</id>
        <mirrorOf>*</mirrorOf>
        <url>http://localhost:8081/nexus/content/repositories/central</url>
</mirror>

<profile>
        <id>nexus</id>
       
       
        <repositories>
        <repository>
        <id>central</id>
        <url>http://central</url>
        <releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
    <snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>       
        </repository>
        </repositories>
        <pluginRepositories>
        <pluginRepository>
        <id>central</id>
        <url>http://central</url>
        <releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
    <snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
        </pluginRepository>
        </pluginRepositories>
</profile>

<activeProfiles>
       
        <activeProfile>nexus</activeProfile>
</activeProfiles>

When i run mvn clean install for one of my maven project, i can see that download is happening via nexus.

But during download, it failed to download  plexus-digest jar file. In order to fix the problem, i created a proxy repository and specified http://central.maven.org/maven2/org/codehaus/plexus/plexus-digest/1.0/ as remote storage location. After that i added the proxy to a group and was able to download the required jars successfully.

My question is that do i need to do this for all jars that are failing to download.

Please refer to attached screenshot for details.

proxy repository

Group           

Reply | Threaded
Open this post in threaded view
|

Re: Downloading transitive dependency using nexus

Jeff
I'm no expert and may be doing it wrong but in my settings.xml I don't have a specific repository listed for "central" since I'm mirroring everything '*' in my Nexus installation.

In my Nexus install, I have a Repository Group defined for my organization at the URL http://nexus.myorg.com/nexus/content/groups/myorg/.

I added proxies for all needed external repositories (central, java.net, jboss, codehaus, etc.) to the repository group.  Once that is done, my settings look like the following and everything seems to pull from my internal Nexus repository group just fine.

<?xml version="1.0" encoding="UTF-8"?>
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance

  <pluginGroups>
  </pluginGroups>

  <proxies>
  </proxies>

  <servers>
  </servers>

  <mirrors>
    <mirror>
      <id>myOrg</id>
      <mirrorOf>*</mirrorOf>
      <name>My Internal Repository</name>
    </mirror>
  </mirrors>
  
  <profiles>
      <profile>
      <id>myorg</id>
    <repositories>
        <repository>
          <id>myorg-artifact-repo</id>
          <name>My Internal Artifact Repository</name>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy>warn</checksumPolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy>warn</checksumPolicy>
          </snapshots>
          <layout>default</layout>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository> 
          <id>myorg-plugin-repo</id>
          <name>My Internal Plugin Repository</name>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy>warn</checksumPolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy>warn</checksumPolicy>
          </snapshots>
          <layout>default</layout>
        </pluginRepository>
      </pluginRepositories>
    </profile>
   </profiles>

    <activeProfiles>
        <activeProfile>myorg</activeProfile>
    </activeProfiles>
</settings>



On Mon, May 5, 2014 at 9:33 PM, nchaurasia <[hidden email]> wrote:
I recently set up nexus on my windows7 machine. I have made following entry
in settings.xml for maven.

<mirror>

        <id>nexus</id>
        <mirrorOf>*</mirrorOf>
        <url>http://localhost:8081/nexus/content/repositories/central</url>
</mirror>

<profile>
        <id>nexus</id>


        <repositories>
        <repository>
        <id>central</id>
        <url>http://central</url>

<releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>

<snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
        </repository>
        </repositories>
        <pluginRepositories>
        <pluginRepository>
        <id>central</id>
        <url>http://central</url>

<releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>

<snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
        </pluginRepository>
        </pluginRepositories>
</profile>

<activeProfiles>

        <activeProfile>nexus</activeProfile>
</activeProfiles>

When i run mvn clean install for one of my maven project, i can see that
download is happening via nexus.

But during download, it failed to download  plexus-digest jar file. In order
to fix the problem, i created a proxy repository and specified
http://central.maven.org/maven2/org/codehaus/plexus/plexus-digest/1.0/ as
remote storage location. After that i added the proxy to a group and was
able to download the required jars successfully.

My question is that do i need to do this for all jars that are failing to
download.

Please refer to attached screenshot for details.

<http://maven.40175.n5.nabble.com/file/n5792704/proxy-repository.png>

<http://maven.40175.n5.nabble.com/file/n5792704/group.png>





--
View this message in context: http://maven.40175.n5.nabble.com/Downloading-transitive-dependency-using-nexus-tp5792704.html
Sent from the Nexus Maven Repository Manager Users List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




--
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent