Skip to content

Commit 012c8a9

Browse files
authored
Setup to do drops straight from travis (#69)
Add files to do a drop from here
1 parent 2c2d0fe commit 012c8a9

File tree

4 files changed

+51
-6
lines changed

4 files changed

+51
-6
lines changed

.travis.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,20 @@ jdk:
77

88
before_install:
99
- sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml
10+
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
11+
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
12+
- git clone git://github.com/cose-wg/Examples Examples
1013

1114
script:
12-
- git clone git://github.com/cose-wg/Examples Examples
1315
- ls
1416
- mvn test -B
15-
17+
18+
deploy:
19+
-
20+
provider: script
21+
script: ./travis/deploy.sh
22+
skip_cleanup: true
23+
on:
24+
repro: Com.AugustCellars.Com/coase-java
25+
tags: true
26+
jdk: oraclejdk8

.travis/deploy.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
if [ ! -z "$TRAVIS_TAG" ]
2+
then
3+
echo "on a tag -> set pom.xml <version> to $TRAVIS_TAG"
4+
mvn --settings .travis/settings.xml org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=$TRAVIS_TAG 1>/dev/null 2>/dev/null
5+
else
6+
echo "not on a tag -> keep snapshot version in pom.xml"
7+
fi
8+
9+
mvn clean deploy --settings .travis/settings.xml -DskipTests=true -B -U

.travis/settings.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
<servers>
6+
<server>
7+
<!-- Maven Central Deployment -->
8+
<id>ossrh</id>
9+
<username>${env.SONATYPE_USERNAME}</username>
10+
<password>${env.SONATYPE_PASSWORD}</password>
11+
</server>
12+
</servers>
13+
<profiles>
14+
<profile>
15+
<id>ossrh</id>
16+
<activation>
17+
<activeByDefault>true</activeByDefault>
18+
</activation>
19+
<properties>
20+
<gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable>
21+
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
22+
</properties>
23+
</profile>
24+
</profiles>
25+
</settings>

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
<plugin>
147147
<groupId>org.apache.maven.plugins</groupId>
148148
<artifactId>maven-gpg-plugin</artifactId>
149-
<version>1.5</version>
149+
<version>1.6</version>
150150
<executions>
151151
<execution>
152152
<id>sign-artifacts</id>
@@ -161,7 +161,7 @@
161161
<plugin>
162162
<groupId>org.apache.maven.plugins</groupId>
163163
<artifactId>maven-javadoc-plugin</artifactId>
164-
<version>2.9.1</version>
164+
<version>3.0.0</version>
165165
<configuration>
166166
<bottom>COSE for Java documentation, generatedin {currentYear}.</bottom>
167167
</configuration>
@@ -178,7 +178,7 @@
178178
<plugin>
179179
<groupId>org.apache.maven.plugins</groupId>
180180
<artifactId>maven-source-plugin</artifactId>
181-
<version>2.2.1</version>
181+
<version>3.0.1</version>
182182
<executions>
183183
<execution>
184184
<id>attach-sources</id>
@@ -192,7 +192,7 @@
192192
<plugin>
193193
<groupId>org.sonatype.plugins</groupId>
194194
<artifactId>nexus-staging-maven-plugin</artifactId>
195-
<version>1.6.7</version>
195+
<version>1.6.8</version>
196196
<extensions>true</extensions>
197197
<configuration>
198198
<serverId>ossrh</serverId>

0 commit comments

Comments
 (0)