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 to exclude resources from fast-jar through glob patterns #45357

Open
turing85 opened this issue Jan 3, 2025 · 0 comments
Open

Allow to exclude resources from fast-jar through glob patterns #45357

turing85 opened this issue Jan 3, 2025 · 0 comments
Labels
kind/enhancement New feature or request

Comments

@turing85
Copy link
Contributor

turing85 commented Jan 3, 2025

Description

Currently, there is no possibility to exclude resources from the fast-jar with a glob pattern.

According to this stackoverflow.com answer by @geoand, setting

quarkus.class-loading.removed-resources."de.turing85\:quarkus-exclude-resource" = \
    some/file.txt

should work, but it does not.

We can use

quarkus.package.jar.user-configured-ignored-entries = \
  some/file.txt

instead, but this does not support glob patterns, i.e.:

quarkus.package.jar.user-configured-ignored-entries = \
  some/**/*

does not work. Furthermore, if we exclude all files from a directory by listing them one-by-one, the directory will still be present in the fast jar.

Story

AS a developer
WHEN I need to exclude resources from the fast-jar
THEN I want a way to exclude resources through glob-patterns. Furhtermore, if the exclusions lead to an empty directory, that directory should be removed from the fast jar.

MRE Repository

A repository for testing around can be found here (github.com). The goal is to exclude src/main/resources/some/file.txt. We can verify that the file is excluded by running ./mvnw clean package and then opening target/quarkus-app/app/quarkus-exclude-resource-999-SNAPSHOT.jar. The archive should not contain some/text.txt and - ideally - not even the directory some.

Implementation ideas

No response

@turing85 turing85 added the kind/enhancement New feature or request label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants