Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Commit b546758

Browse files
Create a Maven profile for sonatype recommended release configuration
Closes gh-8.
1 parent 1cb4094 commit b546758

1 file changed

Lines changed: 71 additions & 13 deletions

File tree

pom.xml

Lines changed: 71 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,25 +86,15 @@
8686
<target>1.6</target>
8787
</configuration>
8888
</plugin>
89-
<plugin>
90-
<groupId>org.apache.maven.plugins</groupId>
91-
<artifactId>maven-source-plugin</artifactId>
92-
<version>2.4</version>
93-
<executions>
94-
<execution>
95-
<id>attach-sources</id>
96-
<goals>
97-
<goal>jar</goal>
98-
</goals>
99-
</execution>
100-
</executions>
101-
</plugin>
10289
<plugin>
10390
<groupId>org.apache.maven.plugins</groupId>
10491
<artifactId>maven-release-plugin</artifactId>
10592
<version>2.5.2</version>
10693
<configuration>
94+
<useReleaseProfile>false</useReleaseProfile>
95+
<releaseProfiles>release</releaseProfiles>
10796
<tagNameFormat>v@{project.version}</tagNameFormat>
97+
<goal>deploy</goal>
10898
</configuration>
10999
</plugin>
110100
<plugin>
@@ -242,5 +232,73 @@
242232
</dependency>
243233
</dependencies>
244234
</profile>
235+
<profile>
236+
<id>release</id>
237+
<distributionManagement>
238+
<snapshotRepository>
239+
<id>ossrh</id>
240+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
241+
</snapshotRepository>
242+
<repository>
243+
<id>ossrh</id>
244+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
245+
</repository>
246+
</distributionManagement>
247+
<build>
248+
<plugins>
249+
<plugin>
250+
<groupId>org.apache.maven.plugins</groupId>
251+
<artifactId>maven-javadoc-plugin</artifactId>
252+
<version>2.10.3</version>
253+
<executions>
254+
<execution>
255+
<id>attach-javadocs</id>
256+
<goals>
257+
<goal>jar</goal>
258+
</goals>
259+
</execution>
260+
</executions>
261+
</plugin>
262+
<plugin>
263+
<groupId>org.apache.maven.plugins</groupId>
264+
<artifactId>maven-source-plugin</artifactId>
265+
<version>2.4</version>
266+
<executions>
267+
<execution>
268+
<id>attach-sources</id>
269+
<goals>
270+
<goal>jar-no-fork</goal>
271+
</goals>
272+
</execution>
273+
</executions>
274+
</plugin>
275+
<plugin>
276+
<groupId>org.sonatype.plugins</groupId>
277+
<artifactId>nexus-staging-maven-plugin</artifactId>
278+
<version>1.6.5</version>
279+
<extensions>true</extensions>
280+
<configuration>
281+
<serverId>ossrh</serverId>
282+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
283+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
284+
</configuration>
285+
</plugin>
286+
<plugin>
287+
<groupId>org.apache.maven.plugins</groupId>
288+
<artifactId>maven-gpg-plugin</artifactId>
289+
<version>1.5</version>
290+
<executions>
291+
<execution>
292+
<id>sign-artifacts</id>
293+
<phase>verify</phase>
294+
<goals>
295+
<goal>sign</goal>
296+
</goals>
297+
</execution>
298+
</executions>
299+
</plugin>
300+
</plugins>
301+
</build>
302+
</profile>
245303
</profiles>
246304
</project>

0 commit comments

Comments
 (0)