-
Notifications
You must be signed in to change notification settings - Fork 126
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
FileAlreadyExists exception when organizeLicensesByDependencies is true and a license is cached #312
Comments
Thanks for the report. Yes, I think adding CopyOption.REPLACE_EXISTING could fix it. Looks like we have just two integration tests with |
This happens if a dependency with the same ga appears several times in the dependency tree with different versions. Since the current filename mapping doesn't contain the version, the second execution fails. |
When using organizeLicensesByDependencies=true, if you have several dependencies with the same license, and the same dependency appears in the dependency tree with different versions/types, then the cached file will be copied several times over to the destination, which can already exist.
When using organizeLicensesByDependencies=true, if you have several dependencies with the same license, and the same dependency appears in the dependency tree with different versions/types, then the cached file will be copied several times over to the destination, which can already exist.
When using organizeLicensesByDependencies=true, if you have several dependencies with the same license, and the same dependency appears in the dependency tree with different versions/types, then the cached file will be copied several times over to the destination, which can already exist.
When using organizeLicensesByDependencies=true, if you have several dependencies with the same license, and the same dependency appears in the dependency tree with different versions/types, then the cached file will be copied several times over to the destination, which can already exist.
Trying to download licenses with organizeLicensesByDependencies set to true.
The broken code seems to be https://github.com/mojohaus/license-maven-plugin/blob/license-maven-plugin-1.19/src/main/java/org/codehaus/mojo/license/AbstractDownloadLicensesMojo.java#L1082
I'm not sure what that code is supposed to do, but if the target file is supposed to be overwritten, the copy call should set CopyOption.REPLACE_EXISTING.
The text was updated successfully, but these errors were encountered: