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 <xxx> is a duplicate but no duplicate handling strategy has been set #117
Comments
could you please provide a simple working example that you expected to work |
Hi, today I faced the same issue. plugins {
id 'java'
id 'edu.sc.seis.launch4j' version '2.4.6'
}
dependencies {
implementation 'org.glassfish.jaxb:jaxb-runtime:3.0.2'
implementation 'com.sun.xml.bind:jaxb-xjc:3.0.2'
} Both dependencies include a common dependency jaxb-core-3.0.2.jar. The Error that is being displayed is:
But when I try to add a duplication handling strategy it doesn't work: plugins {
id 'java'
id 'edu.sc.seis.launch4j' version '2.4.6'
}
dependencies {
implementation 'org.glassfish.jaxb:jaxb-runtime:3.0.2'
implementation 'com.sun.xml.bind:jaxb-xjc:3.0.2'
}
launch4j {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
} This works inside the jar task. |
If you could help me with some guidance where the error could be solved, I would like to work on this issue 😄 |
This seems to be related to the used copy tasks. You should be able to create a PR adding the strategy there and testing it with the reproducible code snippet you provided. |
So I've created a test with my code snippet and it worked. |
Is it currently possible to let a test run with a different Gradle version than specified at the root project? |
I thought, that maybe something like this would work: launch4j{
mainClassName = 'com.test.app.Main'
copyConfigurable = copySpec {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
} But now I'm getting the error message:
I was looking through the code and found the copyConfigurable, that to my understanding should also be settable to a CopySpec. |
There are already some tests in this repo that run against different gradle versions. I don't have access to my IDE now but you might be able to set the strategy on the |
I've created a draft PR (#123) that fixes the issue. It just hardcodes it to exclude any duplicate entries. Maybe we should introduce a new property so the user can specify what DuplicatesStrategy should be used. |
Issue #117 Entry <xxx> is a duplicate but no duplicate handling strategy has been set
I think this issue can be closed, since the PR was already merged |
It's not possible to set duplicatesStrategy for copying of dependencies into lib folder for createExe/launch4j task.
Using gradle 7.x
The text was updated successfully, but these errors were encountered: