Skip to content

Commit 10b348c

Browse files
committed
Merge pull request #104 from brodykenrick/master
Deployment to Nexus Sonatype from Travis CI build
2 parents e1b6048 + fecd299 commit 10b348c

File tree

14 files changed

+236
-32
lines changed

14 files changed

+236
-32
lines changed

.travis.yml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
11
#Build the Arduino Eclipse Plugin using Maven
2+
23
node:
3-
script: mvn verify -Pall,juno,all,kepler,all,luna
4+
#Make quiet to reduce logs (Travis will kill if 4MB log exceeded)
5+
#But not too quiet - see travis_exec_and_print_time.sh (Travis will kill after 10 mins of no output)
6+
#we also need to keep it under 75 mins
7+
script:
8+
#Check if we have access to our Nexus login details.
9+
- sh -c "if $TRAVIS_SECURE_ENV_VARS; then echo Travis SECURE available -- Deploy; else echo Travis SECURE NOT available -- Verify; fi"
10+
11+
#Execute the maven commands depending on SECURE availabilty and print the elapsed time out periodically.
12+
#mvn deploy (or verify) -Pall,juno,kepler,luna --quiet --settings settings.xml
13+
- sh -c "if $TRAVIS_SECURE_ENV_VARS; then ./travis_exec_and_print_time.sh 'mvn deploy -Pall,juno,all,kepler,all,luna --quiet --settings settings.xml'; else ./travis_exec_and_print_time.sh 'mvn verify -Pall,juno,all,kepler,all,luna --quiet --settings settings.xml'; fi"
14+
15+
16+
17+
#Several usernames and passwords/tokens are required for deployment.
18+
#When testing on your local/remote setup then you need to set/export env. variables:
19+
#(See settings.xml)
20+
#CI_NEXUS_USERNAME
21+
#CI_NEXUS_OAUTH2_TOKEN
22+
#CI_GPG_PASSPHRASE
23+
#CI_GITHUB_REPOUSERNAME
24+
env:
25+
global:
26+
#Make sure Maven doesn't run out of heap memory.
27+
- MAVEN_OPTS="-Xmx1024M"
28+
29+
#These are the Nexus details and GPG signing token for Nexus deployment.
30+
#The Nexus repo is hardcoded as com.github.brodykenrick.arduino-eclipse-plugin in the POM.XML (doing otherwise produces warnings)
31+
#This is good to use until we want more consistency in naming
32+
#Travis encrypted variables names and tokens (need to change for correct repo though for encryption to work).
33+
#Nexus Username, pass and GPG
34+
# These point to the above nexus server/groupid but need to be encrypted against the repo Travis is getting code from (i.e. change it).
35+
#brodykenrick/arduino-eclipse-plugin
36+
# - secure: "CkTScsFgbeqTznfGoAhhS0XRie2jr+syjpD3Vvn8Gw/OFCXkKjDEBWUebQdpJjXe9ia23dmTdQMFwp2HcPhrUj6cpnHNcOqVSfPRKfYPbYgXMmVSciGfqkgY3aWArddQ1G8SOMzivfYW6QZIkhanFsk00HkWOrYzxppXyA3m4GY="
37+
# - secure: "bd0gCncNkyhwmIHkir2d7jprS+HNTd4DOVutYpIKQTVaJpvFKRw4anqZGMZp3wwxPyP3i30fMVvPoFJVCEphxRuJRomeqgrJJUpKAsh5QAIODYj9A2A8/KDa+jrTtbpPh16YAiMPmnMgq4NT3Wd5cjZuuBHxRmvaMMlb6BoJCO0="
38+
# - secure: "oFSaKCjBm8L8ZgSvC3rAPKIXcXXJuEb+3eQ+lJbU84QK6C7wRd+2mz4fQ0E5GNSNxWACPbtypopUCPj4auCazhcbudO2wzpAksfJJpkIXd6vZN6xmxJLRzQWp7aNQG7a0UWvuY49/11IY834uhxPoJHBIFRh9jALHMLeF4epfko="
39+
#jantje/arduino-eclipse-plugin
40+
- secure: "kC8R35qKesohed2C47R2xO4uVKhRGahuO+7kEDaJwWIn7QlefJSgJ8IK9tGng+IcUUXD4ClKAT1RJgJnnchtO0jpUEy+MIXDQi1PCc2UkIsYa6XMw5Nf0EMppHiJM2LLbf1n/urGmuo/RwKWXLdC7SLuSmqgLD82AbrGA2xXSXM="
41+
- secure: "gUpJ6dlh/SBsJP+QlNFbNhchZzKRDmwuWjrId7lTyToVhAzoQSygNS7DfuemfJkhIdHVkZELnvfTx3FaeIfW59zQ2654HMiUrvUINFys+pq6C0vwPyQzAXg4KLn6kExgbn6md5zb8w2fE68Mb2y20jduhzBOAVWvK361lC4oeSI="
42+
- secure: "ZNF1Tc17sq5tsChKi4+yAv6mqhxOfq/zZ38TnRYr1zos2G1jCJJNw4zq1ojUGFViCxdt76xwlDYwavjzAMfsdI3/zoPePtaFJj3w8V6y4C10rgGW67bY4HwW2i0sudIbSWQ+skmG2zbVvJLrIMj2c6IXDM13sTW1Dv+Pt4tTaSs="
43+
44+
# This is the Github username of the repository of the source we are building.
45+
#Needs to be inline with the repo being built (i.e. change it).
46+
- CI_GITHUB_REPOUSERNAME=jantje
47+
# - CI_GITHUB_REPOUSERNAME=brodykenrick
48+
49+
50+
51+
52+

it.baeyens.arduino.application/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>it.baeyens.arduino</groupId>
6+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
77
<artifactId>it.baeyens.arduino.parent</artifactId>
88
<version>1.0.0-SNAPSHOT</version>
99
<relativePath>../it.baeyens.arduino.parent</relativePath>
1010
</parent>
11-
<groupId>it.baeyens.arduino</groupId>
11+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
1212
<artifactId>it.baeyens.arduino.application</artifactId>
1313
<version>1.0.0-SNAPSHOT</version>
1414
<packaging>eclipse-plugin</packaging>

it.baeyens.arduino.common/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>it.baeyens.arduino</groupId>
6+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
77
<artifactId>it.baeyens.arduino.parent</artifactId>
88
<version>1.0.0-SNAPSHOT</version>
99
<relativePath>../it.baeyens.arduino.parent</relativePath>
1010
</parent>
11-
<groupId>it.baeyens.arduino</groupId>
11+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
1212
<artifactId>it.baeyens.arduino.common</artifactId>
1313
<version>2.1.1-SNAPSHOT</version>
1414
<packaging>eclipse-plugin</packaging>

it.baeyens.arduino.core.nl1/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>it.baeyens.arduino</groupId>
6+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
77
<artifactId>it.baeyens.arduino.parent</artifactId>
88
<version>1.0.0-SNAPSHOT</version>
9-
<relativePath>../it.baeyens.arduino.parent</relativePath>
9+
<relativePath>../it.baeyens.arduino.parent</relativePath>
1010
</parent>
11-
<groupId>it.baeyens.arduino</groupId>
11+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
1212
<artifactId>it.baeyens.arduino.core.nl1</artifactId>
1313
<version>1.0.0-SNAPSHOT</version>
1414
<packaging>eclipse-plugin</packaging>

it.baeyens.arduino.core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>it.baeyens.arduino</groupId>
6+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
77
<artifactId>it.baeyens.arduino.parent</artifactId>
88
<version>1.0.0-SNAPSHOT</version>
99
<relativePath>../it.baeyens.arduino.parent</relativePath>
1010
</parent>
11-
<groupId>it.baeyens.arduino</groupId>
11+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
1212
<artifactId>it.baeyens.arduino.core</artifactId>
1313
<version>2.1.4-SNAPSHOT</version>
1414
<packaging>eclipse-plugin</packaging>

it.baeyens.arduino.feature/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>it.baeyens.arduino</groupId>
6+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
77
<artifactId>it.baeyens.arduino.parent</artifactId>
88
<version>1.0.0-SNAPSHOT</version>
99
<relativePath>../it.baeyens.arduino.parent</relativePath>
1010
</parent>
11-
<groupId>it.baeyens.arduino</groupId>
11+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
1212
<artifactId>it.baeyens.arduino.feature</artifactId>
1313
<version>2.1.4-SNAPSHOT</version>
1414
<packaging>eclipse-feature</packaging>

it.baeyens.arduino.monitor/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>it.baeyens.arduino</groupId>
6+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
77
<artifactId>it.baeyens.arduino.parent</artifactId>
88
<version>1.0.0-SNAPSHOT</version>
99
<relativePath>../it.baeyens.arduino.parent</relativePath>
1010
</parent>
11-
<groupId>it.baeyens.arduino</groupId>
11+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
1212
<artifactId>it.baeyens.arduino.monitor</artifactId>
1313
<version>2.1.8-SNAPSHOT</version>
1414
<packaging>eclipse-plugin</packaging>

it.baeyens.arduino.packaging.feature/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>it.baeyens.arduino</groupId>
6+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
77
<artifactId>it.baeyens.arduino.parent</artifactId>
88
<version>1.0.0-SNAPSHOT</version>
99
<relativePath>../it.baeyens.arduino.parent</relativePath>
1010
</parent>
11-
<groupId>it.baeyens.arduino</groupId>
11+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
1212
<artifactId>it.baeyens.arduino.packaging.feature</artifactId>
1313
<version>1.0.0-SNAPSHOT</version>
1414
<packaging>eclipse-feature</packaging>

