Skip to content

Instantly share code, notes, and snippets.

@LenarBad
Last active April 16, 2019 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LenarBad/4b7b04a28ee3ed787303ea07050b30d6 to your computer and use it in GitHub Desktop.
Save LenarBad/4b7b04a28ee3ed787303ea07050b30d6 to your computer and use it in GitHub Desktop.
Maven settings.xml for publishing open source projects
<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-nexus-snapshots</id>
<username>your-sonatype-username</username>
<password>your-sonatype-password</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<username>your-sonatype-username</username>
<password>your-sonatype-password</password>
</server>
<server>
<id>ossrh</id>
<username>your-sonatype-username</username>
<password>your-sonatype-password</password>
</server>
<server>
<id>github</id>
<username>your-github-email</username>
<privateKey>${user.home}/.ssh/id_rsa</privateKey>
<passphrase>github-password</passphrase>
<filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions>
</server>
</servers>
<profiles>
<profile>
<id>gpg-passphrase</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.passphrase>your-gpg-passphrase</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment