Maven – Upload artifacts to Repositories

Posted by

mvn deploy:deploy-file -Durl=$REPOSITORY_URL -DrepositoryId=$REPOSITORY_ID -Dfile=$ARTIFACT_FILE_PATH -DpomFile=$ARTIFACT_POM_FILE -DgroupId=$ARTIFACT_GROUP_ID -DartifactId=$ARTIFACT_ID -Dversion=$ARTIFACT_VERSION -Dpackaging=jar or plugin -DgeneratePom=false

Eg : Uploading maven plugin/jar

deploy:deploy-file -Durl=http://mvnrepositories.com/artifact/test-snapshots/ -DrepositoryId=test-snapshots -Dfile=test-1.0-SNAPSHOT.jar -DpomFile=test-1.0-SNAPSHO.pom -DgroupId=com.test -DartifactId=test -Dversion=1.0-SNAPSHOT -Dpackaging=maven-plugin -DgeneratePom=false
deploy:deploy-file -Durl=http://mvnrepositories.com/artifact/test-repositories/ -DrepositoryId=test-repositories -Dfile=test-1.0-SNAPSHOT.jar -DgroupId=com.test -DartifactId=test -Dversion=1.0-SNAPSHOT -Dpackaging=jar

Leave a Reply

Your email address will not be published.