Skip to content

Commit

Permalink
Use nexus-staging-maven-plugin to release to maven central from maven
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 388506569
  • Loading branch information
cushon authored and Error Prone Team committed Aug 3, 2021
1 parent b660308 commit fb208dd
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions pom.xml
Expand Up @@ -43,6 +43,7 @@
<flogger.version>0.5.1</flogger.version>
<maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
</properties>

<organization>
Expand Down Expand Up @@ -215,15 +216,9 @@

<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<profiles>
Expand All @@ -250,9 +245,20 @@
</build>
</profile>
<profile>
<id>sonatype-oss-release</id>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand Down

0 comments on commit fb208dd

Please sign in to comment.