Skip to content

Commit bea15aa

Browse files
committed
[refactor] Move publishing and signing into a profile
1 parent 0b72801 commit bea15aa

File tree

2 files changed

+37
-21
lines changed

2 files changed

+37
-21
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
- steps:
1919
- run:
2020
name: "Maven - Build Package"
21-
command: mvn -V -DskipTests=true -Dgpg.skip=true install
21+
command: mvn -V -DskipTests=true install
2222
- run:
2323
name: "Maven - Test Package"
24-
command: mvn -Dgpg.skip=true verify
24+
command: mvn verify
2525

2626

2727
workflows:

pom.xml

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -323,38 +323,54 @@
323323
<configuration>
324324
<useAgent>true</useAgent>
325325
</configuration>
326-
<executions>
327-
<execution>
328-
<id>sign-artifacts</id>
329-
<phase>verify</phase>
330-
<goals>
331-
<goal>sign</goal>
332-
</goals>
333-
</execution>
334-
</executions>
335326
</plugin>
336327
<plugin>
337328
<groupId>org.apache.maven.plugins</groupId>
338329
<artifactId>maven-release-plugin</artifactId>
339330
<configuration>
340331
<autoVersionSubmodules>true</autoVersionSubmodules>
341332
<tagNameFormat>${project.artifactId}-@{project.version}</tagNameFormat>
342-
</configuration>
343-
</plugin>
344-
<plugin>
345-
<groupId>org.sonatype.central</groupId>
346-
<artifactId>central-publishing-maven-plugin</artifactId>
347-
<configuration>
348-
<publishingServerId>central</publishingServerId>
349-
<deploymentName>${project.artifactId}</deploymentName>
350-
<failOnBuildFailure>true</failOnBuildFailure>
351-
<waitUntil>validated</waitUntil>
333+
<releaseProfiles>elemental-expath-package-release</releaseProfiles>
352334
</configuration>
353335
</plugin>
354336
</plugins>
355337

356338
</build>
357339

340+
<profiles>
341+
<profile>
342+
<!-- NOTE(AR) This profile will be activated by the maven-release-plugin -->
343+
<id>elemental-expath-package-release</id>
344+
<build>
345+
<plugins>
346+
<plugin>
347+
<groupId>org.apache.maven.plugins</groupId>
348+
<artifactId>maven-gpg-plugin</artifactId>
349+
<executions>
350+
<execution>
351+
<id>sign-artifacts</id>
352+
<phase>verify</phase>
353+
<goals>
354+
<goal>sign</goal>
355+
</goals>
356+
</execution>
357+
</executions>
358+
</plugin>
359+
<plugin>
360+
<groupId>org.sonatype.central</groupId>
361+
<artifactId>central-publishing-maven-plugin</artifactId>
362+
<configuration>
363+
<publishingServerId>central</publishingServerId>
364+
<deploymentName>${project.artifactId}-${project.version}</deploymentName>
365+
<failOnBuildFailure>true</failOnBuildFailure>
366+
<waitUntil>validated</waitUntil>
367+
</configuration>
368+
</plugin>
369+
</plugins>
370+
</build>
371+
</profile>
372+
</profiles>
373+
358374
<pluginRepositories>
359375
<pluginRepository>
360376
<id>clojars.org</id>

0 commit comments

Comments
 (0)