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

Allow DerivedArtifact to expose a getExtension() #28969

Open
loosebazooka opened this issue Apr 25, 2024 · 3 comments
Open

Allow DerivedArtifact to expose a getExtension() #28969

loosebazooka opened this issue Apr 25, 2024 · 3 comments
Labels
a:feature A new functionality in:publishing-plugins ivy-publish maven-publish in:signing-plugin
Milestone

Comments

@loosebazooka
Copy link

Expected Behavior

A signer alternative to pgp (like sigstore in this case) which uses an extension .sigstore.json should be able to publish with that extension when doing a maven publish (this is not supported without a bit of a hack).

The PublicationInternal object could add the extension to the interface

    interface DerivedArtifact {
        boolean shouldBePublished();
        File create();
+       String getExtension();
    }

I also understand that we kinda need to access some of these internal APIs to make this happen from a 3rd party plugin.

Current Behavior (optional)

The extension is computed from the filename which means it's the last of X.Y.Z which in this case is .Z instead of .Y.Z. See code:

return original.getExtension() + "." + getFileExtension(getFile().getName());

So during publication of my.jar.sigstore.json, the maven publication generates a finished dervied object as my.jar.json (instead of my.jar.sigstore.json)

Context

Sigstore signatures are expected to use the final extension .sigstore.json. There is a workaround that can be done by explicitly setting the extension on the PublicationArtifact (which we do infact exploit), but the current interface for DerviedArtifact could make this less hacky.

@loosebazooka loosebazooka added a:feature A new functionality to-triage labels Apr 25, 2024
@loosebazooka loosebazooka changed the title DerivedArtifact should expose a getExtension() Allow DerivedArtifact to expose a getExtension() Apr 25, 2024
@ov7a
Copy link
Member

ov7a commented May 7, 2024

This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary.


Relates to:

@ov7a ov7a added in:publishing-plugins ivy-publish maven-publish 👋 team-triage Issues that need to be triaged by a specific team and removed to-triage labels May 7, 2024
@big-guy
Copy link
Member

big-guy commented May 13, 2024

@loosebazooka do you have a workaround for now or would this unblock you?

@big-guy big-guy added this to the 8.x milestone May 13, 2024
@big-guy big-guy removed the 👋 team-triage Issues that need to be triaged by a specific team label May 13, 2024
@loosebazooka
Copy link
Author

Yeah workaround exists. Plus I would have to be pretty backward compatible for now. This is just a request for a change in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality in:publishing-plugins ivy-publish maven-publish in:signing-plugin
Projects
None yet
Development

No branches or pull requests

3 participants