Skip to content

Commit 59f2f73

Browse files
authored
Merge pull request #2 from codecentric/codecentric-refactoring
added missing maven release tools
2 parents e69784e + d69b279 commit 59f2f73

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

pom.xml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2424
<junit.version>5.5.2</junit.version>
2525
<jacoco.version>0.8.2</jacoco.version>
26+
<!-- Maven Central Release tools -->
27+
<versions-maven-plugin.version>2.8.1</versions-maven-plugin.version>
28+
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
29+
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
30+
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
31+
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
32+
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
2633
</properties>
2734

2835
<dependencies>
@@ -126,4 +133,96 @@
126133
</plugin>
127134
</plugins>
128135
</build>
136+
<profiles>
137+
<!-- plugins needed to deploy to Maven Central -->
138+
<profile>
139+
<id>central-deploy</id>
140+
<build>
141+
<plugins>
142+
<plugin>
143+
<artifactId>maven-gpg-plugin</artifactId>
144+
<version>${maven-gpg-plugin.version}</version>
145+
<executions>
146+
<execution>
147+
<id>sign-artifacts</id>
148+
<phase>verify</phase>
149+
<goals>
150+
<goal>sign</goal>
151+
</goals>
152+
<configuration>
153+
<!-- This is necessary for gpg to not try to use the pinentry programs -->
154+
<gpgArguments>
155+
<arg>--pinentry-mode</arg>
156+
<arg>loopback</arg>
157+
</gpgArguments>
158+
</configuration>
159+
</execution>
160+
</executions>
161+
</plugin>
162+
<plugin>
163+
<groupId>org.codehaus.mojo</groupId>
164+
<artifactId>versions-maven-plugin</artifactId>
165+
<version>${versions-maven-plugin.version}</version>
166+
<configuration>
167+
<generateBackupPoms>false</generateBackupPoms>
168+
</configuration>
169+
</plugin>
170+
<plugin>
171+
<artifactId>maven-deploy-plugin</artifactId>
172+
<version>${maven-deploy-plugin.version}</version>
173+
<configuration>
174+
<skip>true</skip>
175+
</configuration>
176+
</plugin>
177+
<plugin>
178+
<groupId>org.apache.maven.plugins</groupId>
179+
<artifactId>maven-source-plugin</artifactId>
180+
<version>${maven-source-plugin.version}</version>
181+
<executions>
182+
<execution>
183+
<id>attach-sources</id>
184+
<goals>
185+
<goal>jar</goal>
186+
</goals>
187+
</execution>
188+
</executions>
189+
</plugin>
190+
<plugin>
191+
<groupId>org.apache.maven.plugins</groupId>
192+
<artifactId>maven-javadoc-plugin</artifactId>
193+
<version>${maven-javadoc-plugin.version}</version>
194+
<executions>
195+
<execution>
196+
<id>attach-javadocs</id>
197+
<goals>
198+
<goal>jar</goal>
199+
</goals>
200+
</execution>
201+
</executions>
202+
</plugin>
203+
<plugin>
204+
<groupId>org.sonatype.plugins</groupId>
205+
<artifactId>nexus-staging-maven-plugin</artifactId>
206+
<version>${nexus-staging-maven-plugin.version}</version>
207+
<extensions>true</extensions>
208+
<configuration>
209+
<serverId>oss.sonatype.org</serverId>
210+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
211+
<description>${project.version}</description>
212+
</configuration>
213+
<executions>
214+
<execution>
215+
<id>deploy-to-sonatype</id>
216+
<phase>deploy</phase>
217+
<goals>
218+
<goal>deploy</goal>
219+
<goal>release</goal>
220+
</goals>
221+
</execution>
222+
</executions>
223+
</plugin>
224+
</plugins>
225+
</build>
226+
</profile>
227+
</profiles>
129228
</project>

0 commit comments

Comments
 (0)