Skip to content

Instantly share code, notes, and snippets.

@adohe-zz
Forked from thombergs/mvn-deploy.sh
Last active August 29, 2015 14:07
Show Gist options
  • Save adohe-zz/748aba4740f097182815 to your computer and use it in GitHub Desktop.
Save adohe-zz/748aba4740f097182815 to your computer and use it in GitHub Desktop.
mvn -s settings.xml clean javadoc:jar source:jar gpg:sign -Dgpg.passphrase=your_passphrase deploy
mvn clean javadoc:jar source:jar gpg:sign -Dgpg.passphrase=your_passphrase install -D maven.test.skip=true
<distributionManagement>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>sonatype</id>
<username>your_username</username>
<password>your_password</password>
</server>
</servers>
</settings>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment