Skip to content

Commit

Permalink
Configure maven-release plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiankirsch committed Nov 8, 2024
1 parent 9ab366f commit a1b9a45
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,19 @@ For a more automated release process, we want the version numbering handled and
We'll use the `maven-release-plugin` for this.

### Maven configuration
For now, we simply pin the version of the `maven-release-plugin`.
We pin the version of the `maven-release-plugin` and overwrite some defaults:
```xml
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<arguments>-ntp</arguments>
<scmCommentPrefix />
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Expand Down Expand Up @@ -267,20 +272,6 @@ It'll take a few seconds, then the _workflow run_ will appear.
You may drill into the details, or just wait until the process has finished.
Once again, Maven Central repository's [_Deployments_ section][central:deployments] will show a _VALIDATED_ deployment.

### maven-release-plugin

```xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<releaseProfiles>release</releaseProfiles>
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
```

[central:account]: https://central.sonatype.com/account
[central:deployments]: https://central.sonatype.com/publishing/deployments
[central:login]: https://central.sonatype.com/api/auth/login
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<arguments>-ntp</arguments>
<scmCommentPrefix />
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Expand Down

0 comments on commit a1b9a45

Please sign in to comment.