Joe jonas
Joe jonas

Reputation: 1

Custom library repository artifacts not imported

Sonatype nexus not importing custom project artifacts upon maven clean install.

In Sonatype Nexus, I have created following three repositories:

    1. my-proxy-repo(proxy)
    2. my-parent-repo(hosted)
    3. my-group-repo(group)

So basically (1) is a proxy repository I created in Nexus which points to maven-central and idea is to download all artifacts upon maven install. proxy repository

Repository (2) my-parent-repo is a hosted repository and the parent repository or custom libraries jar which I have created and intend to call and use it in external spring project.

Repository (3) is a group repository which is having both of the above repositories selected. Idea is that I will use this repository to set in my settings.xml under and also tag so that all artifacts from (1) & (2) are downloaded locally in maven.

In the settings.xml, I have pointed to above group repository for mirrors, repository and pluginrepository.

<mirrors>
    <mirror>
      <id>gels-nexus</id>
      <mirrorOf>*</mirrorOf>
      <url>http://192.168.64.130:8081/repository/my-group-repo/</url>
</mirror>
</mirrors>

    <profile>
      <id>gels-nexus</id>
      <repositories>
        <repository>
          <id>gels-nexus</id>
          <url>http://192.168.64.130:8081/repository/my-group-repo/</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
     <pluginRepositories>
        <pluginRepository>
          <id>gels-nexus</id>
          <url>http://192.168.64.130:8081/repository/my-group-repo/</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>

I have created a new spring maven project -> ran "mvn clean install".

I expected all the artifacts from both repository (1) & (2) to be downloaded locally and present under repository folder in .m2 folder.

Issue - Only the proxy repository artifacts pointing to maven-central are downloaded and custom library repository artifacts are not downloaded at all. Tried several steps to debug issue but still unable to import repository (2) artifacts to the project.

Is anyone aware of any missing setup/configuration that is leading to this, then please leave your answer here. Thanks in advance for your efforts.

Upvotes: 0

Views: 62

Answers (0)

Related Questions