Steps for Maven to release Jar, AAR, and war until central Repository

Source: Internet
Author: User
Tags gpg ticket sonatype

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.