Skip to content

Commit 51e7732

Browse files
committed
Set up release to Maven Central
1 parent b9328f2 commit 51e7732

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

pom.xml

+82
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@
1010
<description>A Java client library for TorchServe</description>
1111
<url>https://github.com/tadayosi/torchserve-client-java</url>
1212

13+
<licenses>
14+
<license>
15+
<name>The Apache Software License, Version 2.0</name>
16+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
17+
<distribution>repo</distribution>
18+
</license>
19+
</licenses>
20+
21+
<developers>
22+
<developer>
23+
<name>Tadayoshi Sato</name>
24+
<email>[email protected]</email>
25+
<url>https://github.com/tadayosi</url>
26+
</developer>
27+
</developers>
28+
1329
<scm>
1430
<connection>scm:git:[email protected]:tadayosi/torchserve-client-java.git</connection>
1531
<developerConnection>scm:git:[email protected]:tadayosi/torchserve-client-java.git</developerConnection>
@@ -34,8 +50,12 @@
3450
<testcontainers-version>1.20.4</testcontainers-version>
3551

3652
<build-helper-maven-plugin-version>3.6.0</build-helper-maven-plugin-version>
53+
<central-publishing-maven-plugin-version>0.6.0</central-publishing-maven-plugin-version>
3754
<maven-failsafe-plugin-version>3.5.0</maven-failsafe-plugin-version>
55+
<maven-gpg-plugin-version>3.2.7</maven-gpg-plugin-version>
56+
<maven-javadoc-plugin-version>3.11.2</maven-javadoc-plugin-version>
3857
<maven-release-plugin-version>3.1.1</maven-release-plugin-version>
58+
<maven-source-plugin-version>3.3.1</maven-source-plugin-version>
3959
<maven-surefire-plugin-version>3.5.1</maven-surefire-plugin-version>
4060
<openapi-generator-maven-plugin-version>7.8.0</openapi-generator-maven-plugin-version>
4161
</properties>
@@ -244,4 +264,66 @@
244264
</plugin>
245265
</plugins>
246266
</build>
267+
268+
<profiles>
269+
<profile>
270+
<id>release</id>
271+
<build>
272+
<plugins>
273+
<plugin>
274+
<groupId>org.apache.maven.plugins</groupId>
275+
<artifactId>maven-source-plugin</artifactId>
276+
<version>${maven-source-plugin-version}</version>
277+
<executions>
278+
<execution>
279+
<id>attach-sources</id>
280+
<goals>
281+
<goal>jar-no-fork</goal>
282+
</goals>
283+
</execution>
284+
</executions>
285+
</plugin>
286+
<plugin>
287+
<groupId>org.apache.maven.plugins</groupId>
288+
<artifactId>maven-javadoc-plugin</artifactId>
289+
<version>${maven-javadoc-plugin-version}</version>
290+
<executions>
291+
<execution>
292+
<id>attach-javadocs</id>
293+
<goals>
294+
<goal>jar</goal>
295+
</goals>
296+
</execution>
297+
</executions>
298+
</plugin>
299+
<plugin>
300+
<groupId>org.apache.maven.plugins</groupId>
301+
<artifactId>maven-gpg-plugin</artifactId>
302+
<version>${maven-gpg-plugin-version}</version>
303+
<executions>
304+
<execution>
305+
<id>sign-artifacts</id>
306+
<phase>verify</phase>
307+
<goals>
308+
<goal>sign</goal>
309+
</goals>
310+
</execution>
311+
</executions>
312+
</plugin>
313+
314+
<!-- OSSRH -->
315+
<plugin>
316+
<groupId>org.sonatype.central</groupId>
317+
<artifactId>central-publishing-maven-plugin</artifactId>
318+
<version>${central-publishing-maven-plugin-version}</version>
319+
<extensions>true</extensions>
320+
<configuration>
321+
<publishingServerId>central</publishingServerId>
322+
<autoPublish>true</autoPublish>
323+
</configuration>
324+
</plugin>
325+
</plugins>
326+
</build>
327+
</profile>
328+
</profiles>
247329
</project>

0 commit comments

Comments
 (0)