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

packCopyDependencies doesn't remove duplicates before processing #166

Open
DavidPerezIngeniero opened this issue Sep 18, 2019 · 3 comments

Comments

@DavidPerezIngeniero
Copy link

After migrating to SBT 1.3.0 from 1.1.4, here is the result of running:

packCopyDependencies

java.nio.file.FileAlreadyExistsException: /home/dd/rds/servision/src/main/webapp/WEB-INF/lib/jt-utils-1.5.0.jar

The cause is that tries to create a symbolic link for the same dependency twice. It doesn't remove duplicated dependencies before processing.

@DavidPerezIngeniero DavidPerezIngeniero changed the title SBT 1.3.0: packCopyDependencies doesn't remove duplicates before processing Sep 18, 2019
@xerial
Copy link
Owner

xerial commented Sep 18, 2019

It would be great if you can create a small project to reproduce the issue.

@DavidPerezIngeniero
Copy link
Author

I'll try to when I have time.
Meanwhile this is the workaround:

packCopyDependenciesUseSymbolicLinks := false

@DavidPerezIngeniero
Copy link
Author

DavidPerezIngeniero commented Nov 15, 2019

In addition, I've found that sbt-pack finds inexistant dependencies (or better said, excluded dependencies). There is a discrepancy between dependencies reported by sbt-pack and sbt-dependency-graph.

My project has tons of dependencies.
For being more specific, here is an excerpt of my dependencies:

"commons-jelly" % "commons-jelly" % "1.0"
	exclude("xerces", "xmlParserAPIs")
	exclude("javax.servlet", "servlet-api")
	exclude("servlet-api", "servlet-api")
	exclude("dom4j", "dom4j")
	exclude("junit", "junit")
	exclude("jdom", "jdom")
	exclude("xalan", "xalan")
	exclude("com.ibm.icu", "icu4j")

sbt-pack consider com.ibm.icu % icu4j as a valid dependency, when in fact it is excluded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants