Skip to content

Commit 01defc1

Browse files
committed
Maven/Sonatype - Deployment (from local) working
Still a root deploy error at end tough
1 parent 934ab1f commit 01defc1

File tree

13 files changed

+175
-74
lines changed

13 files changed

+175
-74
lines changed

.travis.yml

+35-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,43 @@
22

33
node:
44
#script: mvn verify -Pall,juno,all,kepler,all,luna
5-
script: mvn deploy -Pall,juno,all,kepler,all,luna
5+
#script: mvn deploy -Pall,juno,all,kepler,all,luna
6+
script: mvn deploy -Plinux32,juno --settings setings.xml
67

7-
#Note when testing on your local setup then you need to set/export: CI_DEPLOY_USERNAME and CI_DEPLOY_OAUTH2_TOKEN
8+
#Several usernames and passwords/tokens are required for deployment.
9+
#When testing on your local/remote setup then you need to set/export env. variables:
10+
#(See settings.xml)
11+
#CI_NEXUS_USERNAME
12+
#CI_NEXUS_OAUTH2_TOKEN
13+
#CI_GPG_PASSPHRASE
14+
#CI_NEXUS_GROUPID
15+
#CI_GITHUB_REPOUSERNAME
816
env:
917
global:
18+
#Make sure Maven doesn't run out of heap memory.
1019
- MAVEN_OPTS="-Xmx1024M"
11-
#Travis encrypted Github name and oauth2
12-
- secure: "GzqdusL3C5WD7YgHFax4zb2xtkE9UPAyG4UlRPpyDUwM8VzZAujkwigxUVT0Swt3eJj16mmPi1E+krarsGUACoeM1buiWEqG6AMBn5eVHxehgPVYTPZ2CfQAiniJd/wgYBqoB+RXKyLhcWyJJDxfZq/IH+C7fF9WQOTfo8ER5Bc="
13-
- secure: "T6kinvAdTDaNPggIcYGCyVfa/HXYRc9uPx51M2aFKt8eY5bxZ3fgTpgPJNOiuEdlukWgtmi+uz4apiVDTUEVijmr7szY/ddfcixQFQkVKgUE/y50nDV0tUwJh7b0DTYpFZOjaSLHaHlV59tDUtNIay+bPw+cQ/7pCeZK4q0lux4="
20+
21+
#These are the Nexus details and GPG signing token for Nexus deployment.
22+
#This Nexus repo is good to use until we want more consistency in naming
23+
- CI_NEXUS_GROUPID=com.github.brodykenrick.arduino-eclipse-plugin
24+
#Travis encrypted variables names and tokens (need to change for correct repo though for encryption to work).
25+
#Nexus Username, pass and GPG
26+
# 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).
27+
#brodykenrick/arduino-eclipse-plugin
28+
- secure: "CkTScsFgbeqTznfGoAhhS0XRie2jr+syjpD3Vvn8Gw/OFCXkKjDEBWUebQdpJjXe9ia23dmTdQMFwp2HcPhrUj6cpnHNcOqVSfPRKfYPbYgXMmVSciGfqkgY3aWArddQ1G8SOMzivfYW6QZIkhanFsk00HkWOrYzxppXyA3m4GY="
29+
- secure: "bd0gCncNkyhwmIHkir2d7jprS+HNTd4DOVutYpIKQTVaJpvFKRw4anqZGMZp3wwxPyP3i30fMVvPoFJVCEphxRuJRomeqgrJJUpKAsh5QAIODYj9A2A8/KDa+jrTtbpPh16YAiMPmnMgq4NT3Wd5cjZuuBHxRmvaMMlb6BoJCO0="
30+
- secure: "oFSaKCjBm8L8ZgSvC3rAPKIXcXXJuEb+3eQ+lJbU84QK6C7wRd+2mz4fQ0E5GNSNxWACPbtypopUCPj4auCazhcbudO2wzpAksfJJpkIXd6vZN6xmxJLRzQWp7aNQG7a0UWvuY49/11IY834uhxPoJHBIFRh9jALHMLeF4epfko="
31+
#jantje/arduino-eclipse-plugin
32+
#- secure: "kC8R35qKesohed2C47R2xO4uVKhRGahuO+7kEDaJwWIn7QlefJSgJ8IK9tGng+IcUUXD4ClKAT1RJgJnnchtO0jpUEy+MIXDQi1PCc2UkIsYa6XMw5Nf0EMppHiJM2LLbf1n/urGmuo/RwKWXLdC7SLuSmqgLD82AbrGA2xXSXM="
33+
#- secure: "gUpJ6dlh/SBsJP+QlNFbNhchZzKRDmwuWjrId7lTyToVhAzoQSygNS7DfuemfJkhIdHVkZELnvfTx3FaeIfW59zQ2654HMiUrvUINFys+pq6C0vwPyQzAXg4KLn6kExgbn6md5zb8w2fE68Mb2y20jduhzBOAVWvK361lC4oeSI="
34+
#- secure: "ZNF1Tc17sq5tsChKi4+yAv6mqhxOfq/zZ38TnRYr1zos2G1jCJJNw4zq1ojUGFViCxdt76xwlDYwavjzAMfsdI3/zoPePtaFJj3w8V6y4C10rgGW67bY4HwW2i0sudIbSWQ+skmG2zbVvJLrIMj2c6IXDM13sTW1Dv+Pt4tTaSs="
35+
36+
# This is the Github username of the repository of the source we are building.
37+
#Needs to be inline with the repo being built (i.e. change it).
38+
#- CI_GITHUB_REPOUSERNAME=jantje
39+
- CI_GITHUB_REPOUSERNAME=brodykenrick
40+
41+
42+
43+
1444

