简体   繁体   中英

sbt ignoring library dependency

I have a library dependency

libraryDependencies += "mygroup" % "myartifact" % "myversion"

This is properly retrieved, and found in lib_managed . It contains some XML files (resources), and using jar tf I can see that the jar file is complete.

Ok. But—although this had always been working before—it is not ending up on my classpath any more . When I do show full-classpath , I see all libraries but this one. Consequently the program fails because it cannot read these resources. This also effects bundling the program as a standalone.

This library has no dependencies itself, nor does any other library of the project depend on it. What could cause this problem, and how to fix it? sbt version is 0.12.4.

This is a variant of this problem . Although other than in the linked question the .jar file does end up in lib_managed , it still isn't somehow "considered important" by sbt.

The solution is the same.

$ rm -r ~/.ivy2/cache/mygroup/myartifact

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM