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

Is there a way to sign the jars before creating the artifacts.jar? #281

Open
reinsch82 opened this issue Oct 21, 2021 · 6 comments
Open

Comments

@reinsch82
Copy link
Contributor

We'd like to sign our 3rd party jars.
I tried to use just jarsigner:sign but that causes a problem with the hashes in artifacts.jar.
Very likely because they are obviously calculated before I apply the signature.

@sparsick
Copy link
Collaborator

3rd party jars are collected by P2 mechanism. Therefore, jarsigner:sign will not work here.

@reinsch82
Copy link
Contributor Author

ok, yes, what I meant I tried to sign them after creating the p2 repository with p2:site
I guess what would be required is a way to execute this step before the artifacts and contents files are created.
To my understanding they contain hashes for the jar files and therefore it breaks when using the created p2 repo because the hashes don't match.
any Idea how we could do that?

@sparsick
Copy link
Collaborator

BND Tool has a sign parameter. Maybe this could work for jars that are modified by bnd. But that means the p2 maven plugin has to be extended.

@reinsch82
Copy link
Contributor Author

is there a way to recalculate the hashes after the repository creation?

I guess that would be enough for my case. although it might be less handy overall. but it also wouldn't impact the "normal" usage.

@sparsick
Copy link
Collaborator

Sorry, I have no idea whether is possible. But I found a similar issue in eclipse collection repository eclipse/eclipse-collections#287 . Maybe this helps you find a solution for you

@sparsick
Copy link
Collaborator

Relates to #80

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