Skip to content

Commit 4c45e02

Browse files
committed
build source and javadoc jars for Maven central deployment
1 parent 6fb3ce1 commit 4c45e02

File tree

2 files changed

+51
-7
lines changed

2 files changed

+51
-7
lines changed

pom.template.xml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,16 +221,25 @@
221221
<id>central-snapshot</id>
222222
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
223223
</snapshotRepository>
224-
</distributionManagement>
224+
</distributionManagement>
225225

226226
<build>
227227
<plugins>
228228
<plugin>
229229
<groupId>org.apache.maven.plugins</groupId>
230230
<artifactId>maven-source-plugin</artifactId>
231231
<version>3.3.1</version>
232+
<executions>
233+
<execution>
234+
<id>attach-sources</id>
235+
<phase>package</phase>
236+
<goals>
237+
<goal>jar</goal>
238+
</goals>
239+
</execution>
240+
</executions>
232241
</plugin>
233-
242+
234243
<plugin>
235244
<!-- Add Clojure sources to the project's source directories -->
236245
<groupId>org.codehaus.mojo</groupId>
@@ -289,7 +298,7 @@
289298
</plugin>
290299
<plugin>
291300
<artifactId>maven-jar-plugin</artifactId>
292-
<version>2.4.2</version>
301+
<version>3.4.2</version>
293302
<configuration>
294303
<archive>
295304
<manifest>
@@ -317,6 +326,19 @@
317326
</includes>
318327
</configuration>
319328
</execution>
329+
<execution>
330+
<id>javadoc-jar</id>
331+
<phase>package</phase>
332+
<goals>
333+
<goal>jar</goal>
334+
</goals>
335+
<configuration>
336+
<excludes>
337+
<exclude>**</exclude>
338+
</excludes>
339+
<classifier>javadoc</classifier>
340+
</configuration>
341+
</execution>
320342
</executions>
321343
</plugin>
322344
<plugin>

pom.xml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,15 @@
229229
<groupId>org.apache.maven.plugins</groupId>
230230
<artifactId>maven-source-plugin</artifactId>
231231
<version>3.3.1</version>
232+
<executions>
233+
<execution>
234+
<id>attach-sources</id>
235+
<phase>package</phase>
236+
<goals>
237+
<goal>jar</goal>
238+
</goals>
239+
</execution>
240+
</executions>
232241
</plugin>
233242

234243
<plugin>
@@ -317,6 +326,19 @@
317326
</includes>
318327
</configuration>
319328
</execution>
329+
<execution>
330+
<id>javadoc-jar</id>
331+
<phase>package</phase>
332+
<goals>
333+
<goal>jar</goal>
334+
</goals>
335+
<configuration>
336+
<excludes>
337+
<exclude>**</exclude>
338+
</excludes>
339+
<classifier>javadoc</classifier>
340+
</configuration>
341+
</execution>
320342
</executions>
321343
</plugin>
322344
<plugin>
@@ -355,10 +377,10 @@
355377
<artifactId>maven-gpg-plugin</artifactId>
356378
<version>3.1.0</version>
357379
<configuration>
358-
<gpgArguments>
359-
<arg>--pinentry-mode</arg>
360-
<arg>loopback</arg>
361-
</gpgArguments>
380+
<gpgArguments>
381+
<arg>--pinentry-mode</arg>
382+
<arg>loopback</arg>
383+
</gpgArguments>
362384
</configuration>
363385
</plugin>
364386
<plugin>

0 commit comments

Comments
 (0)