Skip to content

Commit 5bc428d

Browse files
author
TheSnoozer
committed
#571: Remove location information when we publish under old releases
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.
1 parent c2d5021 commit 5bc428d

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

core/pom.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,19 @@
3232
<id>ossrh</id>
3333
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
3434
</repository>
35-
<!-- include relocation information -->
35+
<!--
36+
We should include relocation information, but if we do
37+
maven fails with "Could not find artifact io.github.git-commit-id:git-commit-id-maven-plugin:jar:${version}".
38+
If we publish a release under the new coordinates, maven silent ignores the plugin settings
39+
when we happen to use the old coordinates in our config
40+
(https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/571).
41+
42+
As a result: The plugin is moving to a new location, but we can't encode it in the pom :-(
43+
3644
<relocation>
3745
<groupId>io.github.git-commit-id</groupId>
3846
</relocation>
47+
-->
3948
</distributionManagement>
4049

4150
<build>

maven/pom.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,19 @@
3333
<id>ossrh</id>
3434
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
3535
</repository>
36-
<!-- include relocation information -->
36+
<!--
37+
We should include relocation information, but if we do
38+
maven fails with "Could not find artifact io.github.git-commit-id:git-commit-id-maven-plugin:jar:${version}".
39+
If we publish a release under the new coordinates, maven silent ignores the plugin settings
40+
when we happen to use the old coordinates in our config
41+
(https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/571).
42+
43+
As a result: The plugin is moving to a new location, but we can't encode it in the pom :-(
3744
<relocation>
3845
<groupId>io.github.git-commit-id</groupId>
3946
<artifactId>git-commit-id-maven-plugin</artifactId>
4047
</relocation>
48+
-->
4149
</distributionManagement>
4250

4351
<properties>

0 commit comments

Comments
 (0)