Friday, December 26, 2014

A Simple Maven Command to Upload Binaries to Nexus

Assuming you've a repository named releases

settings.xml
<servers>
    <server>
      <id>releases</id>
      <username>deployment</username>
      <password>deployment</password>
    </server>
  </servers> 
Execute this to upload

mvn -X deploy:deploy-file -Durl=http://<nexus host>/nexus/content/repositories/releases -DrepositoryId=releases -DgroupId=com.example -DartifactId=app -Dversion=1.0.0 -Dpackaging=zip-Dfile=app.1.0.0.zip