it.baeyens.arduino.application/pom.xml

+2-2
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>${parent.groupId}</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>${parent.groupId}</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

+2-2
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>${parent.groupId}</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>${parent.groupId}</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

+3-3
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>${parent.groupId}</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>${parent.groupId}</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

+2-2
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>${parent.groupId}</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>${parent.groupId}</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

+2-2
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>${parent.groupId}</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>${parent.groupId}</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

+2-2
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>${parent.groupId}</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>${parent.groupId}</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

+2-2
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>${parent.groupId}</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>${parent.groupId}</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

+69-47
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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>${parent.groupId}</groupId>
77
<artifactId>it.baeyens.arduino.parent</artifactId>
88
<version>1.0.0-SNAPSHOT</version>
99
<packaging>pom</packaging>
@@ -13,6 +13,35 @@
1313
<built.repo.dir>${project.build.directory}/repo</built.repo.dir>
1414
</properties>
1515

16+
17+
<parent>
18+
<groupId>org.sonatype.oss</groupId>
19+
<artifactId>oss-parent</artifactId>
20+
<version>7</version>
21+
<relativePath>org.sonatype.oss:oss-parent</relativePath>
22+
</parent>
23+
24+
<!-- TODO : github.repo.username -->
25+
<scm>
26+
<connection>scm:git:git://github.com/brodykenrick/arduino-eclipse-plugin.git</connection>
27+
<developerConnection>scm:git:[email protected]:brodykenrick/arduino-eclipse-plugin.git</developerConnection>
28+
<url>http://github.com/brodykenrick/arduino-eclipse-plugin</url>
29+
</scm>
30+
31+
<!-- Sonatype repos -->
32+
<distributionManagement>
33+
<snapshotRepository>
34+
<id>sonatype-nexus-snapshots</id>
35+
<name>Sonatype Nexus snapshot repository</name>
36+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
37+
</snapshotRepository>
38+
<repository>
39+
<id>sonatype-nexus-staging</id>
40+
<name>Sonatype Nexus release repository</name>
41+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
42+
</repository>
43+
</distributionManagement>
44+
1645
<modules>
1746
<module>../it.baeyens.arduino.core.nl1</module>
1847
<module>../it.baeyens.arduino.feature</module>
@@ -47,53 +76,15 @@
4776
</configuration>
4877
</plugin>
4978

