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

Entry META-INF/LICENSE is a duplicate but no duplicate handling strategy has been set #38

Open
WillsterJohnson opened this issue Jan 23, 2025 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@WillsterJohnson
Copy link

Title is the error message. This happened when depending on embed "com.fasterxml.jackson.core:jackson-databind:2.18.2", I assume it happens when embedding any library with a file conflict

I managed to solve the issue by setting a duplicatesStrategy like so;

// build.gradle

jar {
    //...
    from(provider{ configurations.embed.collect {it.isDirectory() ? it : zipTree(it)} })
+   { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }
}

This is on the master branch as of c19ab24

Mostly opening this issue so anyone else with the same error has something to try, I'm not sure this is the ideal solution but it at least gets the build to complete

@Rongmario Rongmario added enhancement New feature or request help wanted Extra attention is needed labels Jan 24, 2025
@Rongmario
Copy link
Member

embed is very rudimentary, any processing needed has to be done by the dev, since having a default duplicatesStrategy could lead to unexpected behaviours.

See here for some processing after using embed.

Unless you have an idea of what may be good for a default, I'm open to ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants