Skip to content

Commit 0a6345a

Browse files
committed
Add automated SNAPSHOT deployment with Travis CI
1 parent 8c257c0 commit 0a6345a

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ language: java
66
cache:
77
directories:
88
- $HOME/.m2
9+
script:
10+
- 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
11+
- [ "$TRAVIS_PULL_REQUEST" == "false" ] && export MAVEN_PHASE=deploy || export MAVEN_PHASE=install
12+
- mvn $MAVEN_PHASE -B -U -s $HOME/settings.xml

pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,21 @@
9696
</dependency>
9797
</dependencies>
9898

99+
<repositories>
100+
<repository>
101+
<id>sonatype-nexus-snapshots</id>
102+
<name>Sonatype Nexus Snapshots</name>
103+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
104+
<releases>
105+
<enabled>false</enabled>
106+
</releases>
107+
<snapshots>
108+
<enabled>true</enabled>
109+
<updatePolicy>never</updatePolicy>
110+
</snapshots>
111+
</repository>
112+
</repositories>
113+
99114
<build>
100115
<finalName>${project.artifactId}</finalName>
101116
<plugins>

0 commit comments

Comments
 (0)