it.baeyens.arduino.parent/pom.xml

Lines changed: 71 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,43 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
44
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
55
<modelVersion>4.0.0</modelVersion>
6-
<groupId>it.baeyens.arduino</groupId>
6+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
77
<artifactId>it.baeyens.arduino.parent</artifactId>
88
<version>1.0.0-SNAPSHOT</version>
99
<packaging>pom</packaging>
1010

1111
<properties>
1212
<tycho.version>0.18.1</tycho.version>
13+
<built.repo.dir>${project.build.directory}/repo</built.repo.dir>
1314
</properties>
1415

16+
<parent>
17+
<groupId>org.sonatype.oss</groupId>
18+
<artifactId>oss-parent</artifactId>
19+
<version>7</version>
20+
<relativePath>org.sonatype.oss:oss-parent</relativePath>
21+
</parent>
22+
23+
<scm>
24+
<connection>scm:git:git://github.com/${github.repo.username}/arduino-eclipse-plugin.git</connection>
25+
<developerConnection>scm:git:[email protected]:${github.repo.username}/arduino-eclipse-plugin.git</developerConnection>
26+
<url>http://github.com/${github.repo.username}/arduino-eclipse-plugin</url>
27+
</scm>
28+
29+
<!-- Sonatype repos -->
30+
<distributionManagement>
31+
<snapshotRepository>
32+
<id>sonatype-nexus-snapshots</id>
33+
<name>Sonatype Nexus snapshot repository</name>
34+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
35+
</snapshotRepository>
36+
<repository>
37+
<id>sonatype-nexus-staging</id>
38+
<name>Sonatype Nexus release repository</name>
39+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
40+
</repository>
41+
</distributionManagement>
42+
1543
<modules>
1644
<module>../it.baeyens.arduino.core.nl1</module>
1745
<module>../it.baeyens.arduino.feature</module>
@@ -24,7 +52,6 @@
2452
<module>../it.baeyens.arduino.application</module>
2553
</modules>
2654

27-
2855
<build>
2956
<plugins>
3057
<!-- Enable tycho build extension -->
@@ -47,7 +74,15 @@
4774
</configuration>
4875
</plugin>
4976

50-
77+
<!-- Maven release with PGP signing -->
78+
<plugin>
79+
<groupId>org.apache.maven.plugins</groupId>
80+
<artifactId>maven-release-plugin</artifactId>
81+
<version>2.2.2</version>
82+
<configuration>
83+
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
84+
</configuration>
85+
</plugin>
5186

5287
</plugins>
5388

@@ -67,12 +102,39 @@
67102
</pluginManagement>
68103
</build>
69104

70-
71-
72-
73-
74105
<profiles>
75-
106+
<!-- GPG Signing -->
107+
<profile>
108+
<id>release-sign-artifacts</id>
109+
<activation>
110+
<property>
111+
<name>performRelease</name>
112+
<value>true</value>
113+
</property>
114+
</activation>
115+
<build>
116+
<plugins>
117+
<plugin>
118+
<groupId>org.apache.maven.plugins</groupId>
119+
<artifactId>maven-gpg-plugin</artifactId>
120+
<version>1.4</version>
121+
<configuration>
122+
<passphrase>${gpg.passphrase}</passphrase>
123+
</configuration>
124+
<executions>
125+
<execution>
126+
<id>sign-artifacts</id>
127+
<phase>verify</phase>
128+
<goals>
129+
<goal>sign</goal>
130+
</goals>
131+
</execution>
132+
</executions>
133+
</plugin>
134+
</plugins>
135+
</build>
136+
</profile>
137+
76138
<profile>
77139
<id>all</id>
78140
<build>
@@ -327,7 +389,7 @@
327389

328390
<repositories>
329391
<repository>
330-
<id>Nebula</id>
392+
<id>nebula</id>
331393
<layout>p2</layout>
332394
<url> http://download.eclipse.org/technology/nebula/snapshot</url>
333395
</repository>

it.baeyens.arduino.product/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
55
<modelVersion>4.0.0</modelVersion>
66
<parent>
7-
<groupId>it.baeyens.arduino</groupId>
7+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
88
<artifactId>it.baeyens.arduino.parent</artifactId>
99
<version>1.0.0-SNAPSHOT</version>
10-
<relativePath>../it.baeyens.arduino.parent</relativePath>
10+
<relativePath>../it.baeyens.arduino.parent</relativePath>
1111
</parent>
12-
<groupId>it.baeyens.arduino</groupId>
12+
<groupId>com.github.brodykenrick.arduino-eclipse-plugin</groupId>
1313
<artifactId>it.baeyens.arduino.product</artifactId>
1414
<version>1.0.0-SNAPSHOT</version>
1515
<packaging>eclipse-repository</packaging>

0 commit comments

Comments
 (0)