Skip to content

Commit 8efc72d

Browse files
Update plugins and switch to maven central publishing
1 parent e3a67f5 commit 8efc72d

File tree

5 files changed

+54
-88
lines changed

5 files changed

+54
-88
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
git config --global user.name "GitHub Actions"
3636
if: ${{ !startsWith(github.event_name, 'pull_request') }}
3737
- name: Build with Maven
38-
run: mvn -B -V -e verify
38+
run: mvn -B -V -e clean verify
3939
- name: Deploy Site
4040
if: ${{ matrix.java == '1.8' && github.event_name != 'release' && !startsWith(github.event_name, 'pull_request') }}
4141
run: mvn -B -e site-deploy

.github/workflows/release.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
distribution: 'zulu'
2020
java-version: 8
21-
server-id: ossrh
21+
server-id: central
2222
server-username: MAVEN_USERNAME
2323
server-password: MAVEN_PASSWORD
2424
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
@@ -39,21 +39,16 @@ jobs:
3939
- name: Release
4040
run: >
4141
mvn -V -gs $GITHUB_WORKSPACE/git-settings.xml -B -e release:clean release:prepare &&
42-
echo "::set-output name=RELEASED_VERSION::$(grep scm.tag= release.properties | cut -d'=' -f2 | cut -c2-)" &&
42+
echo "RELEASED_VERSION=$(grep scm.tag= release.properties | cut -d'=' -f2 | cut -c2-)" >> $GITHUB_OUTPUT &&
4343
mvn -gs $GITHUB_WORKSPACE/git-settings.xml -B -e release:perform
4444
env:
45-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
46-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
45+
MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
46+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN }}
4747
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
4848
GITHUB_TOKEN: ${{ github.token }}
4949
id: release
50-
- name: Deploy to Maven Central
51-
run: mvn -B -f target/checkout nexus-staging:release
52-
env:
53-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
54-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
5550
- name: Create Release Entry
56-
uses: softprops/action-gh-release@v1
51+
uses: softprops/action-gh-release@v2
5752
with:
5853
tag_name: v${{ steps.release.outputs.RELEASED_VERSION }}
5954
name: Parent ${{ steps.release.outputs.RELEASED_VERSION }}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The [parent Maven POM](https://jonasrutishauser.github.io/parent/) for my github projects.
44

55
[![GNU Lesser General Public License, Version 3, 29 June 2007](https://img.shields.io/github/license/jonasrutishauser/parent.svg?label=License)](http://www.gnu.org/licenses/lgpl-3.0.txt)
6-
[![Maven Central](https://img.shields.io/maven-central/v/com.github.jonasrutishauser/parent.svg?label=Maven%20Central)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.github.jonasrutishauser%22%20a%3A%22parent%22)
6+
[![Maven Central](https://img.shields.io/maven-central/v/io.github.jonasrutishauser/parent.svg?label=Maven%20Central)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.github.jonasrutishauser%22%20a%3A%22parent%22)
77
[![Build Status](https://img.shields.io/github/actions/workflow/status/jonasrutishauser/parent/ci.yml.svg?label=Build)](https://github.com/jonasrutishauser/parent/actions)
88

99
## Releasing

pom.xml

+39-71
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
22
<modelVersion>4.0.0</modelVersion>
33

4-
<groupId>com.github.jonasrutishauser</groupId>
4+
<groupId>io.github.jonasrutishauser</groupId>
55
<artifactId>parent</artifactId>
66
<version>21-SNAPSHOT</version>
77
<packaging>pom</packaging>
@@ -13,7 +13,7 @@
1313
<licenses>
1414
<license>
1515
<name>GNU LGPL 3</name>
16-
<url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
16+
<url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
1717
</license>
1818
</licenses>
1919

@@ -44,14 +44,6 @@
4444
</ciManagement>
4545

4646
<distributionManagement>
47-
<snapshotRepository>
48-
<id>ossrh</id>
49-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
50-
</snapshotRepository>
51-
<repository>
52-
<id>ossrh</id>
53-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
54-
</repository>
5547
<site>
5648
<id>github</id>
5749
<url>${distributionManagement.site.url}</url>
@@ -64,6 +56,7 @@
6456

6557
<maven.compiler.source>1.8</maven.compiler.source>
6658
<maven.compiler.target>1.8</maven.compiler.target>
59+
<maven.compiler.release>8</maven.compiler.release>
6760

6861
<site.path>/snapshot</site.path>
6962

@@ -78,29 +71,27 @@
7871
<url>https://jonasrutishauser.github.io/${root.artifactId}${site.path}</url>
7972

8073
<plugin.assembly.version>3.7.1</plugin.assembly.version>
81-
<plugin.changes.version>2.12.1</plugin.changes.version>
82-
<plugin.changelog.version>2.3</plugin.changelog.version>
74+
<plugin.central-publishing.version>0.6.0</plugin.central-publishing.version>
8375
<plugin.clean.version>3.4.0</plugin.clean.version>
8476
<plugin.compiler.version>3.13.0</plugin.compiler.version>
85-
<plugin.dependency.version>3.7.1</plugin.dependency.version>
86-
<plugin.deploy.version>3.1.2</plugin.deploy.version>
77+
<plugin.dependency.version>3.8.0</plugin.dependency.version>
78+
<plugin.deploy.version>3.1.3</plugin.deploy.version>
8779
<plugin.enforcer.version>3.5.0</plugin.enforcer.version>
88-
<plugin.gpg.version>3.2.4</plugin.gpg.version>
89-
<plugin.install.version>3.1.2</plugin.install.version>
80+
<plugin.gpg.version>3.2.7</plugin.gpg.version>
81+
<plugin.install.version>3.1.3</plugin.install.version>
9082
<plugin.jacoco.version>0.8.12</plugin.jacoco.version>
9183
<plugin.jar.version>3.4.2</plugin.jar.version>
92-
<plugin.javadoc.version>3.7.0</plugin.javadoc.version>
93-
<plugin.jxr.version>3.4.0</plugin.jxr.version>
94-
<plugin.nexus-staging.version>1.7.0</plugin.nexus-staging.version>
95-
<plugin.plugin.version>3.13.1</plugin.plugin.version>
96-
<plugin.project-info-reports.version>3.6.1</plugin.project-info-reports.version>
97-
<plugin.release.version>3.1.0</plugin.release.version>
84+
<plugin.javadoc.version>3.10.1</plugin.javadoc.version>
85+
<plugin.jxr.version>3.5.0</plugin.jxr.version>
86+
<plugin.plugin.version>3.15.0</plugin.plugin.version>
87+
<plugin.project-info-reports.version>3.8.0</plugin.project-info-reports.version>
88+
<plugin.release.version>3.1.1</plugin.release.version>
9889
<plugin.resources.version>3.3.1</plugin.resources.version>
99-
<plugin.site.version>3.12.1</plugin.site.version>
90+
<plugin.site.version>3.21.0</plugin.site.version>
10091
<plugin.source.version>3.3.1</plugin.source.version>
101-
<plugin.surefire.version>3.3.0</plugin.surefire.version>
102-
<plugin.taglist.version>3.0.0</plugin.taglist.version>
103-
<plugin.versions.version>2.17.0</plugin.versions.version>
92+
<plugin.surefire.version>3.5.1</plugin.surefire.version>
93+
<plugin.taglist.version>3.2.1</plugin.taglist.version>
94+
<plugin.versions.version>2.17.1</plugin.versions.version>
10495
<wagon.git.version>1.1.1</wagon.git.version>
10596
</properties>
10697

@@ -157,27 +148,27 @@
157148
</requireMavenVersion>
158149
<requireProperty>
159150
<property>project.description</property>
160-
<message>Project description must be specified (requirement for OSSRH).</message>
151+
<message>Project description must be specified (requirement for maven central).</message>
161152
</requireProperty>
162153
<requireProperty>
163154
<property>project.name</property>
164-
<message>Project name must be specified (requirement for OSSRH).</message>
155+
<message>Project name must be specified (requirement for maven central).</message>
165156
</requireProperty>
166157
<requireProperty>
167158
<property>project.url</property>
168-
<message>Project url must be specified (requirement for OSSRH).</message>
159+
<message>Project url must be specified (requirement for maven central).</message>
169160
</requireProperty>
170161
<requireProperty>
171162
<property>project.licenses</property>
172-
<message>At least on license must be specified (requirement for OSSRH).</message>
163+
<message>At least on license must be specified (requirement for maven central).</message>
173164
</requireProperty>
174165
<requireProperty>
175166
<property>project.developers</property>
176-
<message>At least one developer must be specified (requirement for OSSRH).</message>
167+
<message>At least one developer must be specified (requirement for maven central).</message>
177168
</requireProperty>
178169
<requireProperty>
179170
<property>project.scm.connection</property>
180-
<message>scm section should be defined in project (requirement for OSSRH).</message>
171+
<message>scm section should be defined in project (requirement for maven central).</message>
181172
</requireProperty>
182173
</rules>
183174
</configuration>
@@ -206,14 +197,14 @@
206197
</executions>
207198
</plugin>
208199
<plugin>
209-
<groupId>org.sonatype.plugins</groupId>
210-
<artifactId>nexus-staging-maven-plugin</artifactId>
211-
<version>${plugin.nexus-staging.version}</version>
200+
<groupId>org.sonatype.central</groupId>
201+
<artifactId>central-publishing-maven-plugin</artifactId>
202+
<version>${plugin.central-publishing.version}</version>
212203
<extensions>true</extensions>
213204
<configuration>
214-
<serverId>ossrh</serverId>
215-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
216-
<autoReleaseAfterClose>false</autoReleaseAfterClose>
205+
<publishingServerId>central</publishingServerId>
206+
<autoPublish>true</autoPublish>
207+
<deploymentName>${project.groupId}:${project.artifactId}:${project.version}</deploymentName>
217208
</configuration>
218209
</plugin>
219210
</plugins>
@@ -317,14 +308,6 @@
317308
<artifactId>maven-enforcer-plugin</artifactId>
318309
<version>${plugin.enforcer.version}</version>
319310
</plugin>
320-
<plugin>
321-
<artifactId>maven-changes-plugin</artifactId>
322-
<version>${plugin.changes.version}</version>
323-
</plugin>
324-
<plugin>
325-
<artifactId>maven-changelog-plugin</artifactId>
326-
<version>${plugin.changelog.version}</version>
327-
</plugin>
328311
<plugin>
329312
<artifactId>maven-jxr-plugin</artifactId>
330313
<version>${plugin.jxr.version}</version>
@@ -370,7 +353,15 @@
370353
<reporting>
371354
<plugins>
372355
<plugin>
373-
<artifactId>maven-plugin-plugin</artifactId>
356+
<artifactId>maven-plugin-report-plugin</artifactId>
357+
<version>${plugin.plugin.version}</version>
358+
<reportSets>
359+
<reportSet>
360+
<reports>
361+
<report>report-no-fork</report>
362+
</reports>
363+
</reportSet>
364+
</reportSets>
374365
</plugin>
375366
<plugin>
376367
<artifactId>maven-project-info-reports-plugin</artifactId>
@@ -434,7 +425,7 @@
434425
<reportSets>
435426
<reportSet>
436427
<reports>
437-
<report>javadoc</report>
428+
<report>javadoc-no-fork</report>
438429
</reports>
439430
</reportSet>
440431
</reportSets>
@@ -460,29 +451,6 @@
460451
</reportSet>
461452
</reportSets>
462453
</plugin>
463-
<plugin>
464-
<artifactId>maven-changes-plugin</artifactId>
465-
<reportSets>
466-
<reportSet>
467-
<reports>
468-
<report>github-report</report>
469-
</reports>
470-
<configuration>
471-
<includeOpenIssues>false</includeOpenIssues>
472-
<runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
473-
</configuration>
474-
</reportSet>
475-
</reportSets>
476-
</plugin>
477-
<plugin>
478-
<artifactId>maven-changelog-plugin</artifactId>
479-
<configuration>
480-
<displayFileDetailUrl>${project.scm.url}/blob/master/%FILE%</displayFileDetailUrl>
481-
<displayChangeSetDetailUrl>${project.scm.url}/commit/</displayChangeSetDetailUrl>
482-
<displayFileRevDetailUrl>${project.scm.url}/blob/%REV%/%FILE%</displayFileRevDetailUrl>
483-
<range>365</range>
484-
</configuration>
485-
</plugin>
486454
<plugin>
487455
<groupId>org.codehaus.mojo</groupId>
488456
<artifactId>versions-maven-plugin</artifactId>

src/site/site.xml

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/DECORATION/1.7.0"
2+
<site xmlns="http://maven.apache.org/SITE/2.0.0"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.7.0 http://maven.apache.org/xsd/decoration-1.7.0.xsd">
4+
xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd">
55

66
<publishDate position="right" />
77
<version position="right" />
88

99
<body>
1010
<links>
11-
<item name="Maven" href="http://maven.apache.org/" />
11+
<item name="Maven" href="https://maven.apache.org/" />
1212
</links>
13+
<breadcrumbs>
14+
<item name="${project.name}" href="https://jonasrutishauser.github.io/${root.artifactId}${site.path}" />
15+
</breadcrumbs>
1316
<menu ref="modules" inherit="bottom" />
1417
<menu ref="reports" inherit="bottom" />
1518
</body>
1619

1720
<skin>
1821
<groupId>org.apache.maven.skins</groupId>
1922
<artifactId>maven-fluido-skin</artifactId>
20-
<version>1.12.0</version>
23+
<version>2.0.0-M11</version>
2124
</skin>
2225

2326
<custom>
@@ -31,4 +34,4 @@
3134
</fluidoSkin>
3235
</custom>
3336

34-
</project>
37+
</site>

0 commit comments

Comments
 (0)