-
Notifications
You must be signed in to change notification settings - Fork 47
Before First Release
Mária Jurčovičová edited this page Oct 17, 2015
·
19 revisions
Java linked by JAVA_HOME
must be 7.x jdk:
> echo %java_home%
c:\Program Files\Java\jdk1.7.0_79\
Reason: Antlr3 does not work properly on Java 8 and returns an error. It does not affect generation, but maven would refuse to release it.
- Install gpg. My current gpg version is
gpg (GnuPG) 1.4.19
. - Either generate new key or add old one to keys list. The name and email must match first name, last name and email in maven central (sonatype). How to find them:
- Log in.
- Click on username in upper right corner.
- Choose profile.
- If you generated new key, upload it to MIT PGP Public Key Server.
Release process works with maven 3.3.3, e.g. mvn --version
returns:
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T13:57:37+02:00)
Maven home: c:\Program Files\apache-maven-3.3.3\bin\..
Java version: 1.7.0_79, vendor: Oracle Corporation
Java home: c:\Program Files\Java\jdk1.7.0_79\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Generate new access token in maven central (sonatype):
- Log in.
- Click on username in upper right corner and then profile.
- Change
Summary
intoUser Token
option in the main combo-box. - Click
Access User Token
. - Submit your sonatype username and password again.
- The server will generate random looking username and password a.ka. access token. It looks somewhat like this:
<server>
<id>${server name}</id>
<username>du8998SS+-w</username>
<password>hrm+-ioioi3344344kkkKKKKjgggg</password>
</server>
Configure maven to use newly generated access token:
- Create
settings.xml
file in${user.home}/.m2/settings.xml
. - Add new
sonatype-nexus-snapshots
server into servers section and configure new access token as its username and password:
<server>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus snapshot repository</name>
<username>du8998SS+-w</username>
<password>hrm+-ioioi3344344kkkKKKKjgggg</password>
</server>
- Add new
sonatype-nexus-staging
server into servers section and configure new access token as its username and password:
<server>
<id>sonatype-nexus-staging</id>
<name>Sonatype Nexus release repository</name>
<username>du8998SS+-w</username>
<password>hrm+-ioioi3344344kkkKKKKjgggg</password>
</server>
Full settings.xml
:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus snapshot repository</name>
<username>du8998SS+-w</username>
<password>hrm+-ioioi3344344kkkKKKKjgggg</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<name>Sonatype Nexus release repository</name>
<username>du8998SS+-w</username>
<password>hrm+-ioioi3344344kkkKKKKjgggg</password>
</server>
</servers>
<mirrors>
</mirrors>
<profiles>
</profiles>
</settings>
Continue at Release Process page.