Since java.net stopped working to publish (after their "upgrade"), we've moved to publishing via OSS Sonatype at https://oss.sonatype.org/index.html.
As an abbreviated reminder, follow these steps.
SNAPSHOT Release (https://oss.sonatype.org/content/repositories/snapshots/)
- Having added the Sonatype parent to your POM.
`<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
</parent>`
- Having previously generated your PGP key, you may need to install it on the box you intend to deploy from. You will have to export it from the original keyring (where you first created the key pair) and install it along with the public key into the keyring on the machine you want to publish from.
If you followed the steps in [Setting up PGP](https://docs.sonatype.org/displa y/Repository/How+To+Generate+PGP+Signatures+With+Maven) above, you will have published your public key to, lets say, hkp://pool.sks-keyservers.net.
- You should just be able to publish via Maven
`mvn clean deploy`
- If Sonatype complains about the physical upload, for example with something like;
`Failed to transfer file: https://oss.sonatype.org ... Return code is: 401, ReasonPhrase: Unauthorized.`
It may be that you need to add the appropriate username and passphrase into Maven's `settings.xml`, ie;
`<server>
<id>sonatype-nexus-snapshots</id>
<username>...</username>
<password>...</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<username>...</username>
<password>...</password>
</server>`
and as tempus-fugit has been setup with the Maven PGP plugin, it'll automatically sign the artifacts before publishing. You'll just need to enter your pass phrase as part of the build.
- Having prepared a release (tagging in Subversion etc) with the mvn release plugin.
```mvn release:clean
mvn release:prepare```
- you firstly, have to stage the artifacts with Sonatype.
`mvn release:perform`
-
This will upload to Sonatype's staging area where you can promote it through to a release via their GUI at https://oss.sonatype.org. Pick up the instructions for the GUI from the [User Guide](https://docs.sonaty pe.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-8.ReleaseIt).
-
Enjoy.
Download my public key using the following
$ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 8D8988DC
Some favorites:
mvn surefire-report:report-only
To generate the awful Surefire report after running mvn test
.
mvn deploy -Dmaven.test.skip=true
To deploy without running the tests.
mvn clean -s ~/tools/apache/apache-maven-2.2.1/conf/settings.xml
To supply an alternative settings file. For example, you'll need to setup OSS Sonatype credentials in your settings.xml
.