Skip to content

Commit 596e02e

Browse files
committed
Simplified release procedure
1 parent 9d0b9ed commit 596e02e

File tree

4 files changed

+74
-56
lines changed

4 files changed

+74
-56
lines changed

.mvn/maven.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-s .mvn/settings.xml

.mvn/settings.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
6+
<servers>
7+
<server>
8+
<id>maven-central</id>
9+
<username>${env.OSS_SONATYPE_ORG_USERNAME}</username>
10+
<password>${env.OSS_SONATYPE_ORG_PASSWORD}</password>
11+
</server>
12+
</servers>
13+
14+
</settings>

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
distributionUrl=https://repository.apache.org/content/repositories/releases/org/apache/maven/apache-maven/3.2.5/apache-maven-3.2.5-bin.zip
1+
distributionUrl=https://repository.apache.org/content/repositories/releases/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip

pom.xml

Lines changed: 58 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,17 @@
2323
</scm>
2424
<developers>
2525
<developer>
26-
<id>sshyiko</id>
26+
<id>shyiko</id>
2727
<email>stanley.shyiko@gmail.com</email>
2828
<name>Stanley Shyiko</name>
2929
</developer>
3030
</developers>
3131
<distributionManagement>
3232
<repository>
33-
<id>sonatype-nexus-staging</id>
33+
<id>maven-central</id>
3434
<name>Sonatype Nexus Staging</name>
3535
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
3636
</repository>
37-
<snapshotRepository>
38-
<id>sonatype-nexus-snapshots</id>
39-
<name>Sonatype Nexus Snapshots</name>
40-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
41-
</snapshotRepository>
4237
</distributionManagement>
4338

4439
<properties>
@@ -91,12 +86,33 @@
9186
<plugin>
9287
<groupId>org.apache.maven.plugins</groupId>
9388
<artifactId>maven-compiler-plugin</artifactId>
94-
<version>2.3.2</version>
89+
<version>3.5.1</version>
9590
<configuration>
9691
<source>1.6</source>
9792
<target>1.6</target>
9893
</configuration>
9994
</plugin>
95+
<plugin>
96+
<groupId>org.apache.maven.plugins</groupId>
97+
<artifactId>maven-jar-plugin</artifactId>
98+
<version>3.0.2</version>
99+
<configuration>
100+
<archive>
101+
<manifestEntries>
102+
<!-- for class.getPackage().getImplementationVersion() -->
103+
<Implementation-Version>${project.version}</Implementation-Version>
104+
</manifestEntries>
105+
</archive>
106+
</configuration>
107+
</plugin>
108+
<plugin>
109+
<groupId>org.apache.maven.plugins</groupId>
110+
<artifactId>maven-deploy-plugin</artifactId>
111+
<version>2.8.2</version>
112+
<configuration>
113+
<skip>true</skip>
114+
</configuration>
115+
</plugin>
100116
<plugin>
101117
<groupId>org.apache.maven.plugins</groupId>
102118
<artifactId>maven-surefire-plugin</artifactId>
@@ -201,29 +217,27 @@
201217
<configuration>
202218
<usage>
203219
# build everything (append "-DskipTests=true" if you wish to skip tests)
204-
mvn clean install
220+
./mvnw clean package
205221

206222
# run unit + integration tests, validate codebase using checkstyle
207-
mvn -P coverage clean verify
223+
./mvnw -P coverage clean verify
208224
# use -Dvagrant.integration.box= to switch between MySQL sandboxes
209225

210226
# for aggregated coverage over different mysql releases use
211-
mvn clean
212-
mvn -P coverage verify \
227+
./mvnw clean
228+
./mvnw -P coverage verify \
213229
-Dvagrant.integration.box=supplement/vagrant/mysql-5.5.27-sandbox-prepackaged
214-
mvn -P coverage verify \
230+
./mvnw -P coverage verify \
215231
-Dvagrant.integration.box=supplement/vagrant/mysql-5.6.12-sandbox-prepackaged
216-
mvn -P coverage verify \
217-
-Dvagrant.integration.box=supplement/vagrant/mysql-5.7.15-sandbox-prepackaged
232+
./mvnw -P coverage verify \
233+
-Dvagrant.integration.box=supplement/vagrant/mysql-5.7.15-sandbox-prepackaged
218234

