Skip to content

Commit 6fb3ce1

Browse files
committed
update build deployment plugins
1 parent 526ab9a commit 6fb3ce1

File tree

3 files changed

+141
-118
lines changed

3 files changed

+141
-118
lines changed

pom.template.xml

Lines changed: 70 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -203,20 +203,6 @@
203203
<url>https://github.com/clojure/clojurescript</url>
204204
</scm>
205205

206-
<!--
207-
<parent>
208-
<groupId>org.clojure</groupId>
209-
<artifactId>pom.contrib</artifactId>
210-
<version>1.3.0</version>
211-
</parent>
212-
-->
213-
214-
<parent>
215-
<groupId>org.sonatype.oss</groupId>
216-
<artifactId>oss-parent</artifactId>
217-
<version>7</version>
218-
</parent>
219-
220206
<properties>
221207
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
222208
<clojure.source.dir>src/main/clojure</clojure.source.dir>
@@ -226,13 +212,30 @@
226212
<directlinking>true</directlinking>
227213
</properties>
228214

215+
<distributionManagement>
216+
<repository>
217+
<id>central</id>
218+
<url>https://central.sonatype.com</url>
219+
</repository>
220+
<snapshotRepository>
221+
<id>central-snapshot</id>
222+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
223+
</snapshotRepository>
224+
</distributionManagement>
225+
229226
<build>
230227
<plugins>
228+
<plugin>
229+
<groupId>org.apache.maven.plugins</groupId>
230+
<artifactId>maven-source-plugin</artifactId>
231+
<version>3.3.1</version>
232+
</plugin>
233+
231234
<plugin>
232235
<!-- Add Clojure sources to the project's source directories -->
233236
<groupId>org.codehaus.mojo</groupId>
234237
<artifactId>build-helper-maven-plugin</artifactId>
235-
<version>1.5</version>
238+
<version>3.0.0</version>
236239
<executions>
237240
<execution>
238241
<id>add-clojure-source-dirs</id>
@@ -286,7 +289,7 @@
286289
</plugin>
287290
<plugin>
288291
<artifactId>maven-jar-plugin</artifactId>
289-
<version>2.4</version>
292+
<version>2.4.2</version>
290293
<configuration>
291294
<archive>
292295
<manifest>
@@ -318,7 +321,7 @@
318321
</plugin>
319322
<plugin>
320323
<artifactId>maven-assembly-plugin</artifactId>
321-
<version>2.4</version>
324+
<version>3.7.1</version>
322325
<executions>
323326
<execution>
324327
<id>aot-jar</id>
@@ -352,62 +355,71 @@
352355
<artifactId>maven-gpg-plugin</artifactId>
353356
<version>3.1.0</version>
354357
<configuration>
355-
<gpgArguments>
356-
<arg>--pinentry-mode</arg>
357-
<arg>loopback</arg>
358-
</gpgArguments>
358+
<gpgArguments>
359+
<arg>--pinentry-mode</arg>
360+
<arg>loopback</arg>
361+
</gpgArguments>
359362
</configuration>
360363
</plugin>
361364
<plugin>
362365
<groupId>org.apache.maven.plugins</groupId>
363366
<artifactId>maven-compiler-plugin</artifactId>
364-
<version>3.1</version>
367+
<version>3.8.1</version>
365368
<configuration>
366369
<source>21</source>
367370
<target>21</target>
368371
</configuration>
369372
</plugin>
373+
374+
<plugin>
375+
<!-- do not push pre-deployment SCM changes to upstream repo
376+
with maven release plugin; if the release/deploy fails,
377+
we're stuck with manually fixing up version numbers, git
378+
history, etc -->
379+
<groupId>org.apache.maven.plugins</groupId>
380+
<artifactId>maven-release-plugin</artifactId>
381+
<version>2.5.3</version>
382+
<configuration>
383+
</configuration>
384+
</plugin>
385+
386+
<!-- deploy artifacts to sonatype -->
387+
<plugin>
388+
<groupId>org.sonatype.central</groupId>
389+
<artifactId>central-publishing-maven-plugin</artifactId>
390+
<version>0.7.0</version>
391+
<extensions>true</extensions>
392+
<configuration>
393+
<publishingServerId>central</publishingServerId>
394+
<autoPublish>true</autoPublish>
395+
</configuration>
396+
</plugin>
397+
370398
</plugins>
371399
</build>
372400

