Skip to content

Commit

Permalink
Add automated SNAPSHOT deployment with Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Jun 6, 2017
1 parent 8c257c0 commit 0a6345a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ language: java
cache:
directories:
- $HOME/.m2
script:
- echo '<settings><servers><server><id>sonatype-nexus-snapshots</id><username>${env.CI_DEPLOY_USERNAME}</username><password>${env.CI_DEPLOY_PASSWORD}</password></server></servers></settings>' > $HOME/settings.xml
- [ "$TRAVIS_PULL_REQUEST" == "false" ] && export MAVEN_PHASE=deploy || export MAVEN_PHASE=install
- mvn $MAVEN_PHASE -B -U -s $HOME/settings.xml
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,21 @@
</dependency>
</dependencies>

<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>

<build>
<finalName>${project.artifactId}</finalName>
<plugins>
Expand Down

0 comments on commit 0a6345a

Please sign in to comment.