Step One:register your account and apply for ticket.
Register here: https://issues.sonatype.org
Apply ticket: Create a issue, note here to choose OSSRH, and is Project rather than Task,group ID to be careful to write, can not write you do not have permission, or the service will let you rewrite(half a day or so)。
After successful application, you will be prompted: The Configuration has been prepared, now you can:please comment in this ticket when you promoted your first release, Thanks
Step Two:GPG, for signature and encryption purposes.
Download: https://www.gnupg.org/download/index.html
Note: The name of the signature, the mailbox and step one, remember that passphrase is used for the following steps.
Step three:compile and submit files.
Precautions:
1) in the. m2\settings.xml file to add:
<servers><server><id>sonatype-nexus-snapshots</id><username>your-jira-username </username><password>your-jira-password</password></server><server><id> Sonatype-nexus-staging</id><username>your-jira-username</username><password> Your-jira-password</password></server></servers>
2) in the Pom.xml file to be added (under Project tab):
<parent><groupId>org.sonatype.oss</groupId><artifactId>oss-parent</artifactId> <version>7</version></parent>
3) If the Javadoc compilation does not pass, it can be added under the Javadoc plugin:
<configuration><additionalparam>-Xdoclint:none</additionalparam></configuration>
4) Notice such as obsolete release to join:
<plugin><groupid>org.apache.maven.plugins</groupid><artifactid>maven-gpg-plugin</ Artifactid><version>${maven-gpg-plugin.version}</version><executions><execution> <phase>verify</phase><goals><goal>sign</goal></goals></execution> </executions></plugin>
5) If it is a Java Web project, Javadoc may error: Cannot find class Javax.servlet.ServletContext, can add dependency:
<dependency><groupid>javax.servlet</groupid><artifactid>javax.servlet-api</ Artifactid><version>3.0.1</version><scope>provided</scope></dependency>
6) Pom Preparation can refer to Https://github.com/ACC-GIT/ACCWeb/blob/master/pom.xml
Step Four:release and prompt synchronization.
First in the https://oss.sonatype.org/#stagingRepositories进行close, release and other operations (note this will be detected)
Then reply to the service personnel in the issue, propose to synchronize to the Central Library(half a day or so)。
Steps for Maven to release Jar, AAR, and war until central Repository