373401
<profiles>
374402
<profile>
375-
<id>sonatype-oss-release</id>
376-
<!-- This profile is enabled automatically by the Sonatype
377-
oss-parent POM when invoking the Maven Release Plugin -->
378-
<build>
379-
<plugins>
380-
<plugin>
381-
<groupId>org.apache.maven.plugins</groupId>
382-
<artifactId>maven-deploy-plugin</artifactId>
383-
<version>2.7</version>
384-
<configuration>
385-
<skip>true</skip>
386-
</configuration>
387-
</plugin>
388-
<plugin>
389-
<groupId>org.sonatype.plugins</groupId>
390-
<artifactId>nexus-staging-maven-plugin</artifactId>
391-
<version>1.7.0</version>
392-
<executions>
393-
<execution>
394-
<id>default-deploy</id>
395-
<phase>deploy</phase>
396-
<!-- By default, this is the phase deploy goal will bind to -->
397-
<goals>
398-
<goal>deploy</goal>
399-
</goals>
400-
</execution>
401-
</executions>
402-
<configuration>
403-
<!-- The Base URL of Nexus instance where we want to stage -->
404-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
405-
<!-- The server "id" element from settings to use authentication from -->
406-
<serverId>sonatype-nexus-staging</serverId>
407-
</configuration>
408-
</plugin>
409-
</plugins>
410-
</build>
403+
<id>sign</id>
404+
<build>
405+
<plugins>
406+
<!-- sign artifacts for deployment -->
407+
<plugin>
408+
<groupId>org.apache.maven.plugins</groupId>
409+
<artifactId>maven-gpg-plugin</artifactId>
410+
<version>1.5</version>
411+
<executions>
412+
<execution>
413+
<id>sign-artifacts</id>
414+
<phase>verify</phase>
415+
<goals>
416+
<goal>sign</goal>
417+
</goals>
418+
</execution>
419+
</executions>
420+
</plugin>
421+
</plugins>
422+
</build>
411423
</profile>
412424
</profiles>
413425
</project>

pom.xml

Lines changed: 70 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -203,20 +203,6 @@
203203
<url>https://github.com/clojure/clojurescript</url>
204204
</scm>
205205

206-
<!--
207-
<parent>
208-
<groupId>org.clojure</groupId>
209-
<artifactId>pom.contrib</artifactId>
210-
<version>1.3.0</version>
211-
</parent>
212-
-->
213-
214-
<parent>
215-
<groupId>org.sonatype.oss</groupId>
216-
<artifactId>oss-parent</artifactId>
217-
<version>7</version>
218-
</parent>
219-
220206
<properties>
221207
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
222208
<clojure.source.dir>src/main/clojure</clojure.source.dir>
@@ -226,13 +212,30 @@
226212
<directlinking>true</directlinking>
227213
</properties>
228214

215+
<distributionManagement>
216+
<repository>
217+
<id>central</id>
218+
<url>https://central.sonatype.com</url>
219+
</repository>
220+
<snapshotRepository>
221+
<id>central-snapshot</id>
222+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
223+
</snapshotRepository>
224+
</distributionManagement>
225+
229226
<build>
230227
<plugins>
228+
<plugin>
229+
<groupId>org.apache.maven.plugins</groupId>
230+
<artifactId>maven-source-plugin</artifactId>
231+
<version>3.3.1</version>
232+
</plugin>
233+
231234
<plugin>
232235
<!-- Add Clojure sources to the project's source directories -->
233236
<groupId>org.codehaus.mojo</groupId>
234237
<artifactId>build-helper-maven-plugin</artifactId>
235-
<version>1.5</version>
238+
<version>3.0.0</version>
236239
<executions>
237240
<execution>
238241
<id>add-clojure-source-dirs</id>
@@ -286,7 +289,7 @@
286289
</plugin>
287290
<plugin>
288291
<artifactId>maven-jar-plugin</artifactId>
289-
<version>2.4</version>
292+
<version>3.4.2</version>
290293
<configuration>
291294
<archive>
292295
<manifest>
@@ -318,7 +321,7 @@
318321
</plugin>
319322
<plugin>
320323
<artifactId>maven-assembly-plugin</artifactId>
321-
<version>2.4</version>
324+
<version>3.7.1</version>
322325
<executions>
323326
<execution>
324327
<id>aot-jar</id>
@@ -352,62 +355,71 @@
352355
<artifactId>maven-gpg-plugin</artifactId>
353356
<version>3.1.0</version>
354357
<configuration>
355-
<gpgArguments>
356-
<arg>--pinentry-mode</arg>
357-
<arg>loopback</arg>
358-
</gpgArguments>
358+
<gpgArguments>
359+
<arg>--pinentry-mode</arg>
360+
<arg>loopback</arg>
361+
</gpgArguments>
359362
</configuration>
360363
</plugin>
361364
<plugin>
362365
<groupId>org.apache.maven.plugins</groupId>
363366
<artifactId>maven-compiler-plugin</artifactId>
364-
<version>3.1</version>
367+
<version>3.8.1</version>
365368
<configuration>
366369
<source>21</source>
367370
<target>21</target>
368371
</configuration>
369372
</plugin>
373+
374+
<plugin>
375+
<!-- do not push pre-deployment SCM changes to upstream repo
376+
with maven release plugin; if the release/deploy fails,
377+
we're stuck with manually fixing up version numbers, git
378+
history, etc -->
379+
<groupId>org.apache.maven.plugins</groupId>
380+
<artifactId>maven-release-plugin</artifactId>
381+
<version>2.5.3</version>
382+
<configuration>
383+
</configuration>
384+
</plugin>
385+
386+
<!-- deploy artifacts to sonatype -->
387+
<plugin>
388+
<groupId>org.sonatype.central</groupId>
389+
<artifactId>central-publishing-maven-plugin</artifactId>
390+
<version>0.7.0</version>
391+
<extensions>true</extensions>
392+
<configuration>
393+
<publishingServerId>central</publishingServerId>
394+
<autoPublish>true</autoPublish>
395+
</configuration>
396+
</plugin>
397+
370398
</plugins>
371399
</build>
372400

373401
<profiles>
374402
<profile>
375-
<id>sonatype-oss-release</id>
376-
<!-- This profile is enabled automatically by the Sonatype
377-
oss-parent POM when invoking the Maven Release Plugin -->
378-
<build>
379-
<plugins>
380-
<plugin>
381-
<groupId>org.apache.maven.plugins</groupId>
382-
<artifactId>maven-deploy-plugin</artifactId>
383-
<version>2.7</version>
384-
<configuration>
385-
<skip>true</skip>
386-
</configuration>
387-
</plugin>
388-
<plugin>
389-
<groupId>org.sonatype.plugins</groupId>
390-
<artifactId>nexus-staging-maven-plugin</artifactId>
391-
<version>1.7.0</version>
392-
<executions>
393-
<execution>
394-
<id>default-deploy</id>
395-
<phase>deploy</phase>
396-
<!-- By default, this is the phase deploy goal will bind to -->
397-
<goals>
398-
<goal>deploy</goal>
399-
</goals>
400-
</execution>
401-
</executions>
402-
<configuration>
403-
<!-- The Base URL of Nexus instance where we want to stage -->
404-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
405-
<!-- The server "id" element from settings to use authentication from -->
406-
<serverId>sonatype-nexus-staging</serverId>
407-
</configuration>
408-
</plugin>
409-
</plugins>
410-
</build>
403+
<id>sign</id>
404+
<build>
405+
<plugins>
406+
<!-- sign artifacts for deployment -->
407+
<plugin>
408+
<groupId>org.apache.maven.plugins</groupId>
409+
<artifactId>maven-gpg-plugin</artifactId>
410+
<version>1.5</version>
411+
<executions>
412+
<execution>
413+
<id>sign-artifacts</id>
414+
<phase>verify</phase>
415+
<goals>
416+
<goal>sign</goal>
417+
</goals>
418+
</execution>
419+
</executions>
420+
</plugin>
421+
</plugins>
422+
</build>
411423
</profile>
412424
</profiles>
413425
</project>

script/build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ mv $AOT_CACHE_FILE src/main/cljs/cljs/core.cljs.cache.aot.edn
6666

6767
# For Hudson server
6868
if [ "$HUDSON" = "true" ]; then
69-
mvn -B -ntp --fail-at-end -Psonatype-oss-release $CLJS_SCRIPT_MVN_OPTS \
70-
clean deploy nexus-staging:release
69+
mvn -B -ntp --fail-at-end -DskipStaging=true -Psign $CLJS_SCRIPT_MVN_OPTS clean deploy
7170

7271
echo "Creating tag $TAG"
7372
git tag -f "$TAG"

0 commit comments

Comments
 (0)