Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

Commit

Permalink
Documenting Maven Release Process
Browse files Browse the repository at this point in the history
  • Loading branch information
jesterpm committed Feb 27, 2015
1 parent 31c190d commit 2e38159
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 3 deletions.
42 changes: 42 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
RELEASING
=========

This file outlines how to publish a new release to Maven Central.

Prerequisites
-------------

* You will need the Cojen GPG key and passphrase to continue. Contact
@jesterpm or @broneill to obtain them.

* You will need an account with Sonatype Nexus. You can create that
[here](https://issues.sonatype.org/secure/Signup!default.jspa). Contact
@jesterpm or @broneill for access to the Cojen repository.

Process
-------

1. Increment the version number appropriately.
Use [Semantic Versioning](http://semver.org/).

VERSION=2.2.5
mvn versions:set -DnewVersion=$VERSION

2. Verify the release and make sure all is well.

mvn clean verify -P release

3. Commit and tag the latest release.

git commit -am "Release $VERSION"
git tag -a v$VERSION -m "Release $VERSION"

4. Deploy to Sonatype:

mvn clean deploy -P release

5. Push to GitHub

git push origin v$VERSION


90 changes: 87 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<artifactId>cojen</artifactId>
<packaging>jar</packaging>
<name>Cojen</name>
<version>2.2</version>
<version>2.2.5</version>
<description>
Dynamic Java bytecode generation and disassembly tools.
</description>
<url>http://cojen.sourceforge.net/</url>
<url>https://github.com/cojen/Cojen/wiki</url>
<inceptionYear>2004</inceptionYear>

<organization>
Expand All @@ -24,6 +24,21 @@
</license>
</licenses>

<scm>
<connection>scm:git:git@github.com:cojen/Cojen.git</connection>
<developerConnection>scm:git:git@github.com:cojen/Cojen.git</developerConnection>
<url>git@github.com:cojen/Cojen.git</url>
</scm>

<developers>
<developer>
<name>Brian S O'Neill</name>
<id>broneill</id>
<email>broneill@users.sourceforge.net</email>
<organization>Amazon Technologies, Inc.</organization>
</developer>
</developers>

<dependencies>
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -62,4 +77,73 @@

</plugins>
</build>
</project>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>502A7802</keyname>
</configuration>
</execution>
</executions>
</plugin>

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

</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 2e38159

Please sign in to comment.