Skip to content

Commit 5ef7129

Browse files
committed
Add maven configuration for deploying to Sonatype OSSRH
1 parent 88d427b commit 5ef7129

File tree

1 file changed

+93
-14
lines changed

1 file changed

+93
-14
lines changed

pom.xml

+93-14
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,6 @@
1818
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1919
</properties>
2020

21-
<build>
22-
<plugins>
23-
<plugin>
24-
<groupId>org.apache.maven.plugins</groupId>
25-
<artifactId>maven-compiler-plugin</artifactId>
26-
<version>3.3</version>
27-
<configuration>
28-
<source>7</source>
29-
<target>7</target>
30-
</configuration>
31-
</plugin>
32-
</plugins>
33-
</build>
34-
3521
<dependencies>
3622
<dependency>
3723
<groupId>junit</groupId>
@@ -47,6 +33,42 @@
4733
</dependency>
4834
</dependencies>
4935

36+
<build>
37+
<plugins>
38+
<plugin>
39+
<groupId>org.apache.maven.plugins</groupId>
40+
<artifactId>maven-compiler-plugin</artifactId>
41+
<version>3.3</version>
42+
<configuration>
43+
<source>7</source>
44+
<target>7</target>
45+
</configuration>
46+
</plugin>
47+
<plugin>
48+
<groupId>org.sonatype.plugins</groupId>
49+
<artifactId>nexus-staging-maven-plugin</artifactId>
50+
<version>1.6.5</version>
51+
<extensions>true</extensions>
52+
<configuration>
53+
<serverId>ossrh</serverId>
54+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
55+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
56+
</configuration>
57+
</plugin>
58+
<plugin>
59+
<groupId>org.apache.maven.plugins</groupId>
60+
<artifactId>maven-release-plugin</artifactId>
61+
<version>2.5.2</version>
62+
<configuration>
63+
<autoVersionSubmodules>true</autoVersionSubmodules>
64+
<useReleaseProfile>false</useReleaseProfile>
65+
<releaseProfiles>release</releaseProfiles>
66+
<goals>deploy</goals>
67+
</configuration>
68+
</plugin>
69+
</plugins>
70+
</build>
71+
5072
<profiles>
5173
<profile>
5274
<id>benchmark</id>
@@ -59,8 +81,65 @@
5981
</dependency>
6082
</dependencies>
6183
</profile>
84+
<profile>
85+
<id>release</id>
86+
<build>
87+
<plugins>
88+
<plugin>
89+
<groupId>org.apache.maven.plugins</groupId>
90+
<artifactId>maven-source-plugin</artifactId>
91+
<version>2.4</version>
92+
<executions>
93+
<execution>
94+
<id>attach-sources</id>
95+
<goals>
96+
<goal>jar-no-fork</goal>
97+
</goals>
98+
</execution>
99+
</executions>
100+
</plugin>
101+
<plugin>
102+
<groupId>org.apache.maven.plugins</groupId>
103+
<artifactId>maven-javadoc-plugin</artifactId>
104+
<version>2.10.3</version>
105+
<executions>
106+
<execution>
107+
<id>attach-javadocs</id>
108+
<goals>
109+
<goal>jar</goal>
110+
</goals>
111+
</execution>
112+
</executions>
113+
<configuration>
114+
<excludePackageNames>*.internal,*.internal.*</excludePackageNames>
115+
</configuration>
116+
</plugin>
117+
<plugin>
118+
<groupId>org.apache.maven.plugins</groupId>
119+
<artifactId>maven-gpg-plugin</artifactId>
120+
<version>1.6</version>
121+
<executions>
122+
<execution>
123+
<id>sign-artifacts</id>
124+
<phase>verify</phase>
125+
<goals>
126+
<goal>sign</goal>
127+
</goals>
128+
</execution>
129+
</executions>
130+
</plugin>
131+
</plugins>
132+
</build>
133+
</profile>
62134
</profiles>
63135

136+
<distributionManagement>
137+
<snapshotRepository>
138+
<id>ossrh</id>
139+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
140+
</snapshotRepository>
141+
</distributionManagement>
142+
64143
<developers>
65144
<developer>
66145
<name>Robin Stocker</name>

0 commit comments

Comments
 (0)