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

Add exclude_files field to deploy_jar target #20075

Merged

Conversation

grihabor
Copy link
Contributor

@grihabor grihabor commented Oct 23, 2023

I tried running pants package :my_deploy_jar and got this:

Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

To fix this issue I've added exclude_files field to deploy_jar target, which allowed me to exclude jar signature:

deploy_jar(
    name="my_deploy_jar",
    ...,
    exclude_files=["META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA"],
)

@grihabor grihabor changed the title Add exclude_files field to deploy_jar target Add exclude_files field to deploy_jar target Oct 24, 2023
Copy link
Sponsor Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@stuhood stuhood enabled auto-merge (squash) October 31, 2023 18:28
@stuhood stuhood added this to the 2.18.x milestone Oct 31, 2023
auto-merge was automatically disabled October 31, 2023 22:10

Head branch was pushed to by a user without write access

@grihabor grihabor force-pushed the add-exclude-files-field-to-deploy-jar-target branch from 753413c to 8325b6c Compare October 31, 2023 22:10
@stuhood stuhood enabled auto-merge (squash) October 31, 2023 22:11
@stuhood stuhood merged commit 6365038 into pantsbuild:main Oct 31, 2023
24 checks passed
WorkerPants pushed a commit that referenced this pull request Oct 31, 2023
I tried running `pants package :my_deploy_jar` and got this:
```
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
```
To fix this issue I've added `exclude_files` field to `deploy_jar`
target, which allowed me to exclude jar signature:
```python
deploy_jar(
    name="my_deploy_jar",
    ...,
    exclude_files=["META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA"],
)
```
@WorkerPants
Copy link
Member

I tried to automatically cherry-pick this change back to each relevant milestone, so that it is available in those older releases of Pants.

✔️ 2.18.x

Successfully opened #20126.


Thanks again for your contributions!

🤖 Beep Boop here's my run link

huonw pushed a commit that referenced this pull request Nov 1, 2023
…) (#20126)

I tried running `pants package :my_deploy_jar` and got this:
```
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
```
To fix this issue I've added `exclude_files` field to `deploy_jar`
target, which allowed me to exclude jar signature:
```python
deploy_jar(
    name="my_deploy_jar",
    ...,
    exclude_files=["META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA"],
)
```

Co-authored-by: Gregory Borodin <grihabor@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants