0

My team has a process that builds and uploads artifacts to nexus2 repository. I am working on moving this process to upload to a nexus3 repository.

we don't have control of either of the nexus repository settings and its at enterprise level.

In the new upload process, directory structure does not seem correct. For each artifact of the same version it uploads in the new directory.

com
  | x
    | y
      | artifactId
                 | 0.1.0-SNAPSHOT 
                                | maven-metadata.xml
                 | 0.1.0-20180603.101010-1
                                | jar, pom  
                 | 0.1.0-20180603.111539-2
                                | jar, pom 
                 | 0.2.0-SNAPSHOT
                                | maven-metadata.xml

However, nexus2 has below format which I think is correct.

com
  | x
    | y
      | artifactId
                 | 0.1.0-SNAPSHOT 
                                | maven-metadata.xml
                                | 0.1.0-20180603.101010-1 jar, pom                              
                                | 0.1.0-20180603.111539-2 jar, pom
                 | 0.2.0-SNAPSHOT
                                | maven-metadata.xml

we use gradle to manage dependencies and build. nothing is changing in my build.gradle except the repository location.

group='com.x.y'
artifactId='artifactId'
version='0.1.0-SNAPSHOT'
uploadArchives {
  repositories {
    mavenDeployer {
      snapshotRepository(url:/nexus2/mvn-snapshot OR /nexus3/mvn-snapshot) {
        authentication(userName: nexusUsername, password: nexusPassword)
      }
    }
  }
}

Can you please help see if I am missing something or there could be something I can ask to be changed in nexus3 maven repository.

Here is the error I get when fetching artifact.

    > Could not find com.x.y:artifactId:0.1.0-SNAPSHOT.
     Searched in the following locations:

https://nexus3/maven-snapshot/com/x/y/artifactId/0.1.0-SNAPSHOT/maven-metadata.xml
https://nexus3/maven-snapshot/com/x/y/artifactId/0.1.0-SNAPSHOT/artifactId-0.1.0-SNAPSHOT.pom
https://nexus3/maven-snapshot/com/x/y/artifactId/0.1.0-SNAPSHOT/artifactId-0.1.0-SNAPSHOT.jar

Thanks very much in advance!

mediumpike
  • 33
  • 7

0 Answers0