Skip to content

Commit

Permalink
#571: Remove location information when we publish under old releases
Browse files Browse the repository at this point in the history
Welcome to a chicken or egg-problem.
In practice we want to relocate the plugin to a new location,
but if we do so without publishing the counterpart in the new location
maven fails with "Could not find artifact io.github.git-commit-id:git-commit-id-maven-plugin:jar:${version}".
If we publish a release under the new coordinates, maven silent ignores the plugin settings
when we happen to use the old coordinates in our config
(#571).

As a result: The plugin is moving to a new location, but we can't encode it in the pom :-(

If anyone ever asks for a relocation pom again the answer is simply: no, thanks.
  • Loading branch information
TheSnoozer committed Aug 1, 2021
1 parent c2d5021 commit 5bc428d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
11 changes: 10 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,19 @@
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<!-- include relocation information -->
<!--
We should include relocation information, but if we do
maven fails with "Could not find artifact io.github.git-commit-id:git-commit-id-maven-plugin:jar:${version}".
If we publish a release under the new coordinates, maven silent ignores the plugin settings
when we happen to use the old coordinates in our config
(https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/571).
As a result: The plugin is moving to a new location, but we can't encode it in the pom :-(
<relocation>
<groupId>io.github.git-commit-id</groupId>
</relocation>
-->
</distributionManagement>

<build>
Expand Down
10 changes: 9 additions & 1 deletion maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,19 @@
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<!-- include relocation information -->
<!--
We should include relocation information, but if we do
maven fails with "Could not find artifact io.github.git-commit-id:git-commit-id-maven-plugin:jar:${version}".
If we publish a release under the new coordinates, maven silent ignores the plugin settings
when we happen to use the old coordinates in our config
(https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/571).
As a result: The plugin is moving to a new location, but we can't encode it in the pom :-(
<relocation>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
</relocation>
-->
</distributionManagement>

<properties>
Expand Down

0 comments on commit 5bc428d

Please sign in to comment.