Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken 4.9.9 release? #569

Closed
jebeaudet opened this issue Jul 12, 2021 · 5 comments
Closed

Broken 4.9.9 release? #569

jebeaudet opened this issue Jul 12, 2021 · 5 comments
Milestone

Comments

@jebeaudet
Copy link

Describe the bug

The release 4.9.9, available on maven central, looks broken. It seems the version was published only as a pom release (https://search.maven.org/artifact/pl.project13.maven/git-commit-id-plugin/4.9.9/maven-plugin vs https://search.maven.org/artifact/pl.project13.maven/git-commit-id-plugin/4.0.5/maven-plugin).

We use renovate to keep our projects up to date and it detected the 4.9.9 version, bumped it but the PR build fails with :

[ERROR] Plugin pl.project13.maven:git-commit-id-plugin:4.9.9 or one of its dependencies could not be resolved: io.github.git-commit-id:git-commit-id-maven-plugin:jar:4.9.9 was not found in https://internalmavenrepo/artifactory/plugins-release during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of releases has elapsed or updates are forced -> [Help 1]

Steps to Reproduce

The normal 4.0.5 pom configuration breaks with 4.9.9.

Expected behavior

4.9.9 should work with the same configuration as 4.0.5

Thanks!

@TheSnoozer
Copy link
Collaborator

Hello,
thank you for creating an issue for this.
In fact this is/was on purpose. The 4.9.9-release is a "relocation-pom" which I hope had been done following the steps outlined as in https://maven.apache.org/guides/mini/guide-relocation.html.

This is also highlighted in the link provided:
image

For now 4.0.5 is the latest 4.X release and the next one would be 5.0.0 available via:

<dependency>
    <groupId>io.github.git-commit-id</groupId>
    <artifactId>git-commit-id-maven-plugin</artifactId>
    <version>5.0.0</version>
</dependency>

As the version number indicates this is a "breaking" release please consult the release-notes (https://github.com/git-commit-id/git-commit-id-maven-plugin/releases/tag/v5.0.0) for further details what exactly might be "breaking" before switching to the new version.

@jebeaudet
Copy link
Author

Yes I understand and saw the new groupId (I've updated without a hiccup on my end, thx), however, I think you might have missed a step, in the last version with the relocation pom, the jar should be there to make it a valid final version along with the relocation information.

@TheSnoozer
Copy link
Collaborator

Mhh I didn't wanted to publish a jar, or a plugin. All I wanted to publish is the relocation information.

The examples provided in the relocation snippet don't include a jar-file either:

The relocation guide speaks of minimalistic poms. Sure I could have also published the jar, but specifically decided against that. A 4.9.9 version in my mind just wants to inform users that the coordinates of the plugin changed. Nothing more. The fact that maven attempts to download the jar is a bug (feel free to follow https://issues.apache.org/jira/browse/MNG-7187).

Certainly there also seem examples that also publish a jar alongside with the relocation:

Anyhow, correct or incorrect, blame it on the relocation guide if there is anything missing. Since it's released I can't and won't fix the 4.9.9 release.

Thanks again for starting this, but I'm going ahead and close this since this is "as intended".

@jebeaudet
Copy link
Author

jebeaudet commented Jul 12, 2021

Seems like this was reported on renovate as well renovatebot/renovate#5667, it's also part of the issue here, the plugin could detect it's a relocation release but it doesn't.

Not sure about MNG-7187, you're not specifying a <type> so it falls back on jar but I'll let the maven developers the final words.

You could release 4.9.10 with the same relocation and jar but I also understand if you don't want to.

In all cases, thanks for your plugin!

TheSnoozer pushed a commit that referenced this issue Jul 15, 2021
Under the old coordinates
```xml
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
```
I just had published a relocation pom, so my theory is that maven attempts to locate the jar under the new coordinates:
```xml
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
```
This is the preparation to publish a "matching" 4.9.9 release under the new coordinates.
Let's hope we don't need hotfixes, otherwise version numbers get awkward.
@TheSnoozer TheSnoozer added this to the 4.9.9 milestone Jul 15, 2021
@TheSnoozer
Copy link
Collaborator

As mentioned in #570 I now have published a plugin again under the new coordinates.
While the 4.9.9 remains a "dummy-release" that should have the same functionallity as 4.0.5 this specific release now should work fine to be used as plugin.

This it is now effectively published in both locations it is available via:

<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.9.9</version>

and

<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<version>4.9.9</version>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants