Skip to content

Commit 35d22eb

Browse files
committed
fix(jreleaser): update POM files and GitHub Actions workflows for JReleaser configuration
- Add dedicated `smoke-tests` profile - Update GitHub Actions release workflow
1 parent 8b423dc commit 35d22eb

File tree

4 files changed

+106
-110
lines changed

4 files changed

+106
-110
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
env:
5353
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5454
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
55-
run: mvn -B -pl '!smoke-tests' clean install -Drevision=${{ steps.candidate_version.outputs.candidate_version_revision }} -Dchangelist=-rc org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=f-lopes_spring-mvc-test-utils
55+
run: mvn -B clean install -Drevision=${{ steps.candidate_version.outputs.candidate_version_revision }} -Dchangelist=-rc org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=f-lopes_spring-mvc-test-utils
5656

5757
- name: Upload JaCoCo coverage reports to Codecov
5858
uses: codecov/[email protected]
@@ -88,4 +88,4 @@ jobs:
8888
${{ runner.os }}-maven-
8989
9090
- name: Run smoke tests with Java ${{ matrix.java }} for spring-mvc-test-utils ${{ needs.build.outputs.candidate_version_revision }}-rc version
91-
run: mvn -B -pl 'smoke-tests' -Dspring-mvc-test-utils.version=${candidate_version_revision}-rc -Djava.version=${{ matrix.java }} clean verify
91+
run: mvn -B -Psmoke-tests -Dspring-mvc-test-utils.version=${candidate_version_revision}-rc -Djava.version=${{ matrix.java }} clean verify

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
3333
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
3434
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
run: mvn -B -Dchangelist= -pl spring-mvc-test-utils -Prelease deploy jreleaser:deploy
35+
run: mvn -X -B -Dchangelist= -Prelease clean deploy jreleaser:deploy
3636

3737
- name: Set next development version
3838
run: mvn -B build-helper:parse-version versions:set-property -Dproperty=revision -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} versions:commit

pom.xml

Lines changed: 103 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
<modules>
2424
<module>spring-mvc-test-utils</module>
25-
<module>smoke-tests</module>
2625
</modules>
2726

2827
<properties>
@@ -55,6 +54,9 @@
5554
<versions-maven-plugin.version>2.17.1</versions-maven-plugin.version>
5655
<maven-pmd-plugin.version>3.25.0</maven-pmd-plugin.version>
5756
<spotbugs-maven-plugin.version>4.8.6.4</spotbugs-maven-plugin.version>
57+
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
58+
<maven-javadoc-plugin.version>3.10.0</maven-javadoc-plugin.version>
59+
<jreleaser-maven-plugin.version>1.14.0</jreleaser-maven-plugin.version>
5860

5961
<sonar.organization>f-lopes</sonar.organization>
6062
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
@@ -169,6 +171,106 @@
169171
</plugins>
170172
</build>
171173

174+
<profiles>
175+
<profile>
176+
<id>smoke-tests</id>
177+
<modules>
178+
<module>spring-mvc-test-utils</module>
179+
<module>smoke-tests</module>
180+
</modules>
181+
</profile>
182+
<profile>
183+
<id>release</id>
184+
<properties>
185+
<spotbugs.skip>true</spotbugs.skip>
186+
<pmd.skip>true</pmd.skip>
187+
<skipTests>true</skipTests>
188+
<altDeploymentRepository>local::file:./spring-mvc-test-utils/target/staging-deploy
189+
</altDeploymentRepository>
190+
</properties>
191+
<build>
192+
<plugins>
193+
<plugin>
194+
<groupId>org.apache.maven.plugins</groupId>
195+
<artifactId>maven-javadoc-plugin</artifactId>
196+
<version>${maven-javadoc-plugin.version}</version>
197+
<executions>
198+
<execution>
199+
<id>attach-javadocs</id>
200+
<goals>
201+
<goal>jar</goal>
202+
</goals>
203+
<configuration>
204+
<attach>true</attach>
205+
</configuration>
206+
</execution>
207+
</executions>
208+
</plugin>
209+
<plugin>
210+
<groupId>org.apache.maven.plugins</groupId>
211+
<artifactId>maven-source-plugin</artifactId>
212+
<version>${maven-source-plugin.version}</version>
213+
<executions>
214+
<execution>
215+
<id>attach-sources</id>
216+
<goals>
217+
<goal>jar</goal>
218+
</goals>
219+
<configuration>
220+
<attach>true</attach>
221+
</configuration>
222+
</execution>
223+
</executions>
224+
</plugin>
225+
226+
<plugin>
227+
<groupId>org.jreleaser</groupId>
228+
<artifactId>jreleaser-maven-plugin</artifactId>
229+
<version>${jreleaser-maven-plugin.version}</version>
230+
<configuration>
231+
<jreleaser>
232+
<signing>
233+
<active>ALWAYS</active>
234+
<armored>true</armored>
235+
</signing>
236+
<project>
237+
<copyright>2024 Florian Lopes</copyright>
238+
</project>
239+
<deploy>
240+
<maven>
241+
<nexus2>
242+
<maven-central>
243+
<active>ALWAYS</active>
244+
<url>https://oss.sonatype.org/service/local</url>
245+
<snapshotUrl>
246+
https://s01.oss.sonatype.org/content/repositories/snapshots/
247+
</snapshotUrl>
248+
<closeRepository>true</closeRepository>
249+
<releaseRepository>false</releaseRepository>
250+
<stagingRepositories>spring-mvc-test-utils/target/staging-deploy</stagingRepositories>
251+
</maven-central>
252+
</nexus2>
253+
</maven>
254+
</deploy>
255+
</jreleaser>
256+
</configuration>
257+
</plugin>
258+
</plugins>
259+
</build>
260+
</profile>
261+
</profiles>
262+
263+
<distributionManagement>
264+
<snapshotRepository>
265+
<id>ossrh</id>
266+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
267+
</snapshotRepository>
268+
<repository>
269+
<id>ossrh</id>
270+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
271+
</repository>
272+
</distributionManagement>
273+
172274
<developers>
173275
<developer>
174276
<name>Florian Lopes</name>

spring-mvc-test-utils/pom.xml

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,8 @@
3232

3333
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
3434
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
35-
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
36-
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
37-
<maven-javadoc-plugin.version>3.10.0</maven-javadoc-plugin.version>
3835
<maven-jxr-plugin.version>3.4.0</maven-jxr-plugin.version>
39-
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
4036
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
41-
<jreleaser-maven-plugin.version>1.14.0</jreleaser-maven-plugin.version>
4237
</properties>
4338

4439
<dependencyManagement>
@@ -193,105 +188,4 @@
193188
</plugins>
194189
</build>
195190

196-
<profiles>
197-
<profile>
198-
<id>release</id>
199-
<properties>
200-
<spotbugs.skip>true</spotbugs.skip>
201-
<pmd.skip>true</pmd.skip>
202-
<skipTests>true</skipTests>
203-
<altDeploymentRepository>local::file:${project.build.outputDirectory}/staging-deploy
204-
</altDeploymentRepository>
205-
</properties>
206-
<build>
207-
<plugins>
208-
<plugin>
209-
<groupId>org.apache.maven.plugins</groupId>
210-
<artifactId>maven-deploy-plugin</artifactId>
211-
<configuration>
212-
<!-- Disable this plugin to use nexus-staging-maven-plugin instead:
213-
https://github.com/travis-ci/travis-ci/issues/9555 -->
214-
<skip>true</skip>
215-
</configuration>
216-
</plugin>
217-
<plugin>
218-
<groupId>org.apache.maven.plugins</groupId>
219-
<artifactId>maven-javadoc-plugin</artifactId>
220-
<version>${maven-javadoc-plugin.version}</version>
221-
<executions>
222-
<execution>
223-
<id>attach-javadocs</id>
224-
<goals>
225-
<goal>jar</goal>
226-
</goals>
227-
<configuration>
228-
<attach>true</attach>
229-
</configuration>
230-
</execution>
231-
</executions>
232-
</plugin>
233-
<plugin>
234-
<groupId>org.apache.maven.plugins</groupId>
235-
<artifactId>maven-source-plugin</artifactId>
236-
<version>${maven-source-plugin.version}</version>
237-
<executions>
238-
<execution>
239-
<id>attach-sources</id>
240-
<goals>
241-
<goal>jar-no-fork</goal>
242-
</goals>
243-
<configuration>
244-
<attach>true</attach>
245-
</configuration>
246-
</execution>
247-
</executions>
248-
</plugin>
249-
250-
<plugin>
251-
<groupId>org.jreleaser</groupId>
252-
<artifactId>jreleaser-maven-plugin</artifactId>
253-
<version>${jreleaser-maven-plugin.version}</version>
254-
<configuration>
255-
<jreleaser>
256-
<signing>
257-
<active>ALWAYS</active>
258-
<armored>true</armored>
259-
</signing>
260-
<project>
261-
<copyright>2024 Florian Lopes</copyright>
262-
</project>
263-
<deploy>
264-
<maven>
265-
<nexus2>
266-
<maven-central>
267-
<active>ALWAYS</active>
268-
<url>https://oss.sonatype.org/service/local</url>
269-
<snapshotUrl>
270-
https://s01.oss.sonatype.org/content/repositories/snapshots/
271-
</snapshotUrl>
272-
<closeRepository>true</closeRepository>
273-
<releaseRepository>false</releaseRepository>
274-
<stagingRepositories>target/staging-deploy</stagingRepositories>
275-
</maven-central>
276-
</nexus2>
277-
</maven>
278-
</deploy>
279-
</jreleaser>
280-
</configuration>
281-
</plugin>
282-
</plugins>
283-
</build>
284-
</profile>
285-
</profiles>
286-
287-
<distributionManagement>
288-
<snapshotRepository>
289-
<id>ossrh</id>
290-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
291-
</snapshotRepository>
292-
<repository>
293-
<id>ossrh</id>
294-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
295-
</repository>
296-
</distributionManagement>
297191
</project>

0 commit comments

Comments
 (0)