Skip to content

Commit 2a7695a

Browse files
committed
Set up release to Maven Central
1 parent 9f51974 commit 2a7695a

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

pom.xml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@
1010
<description>A Java client library for TensorFlow Serving</description>
1111
<url>https://github.com/tadayosi/tensorflow-serving-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/tensorflow-serving-client-java.git</connection>
1531
<developerConnection>scm:git:[email protected]:tadayosi/tensorflow-serving-client-java.git</developerConnection>
@@ -32,8 +48,12 @@
3248
<testcontainers-version>1.20.4</testcontainers-version>
3349

3450
<build-helper-maven-plugin-version>3.6.0</build-helper-maven-plugin-version>
51+
<central-publishing-maven-plugin-version>0.6.0</central-publishing-maven-plugin-version>
3552
<maven-failsafe-plugin-version>3.5.0</maven-failsafe-plugin-version>
53+
<maven-gpg-plugin-version>3.2.7</maven-gpg-plugin-version>
54+
<maven-javadoc-plugin-version>3.11.2</maven-javadoc-plugin-version>
3655
<maven-release-plugin-version>3.1.1</maven-release-plugin-version>
56+
<maven-source-plugin-version>3.3.1</maven-source-plugin-version>
3757
<maven-surefire-plugin-version>3.5.2</maven-surefire-plugin-version>
3858
<protobuf-maven-plugin-version>2.7.0</protobuf-maven-plugin-version>
3959
</properties>
@@ -163,4 +183,66 @@
163183
</plugin>
164184
</plugins>
165185
</build>
186+
187+
<profiles>
188+
<profile>
189+
<id>release</id>
190+
<build>
191+
<plugins>
192+
<plugin>
193+
<groupId>org.apache.maven.plugins</groupId>
194+
<artifactId>maven-source-plugin</artifactId>
195+
<version>${maven-source-plugin-version}</version>
196+
<executions>
197+
<execution>
198+
<id>attach-sources</id>
199+
<goals>
200+
<goal>jar-no-fork</goal>
201+
</goals>
202+
</execution>
203+
</executions>
204+
</plugin>
205+
<plugin>
206+
<groupId>org.apache.maven.plugins</groupId>
207+
<artifactId>maven-javadoc-plugin</artifactId>
208+
<version>${maven-javadoc-plugin-version}</version>
209+
<executions>
210+
<execution>
211+
<id>attach-javadocs</id>
212+
<goals>
213+
<goal>jar</goal>
214+
</goals>
215+
</execution>
216+
</executions>
217+
</plugin>
218+
<plugin>
219+
<groupId>org.apache.maven.plugins</groupId>
220+
<artifactId>maven-gpg-plugin</artifactId>
221+
<version>${maven-gpg-plugin-version}</version>
222+
<executions>
223+
<execution>
224+
<id>sign-artifacts</id>
225+
<phase>verify</phase>
226+
<goals>
227+
<goal>sign</goal>
228+
</goals>
229+
</execution>
230+
</executions>
231+
</plugin>
232+
233+
<!-- Sonatype Central -->
234+
<plugin>
235+
<groupId>org.sonatype.central</groupId>
236+
<artifactId>central-publishing-maven-plugin</artifactId>
237+
<version>${central-publishing-maven-plugin-version}</version>
238+
<extensions>true</extensions>
239+
<configuration>
240+
<publishingServerId>central</publishingServerId>
241+
<autoPublish>true</autoPublish>
242+
</configuration>
243+
</plugin>
244+
</plugins>
245+
</build>
246+
</profile>
247+
</profiles>
166248
</project>

0 commit comments

Comments
 (0)