Skip to content

Commit 2bbe209

Browse files
committed
Add Maven Central release profile
1 parent af8a559 commit 2bbe209

File tree

1 file changed

+100
-3
lines changed

1 file changed

+100
-3
lines changed

pom.xml

Lines changed: 100 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343

4444
<distributionManagement>
4545
<snapshotRepository>
46-
<id>sonatype-snapshot</id>
46+
<id>ossrh</id>
4747
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
4848
</snapshotRepository>
4949
<repository>
50-
<id>sonatype</id>
50+
<id>ossrh</id>
5151
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
5252
</repository>
5353
</distributionManagement>
@@ -102,7 +102,104 @@
102102
<target>1.5</target>
103103
</configuration>
104104
</plugin>
105+
<plugin>
106+
<groupId>org.sonatype.plugins</groupId>
107+
<artifactId>nexus-staging-maven-plugin</artifactId>
108+
<version>1.6.3</version>
109+
<extensions>true</extensions>
110+
<configuration>
111+
<serverId>ossrh</serverId>
112+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
113+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
114+
</configuration>
115+
</plugin>
116+
<plugin>
117+
<groupId>org.apache.maven.plugins</groupId>
118+
<artifactId>maven-source-plugin</artifactId>
119+
<version>2.2.1</version>
120+
</plugin>
121+
<plugin>
122+
<groupId>org.apache.maven.plugins</groupId>
123+
<artifactId>maven-javadoc-plugin</artifactId>
124+
<version>2.9.1</version>
125+
</plugin>
126+
<plugin>
127+
<groupId>org.apache.maven.plugins</groupId>
128+
<artifactId>maven-gpg-plugin</artifactId>
129+
<version>1.5</version>
130+
</plugin>
131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-release-plugin</artifactId>
134+
<version>2.5</version>
135+
</plugin>
105136
</plugins>
106137
</pluginManagement>
138+
<plugins>
139+
<plugin>
140+
<groupId>org.apache.maven.plugins</groupId>
141+
<artifactId>maven-gpg-plugin</artifactId>
142+
<executions>
143+
<execution>
144+
<id>sign-artifacts</id>
145+
<phase>verify</phase>
146+
<goals>
147+
<goal>sign</goal>
148+
</goals>
149+
</execution>
150+
</executions>
151+
</plugin>
152+
<plugin>
153+
<groupId>org.sonatype.plugins</groupId>
154+
<artifactId>nexus-staging-maven-plugin</artifactId>
155+
</plugin>
156+
<plugin>
157+
<groupId>org.apache.maven.plugins</groupId>
158+
<artifactId>maven-release-plugin</artifactId>
159+
<configuration>
160+
<autoVersionSubmodules>true</autoVersionSubmodules>
161+
<useReleaseProfile>false</useReleaseProfile>
162+
<releaseProfiles>release</releaseProfiles>
163+
<goals>deploy nexus-staging:release</goals>
164+
</configuration>
165+
</plugin>
166+
</plugins>
107167
</build>
108-
</project>
168+
169+
<profiles>
170+
<profile>
171+
<id>release</id>
172+
<activation>
173+
<activeByDefault>false</activeByDefault>
174+
</activation>
175+
<build>
176+
<plugins>
177+
<plugin>
178+
<groupId>org.apache.maven.plugins</groupId>
179+
<artifactId>maven-source-plugin</artifactId>
180+
<executions>
181+
<execution>
182+
<id>attach-sources</id>
183+
<goals>
184+
<goal>jar-no-fork</goal>
185+
</goals>
186+
</execution>
187+
</executions>
188+
</plugin>
189+
<plugin>
190+
<groupId>org.apache.maven.plugins</groupId>
191+
<artifactId>maven-javadoc-plugin</artifactId>
192+
<executions>
193+
<execution>
194+
<id>attach-javadocs</id>
195+
<goals>
196+
<goal>jar</goal>
197+
</goals>
198+
</execution>
199+
</executions>
200+
</plugin>
201+
</plugins>
202+
</build>
203+
</profile>
204+
</profiles>
205+
</project>

0 commit comments

Comments
 (0)