Skip to content

Commit

Permalink
migrate release build process from deprecated sonatype oss-parent to …
Browse files Browse the repository at this point in the history
…nexus-staging-maven-plugin
  • Loading branch information
Cihat Keser committed Mar 26, 2016
1 parent cab4cf0 commit 55d5667
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 47 deletions.
2 changes: 1 addition & 1 deletion addServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
sonatypeServerUser = m2.createElement("username")
sonatypeServerPass = m2.createElement("password")

idNode = m2.createTextNode("sonatype-nexus-snapshots")
idNode = m2.createTextNode("ossrh")
userNode = m2.createTextNode(os.environ["SONATYPE_USERNAME"])
passNode = m2.createTextNode(os.environ["SONATYPE_PASSWORD"])

Expand Down
85 changes: 39 additions & 46 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
<description>Parent POM for Jest - ElasticSearch Java rest client</description>
<url>https://github.com/searchbox-io/Jest</url>

<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>9</version>
</parent>

<modules>
<module>jest-common</module>
<module>jest</module>
Expand All @@ -37,14 +31,12 @@
<url>[email protected]:searchbox-io/Jest.git</url>
</scm>

<repositories>
<repository>
<id>sonatype</id>
<name>Sonatype Groups</name>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<developers>
<developer>
Expand Down Expand Up @@ -92,10 +84,40 @@
<junit.version>4.12</junit.version>

<plugin.surefire.version>2.19.1</plugin.surefire.version>
<plugin.sonatype.version>1.6.7</plugin.sonatype.version>
<plugin.gpg.version>1.6</plugin.gpg.version>
</properties>
<build>
<defaultGoal>install</defaultGoal>
<plugins>

<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${plugin.sonatype.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${plugin.gpg.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${plugin.surefire.version}</version>
Expand All @@ -117,6 +139,7 @@
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand All @@ -125,11 +148,12 @@
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down Expand Up @@ -400,36 +424,5 @@
</plugins>
</build>
</profile>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.2</version>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 55d5667

Please sign in to comment.