3

I am using Nexus OSS to manage my custom binary artifacts. Sometimes I use the "classifier" concept to upload related binaries (i.e. debug/release) with the same GAV coordinates.

Sometimes I would like to upload this binaries at different times. For example, one using Maven and the other using the web GUI (I know this is not ideal but it is necessary at the moment). What I end up doing is manually downloading the first one, and then uploading both using the web API.

The repositories involved have Release policy, and I do not want to change this.

Any better way to achieve this?

Stefan Ferstl
  • 5,135
  • 3
  • 33
  • 41
  • You can easily define a classifier in the POM file of your project. If you need to deploy two artifacts in the same maven module (but with different classifiers), you need to define two ``s for the maven-deploy-plugin. Instead of the Nexus UI you can also use `mvn deploy:deploy-file`. – Stefan Ferstl Dec 06 '15 at 21:13
  • Example of the deploy-file plugin (which also supports classifiers): http://stackoverflow.com/questions/4029532/upload-artifacts-to-nexus-without-maven/4036706#4036706 – Mark O'Connor Dec 07 '15 at 19:26
  • 2
    Thanks for the responses guys, but the problem is that if you try to upload any artifact with a classifier when you have already uploaded the same artifact with another classifier, this will fail. Yes, I know that the normal case would be generating all related artifacts with the same maven pom, but for me it is not possible in some cases. – Eduardo Hernández Dec 07 '15 at 21:58
  • What error message do you get? I deploy some initial files in a first mvn deploy execution. And when I then try to deploy a second file I get "unauthorized" error. – schoenk Aug 05 '16 at 12:37
  • I solved my "unauthorized" error by providing the repositoryId as -D parameter so Maven would use the credentials from the maven settings file. – schoenk Aug 05 '16 at 13:45

0 Answers0