50-
<!-- Deploying to github -->
51-
<plugin>
52-
<artifactId>maven-deploy-plugin</artifactId>
53-
<version>2.7</version>
54-
<configuration>
55-
<altDeploymentRepository>internal.repo::default::file://${built.repo.dir}</altDeploymentRepository>
56-
</configuration>
57-
</plugin>
58-
79+
<!-- Maven release with PGP signing -->
5980
<plugin>
60-
<groupId>com.github.github</groupId>
61-
<artifactId>site-maven-plugin</artifactId>
62-
<version>0.8</version>
81+
<groupId>org.apache.maven.plugins</groupId>
82+
<artifactId>maven-release-plugin</artifactId>
83+
<version>2.2.2</version>
6384
<configuration>
64-
<!-- git commit message -->
65-
<message>Maven artifacts for ${project.groupId}:${project.artifactId}:${project.version} ~${maven.build.timestamp}</message>
66-
<noJekyll>true</noJekyll> <!-- disable webpage processing -->
67-
<outputDirectory>${built.repo.dir}</outputDirectory>
68-
<!-- This isn't perfect, because every old SNAPSHOT is kept.. -->
69-
<merge>true</merge>
70-
71-
<!-- <dryRun>true</dryRun> -->
72-
<repositoryOwner>${env.CI_DEPLOY_USERNAME}</repositoryOwner> <!-- github username -->
73-
<repositoryName>arduino-eclipse-plugin</repositoryName> <!-- github repo name -->
74-
<branch>refs/heads/gh-pages</branch> <!-- remote branch name -->
75-
<path>maven/snapshots</path>
76-
77-
<!-- This token, obtained from https://github.com/settings/applications,
78-
encrypted using http://about.travis-ci.org/docs/user/build-configuration/#Secure-environment-variables,
79-
is like a password; encrypt & guard it carefully! -->
80-
<oauth2Token>${env.CI_DEPLOY_OAUTH2_TOKEN}</oauth2Token>
81-
82-
<includes>
83-
<include>**/*</include>
84-
</includes>
85+
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
8586
</configuration>
86-
<executions>
87-
<!-- run site-maven-plugin's 'site' target as part of the build's normal
88-
'deploy' phase -->
89-
<execution>
90-
<goals>
91-
<goal>site</goal>
92-
</goals>
93-
<phase>deploy</phase>
94-
</execution>
95-
</executions>
96-
</plugin>
87+
</plugin>
9788

9889
</plugins>
9990

@@ -118,7 +109,38 @@
118109

119110

120111
<profiles>
121-
112+
<!-- GPG Signing -->
113+
<profile>
114+
<id>release-sign-artifacts</id>
115+
<activation>
116+
<property>
117+
<name>performRelease</name>
118+
<value>true</value>
119+
</property>
120+
</activation>
121+
<build>
122+
<plugins>
123+
<plugin>
124+
<groupId>org.apache.maven.plugins</groupId>
125+
<artifactId>maven-gpg-plugin</artifactId>
126+
<version>1.4</version>
127+
<configuration>
128+
<passphrase>${gpg.passphrase}</passphrase>
129+
</configuration>
130+
<executions>
131+
<execution>
132+
<id>sign-artifacts</id>
133+
<phase>verify</phase>
134+
<goals>
135+
<goal>sign</goal>
136+
</goals>
137+
</execution>
138+
</executions>
139+
</plugin>
140+
</plugins>
141+
</build>
142+
</profile>
143+
122144
<profile>
123145
<id>all</id>
124146
<build>
@@ -373,7 +395,7 @@
373395

374396
<repositories>
375397
<repository>
376-
<id>Nebula</id>
398+
<id>nebula</id>
377399
<layout>p2</layout>
378400
<url> http://download.eclipse.org/technology/nebula/snapshot</url>
379401
</repository>

it.baeyens.arduino.product/pom.xml

+3-3
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>${parent.groupId}</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>${parent.groupId}</groupId>
1313
<artifactId>it.baeyens.arduino.product</artifactId>
1414
<version>1.0.0-SNAPSHOT</version>
1515
<packaging>eclipse-repository</packaging>

it.baeyens.arduino.updatesite/pom.xml

+3-3
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>${parent.groupId}</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>${parent.groupId}</groupId>
1313
<artifactId>it.baeyens.arduino.updatesite</artifactId>
1414
<version>1.0.0-SNAPSHOT</version>
1515
<packaging>eclipse-repository</packaging>

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
44
<modelVersion>4.0.0</modelVersion>
5-
<groupId>it.baeyens.arduino</groupId>
5+
<groupId>${parent.groupId}</groupId>
66
<artifactId>root</artifactId>
77
<version>0.0.1-SNAPSHOT</version>
88
<packaging>pom</packaging>

settings.xml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<settings>
3+
<servers>
4+
<server>
5+
<id>sonatype-nexus-snapshots</id>
6+
<username>${env.CI_NEXUS_USERNAME}</username>
7+
<password>${env.CI_NEXUS_PASSWORD}</password>
8+
</server>
9+
<server>
10+
<id>sonatype-nexus-staging</id>
11+
<username>${env.CI_NEXUS_USERNAME}</username>
12+
<password>${env.CI_NEXUS_PASSWORD}</password>
13+
</server>
14+
</servers>
15+
<profiles>
16+
<profile>
17+
<id>sign</id>
18+
<activation>
19+
<activeByDefault>true</activeByDefault>
20+
</activation>
21+
<properties>
22+
<gpg.passphrase>${env.CI_GPG_PASSPHRASE}</gpg.passphrase>
23+
</properties>
24+
</profile>
25+
26+
<!-- This is the Nexus groupId (target destination). Leave as BK for deployment for now. -->
27+
<profile>
28+
<id>inject-parent.groupId</id>
29+
<activation>
30+
<activeByDefault>true</activeByDefault>
31+
</activation>
32+
<properties>
33+
<parent.groupId>${env.CI_NEXUS_GROUPID}</parent.groupId>
34+
</properties>
35+
</profile>
36+
37+
<profile>
38+
<id>inject-github.repo.username</id>
39+
<activation>
40+
<activeByDefault>true</activeByDefault>
41+
</activation>
42+
<properties>
43+
<github.repo.username>${env.CI_GITHUB_REPOUSERNAME}</github.repo.username>
44+
</properties>
45+
</profile>
46+
47+
</profiles>
48+
</settings>
49+

0 commit comments

Comments
 (0)