219235
# submit coverage report to coveralls
220-
mvn -P coverage coveralls:jacoco -DrepoToken=&lt;coveralls.io&gt;
236+
./mvnw -P coverage coveralls:jacoco -DrepoToken=&lt;coveralls.io&gt;
221237

222-
# deploy snapshots into nexus
223-
mvn -P with-sources-and-javadocs -Ddeploy=snapshot
224-
225-
# sign release build and deploy into nexus
226-
mvn -P with-sources-and-javadocs -Ddeploy=release
238+
# publish a new version
239+
./mvnw versions:set -DnewVersion=&lt;version&gt;
240+
./mvnw -Ddeploy=maven-central
227241
</usage>
228242
</configuration>
229243
</plugin>
@@ -279,13 +293,20 @@
279293
</build>
280294
</profile>
281295
<profile>
282-
<id>with-sources-and-javadocs</id>
296+
<id>deploy-to-maven-central</id>
297+
<activation>
298+
<property>
299+
<name>deploy</name>
300+
<value>maven-central</value>
301+
</property>
302+
</activation>
283303
<build>
304+
<defaultGoal>clean deploy</defaultGoal>
284305
<plugins>
285306
<plugin>
286307
<groupId>org.apache.maven.plugins</groupId>
287308
<artifactId>maven-source-plugin</artifactId>
288-
<version>2.2.1</version>
309+
<version>3.0.1</version>
289310
<executions>
290311
<execution>
291312
<id>attach-sources</id>
@@ -299,46 +320,24 @@
299320
<plugin>
300321
<groupId>org.apache.maven.plugins</groupId>
301322
<artifactId>maven-javadoc-plugin</artifactId>
302-
<version>2.9</version>
323+
<version>2.10.4</version>
303324
<executions>
304325
<execution>
305326
<id>attach-javadocs</id>
306327
<goals>
307328
<goal>jar</goal>
308329
</goals>
330+
<configuration>
331+
<additionalparam>-Xdoclint:none</additionalparam>
332+
<quiet>true</quiet>
333+
</configuration>
309334
</execution>
310335
</executions>
311336
</plugin>
312-
</plugins>
313-
</build>
314-
</profile>
315-
<profile>
316-
<id>snapshot</id>
317-
<activation>
318-
<property>
319-
<name>deploy</name>
320-
<value>snapshot</value>
321-
</property>
322-
</activation>
323-
<build>
324-
<defaultGoal>clean deploy</defaultGoal>
325-
</build>
326-
</profile>
327-
<profile>
328-
<id>release</id>
329-
<activation>
330-
<property>
331-
<name>deploy</name>
332-
<value>release</value>
333-
</property>
334-
</activation>
335-
<build>
336-
<defaultGoal>clean release:clean release:prepare release:perform</defaultGoal>
337-
<plugins>
338337
<plugin>
339338
<groupId>org.apache.maven.plugins</groupId>
340339
<artifactId>maven-gpg-plugin</artifactId>
341-
<version>1.4</version>
340+
<version>1.6</version>
342341
<executions>
343342
<execution>
344343
<id>sign-artifacts</id>
@@ -350,11 +349,15 @@
350349
</executions>
351350
</plugin>
352351
<plugin>
353-
<groupId>org.apache.maven.plugins</groupId>
354-
<artifactId>maven-release-plugin</artifactId>
355-
<version>2.2.2</version>
352+
<groupId>org.sonatype.plugins</groupId>
353+
<artifactId>nexus-staging-maven-plugin</artifactId>
354+
<version>1.6.7</version>
355+
<extensions>true</extensions>
356356
<configuration>
357-
<mavenExecutorId>forked-path</mavenExecutorId>
357+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
358+
<serverId>maven-central</serverId>
359+
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
360+
<!--<autoReleaseAfterClose>true</autoReleaseAfterClose>-->
358361
</configuration>
359362
</plugin>
360363
</plugins>

0 commit comments

Comments
 (0)