Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Commit 3ef8a7b

Browse files
committed
modify changes in pom.xml, use profile management
1 parent be1f1ff commit 3ef8a7b

File tree

1 file changed

+52
-9
lines changed

1 file changed

+52
-9
lines changed

pom.xml

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,15 @@
3434

3535
<distributionManagement>
3636
<snapshotRepository>
37-
<id>ossrh</id>
38-
<name>Sonatype Nexus snapshot repository</name>
39-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
37+
<id>sonatype-nexus-snapshots</id>
38+
<name>Sonatype Nexus Snapshots</name>
39+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
4040
</snapshotRepository>
41+
<repository>
42+
<id>sonatype-nexus-staging</id>
43+
<name>Nexus Release Repository</name>
44+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
45+
</repository>
4146
</distributionManagement>
4247

4348
<parent>
@@ -65,7 +70,7 @@
6570
<version>1.6.3</version>
6671
<extensions>true</extensions>
6772
<configuration>
68-
<serverId>ossrh</serverId>
73+
<serverId>sonatype-nexus-staging</serverId>
6974
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
7075
<autoReleaseAfterClose>true</autoReleaseAfterClose>
7176
</configuration>
@@ -99,13 +104,51 @@
99104
<artifactId>maven-release-plugin</artifactId>
100105
<version>2.2.2</version>
101106
</plugin>
102-
<plugin>
103-
<groupId>org.apache.maven.plugins</groupId>
104-
<artifactId>maven-deploy-plugin</artifactId>
105-
<version>2.7</version>
106-
</plugin>
107107
</plugins>
108+
<pluginManagement>
109+
<plugins>
110+
<plugin>
111+
<groupId>org.apache.maven.plugins</groupId>
112+
<artifactId>maven-release-plugin</artifactId>
113+
<version>2.2.2</version>
114+
<configuration>
115+
<useReleaseProfile>false</useReleaseProfile>
116+
<arguments>-Psonatype-oss-release</arguments>
117+
</configuration>
118+
</plugin>
119+
</plugins>
120+
</pluginManagement>
108121
</build>
122+
<profiles>
123+
<profile>
124+
<id>sonatype-oss-release</id>
125+
<build>
126+
<plugins>
127+
<plugin>
128+
<groupId>org.apache.maven.plugins</groupId>
129+
<artifactId>maven-source-plugin</artifactId>
130+
</plugin>
131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-javadoc-plugin</artifactId>
134+
</plugin>
135+
<plugin>
136+
<groupId>org.apache.maven.plugins</groupId>
137+
<artifactId>maven-gpg-plugin</artifactId>
138+
<executions>
139+
<execution>
140+
<id>sign-artifacts</id>
141+
<phase>verify</phase>
142+
<goals>
143+
<goal>sign</goal>
144+
</goals>
145+
</execution>
146+
</executions>
147+
</plugin>
148+
</plugins>
149+
</build>
150+
</profile>
151+
</profiles>
109152
<dependencies>
110153
<dependency>
111154
<groupId>org.json</groupId>

0 commit comments

Comments
 (0)