Skip to content

Instantly share code, notes, and snippets.

@pietrom
Last active October 13, 2015 13:28
Show Gist options
  • Save pietrom/4202799 to your computer and use it in GitHub Desktop.
Save pietrom/4202799 to your computer and use it in GitHub Desktop.
How to deploy a maven artifact into a local repository providing sources and javadoc
#!/bin/bash
groupId=$1
artifactId=$2
version=$3
repo=$4
mvn org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file -Durl=$repo -DgroupId=$groupId -DartifactId=$artifactId -Dversion=$version -Dfile=target/$artifactId-$version.jar -Djavadoc=target/$artifactId-$version-javadoc.jar -Dsources=target/$artifactId-$version-sources.jar -Dpackaging=jar -DpomFile=pom.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment