Created
October 2, 2013 11:28
-
-
Save laszlomiklosik/6792336 to your computer and use it in GitHub Desktop.
Upload artifact to protected Maven group repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Precondition: you must have the credentials for serverId thirdparty defined in your settings.xml file like this: | |
# | |
# <servers> | |
# <server> | |
# <id>thirdparty</id> | |
# <username>your_username_goes_here</username> | |
# <password>your_password_goes_here</password> | |
# </server> | |
# ... | |
# </servers> | |
# Note: if you receive 401, you do not have enough rights in the group repository (Nexus, Artifactory - whichever you use) | |
# option 1: with generated POM | |
mvn deploy:deploy-file -Dfile=your_file.jar -Durl=http://your_maven_repo_host/content/repositories/thirdparty -DrepositoryId=thirdparty -DgroupId=desired.group.id -DartifactId=desire4dArtifactId -Dversion=desiredVersion -Dpackaging=jar -DgeneratePom=true | |
# option 2: also upload existing POM | |
mvn deploy:deploy-file -Dfile=your_file.jar -Durl=http://your_maven_repo_host/content/repositories/thirdparty -DrepositoryId=thirdparty -Dpackaging=jar -DgeneratePom=false -DpomFile=your_pom.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment