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

SBT | how to disable or avoid .sbt/preloaded #4477

Closed
1 task done
yash-lf opened this issue Dec 5, 2018 · 2 comments
Closed
1 task done

SBT | how to disable or avoid .sbt/preloaded #4477

yash-lf opened this issue Dec 5, 2018 · 2 comments

Comments

@yash-lf
Copy link

yash-lf commented Dec 5, 2018

steps

I'm trying to integrate a dependency in my lagom project using sbt. The vesions I'm using for that are:

// The Lagom plugin
addSbtPlugin("com.lightbend.lagom" % "lagom-sbt-plugin" % "1.3.7")
// Needed for importing the project into Eclipse
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.1.0")
sbt.version=0.13.16
scala=2.11.7

This is my service requirement to stay on scala 2.11.7, though we are looking forward to upgrade it as soon as we can, but that is atleast 6 months away.

The depedency I'm trying to integrate is

"com.example" % "example-models_2.11" % "1.0.0-SNAPSHOT"
val nexus_url = "https://company-repo.example.com/"
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")

resolvers += "Nexus" at s"$nexus_url/repository/example-repo/"

problem

For some reason it is not trying my nexus repo, instead it is trying:

[info] Resolving com.example#example-models_2.11;1.0.0-SNAPSHOT ...
[warn] 	module not found: com.example#example-models_2.11;1.0.0-SNAPSHOT
[warn] ==== local: tried
[warn]   /home/yash/.ivy2/local/com.example/example-models_2.11/1.0.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/example/example-models_2.11/1.0.0-SNAPSHOT/example-models_2.11-1.0.0-SNAPSHOT.pom
[warn] ==== local-preloaded-ivy: tried
[warn]   /home/yash/.sbt/preloaded/com.example/example-models_2.11/1.0.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn]   file:////home/yash/.sbt/preloaded/com/example/example-models_2.11/1.0.0-SNAPSHOT/example-models_2.11-1.0.0-SNAPSHOT.pom
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: com.example#example-models_2.11;1.0.0-SNAPSHOT: not found
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn] 	Note: Unresolved dependencies path:
[warn] 		com.example:example-models_2.11:1.0.0-SNAPSHOT (/home/yash/development/example/build.sbt#L21)
[warn] 		  +- com.example:example-impl_2.11:1.0.0-SNAPSHOT
[info] 'compiler-interface' not yet compiled for Scala 2.11.7. Compiling...
[info]   Compilation completed in 8.811 s
sbt.ResolveException: unresolved dependency: com.example#example-models_2.11;1.0.0-SNAPSHOT: not found
	at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
	at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
	at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
	at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
	at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
	at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
	at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
	at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
	at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
	at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
	at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
	at xsbt.boot.Using$.withResource(Using.scala:10)
	at xsbt.boot.Using$.apply(Using.scala:9)
	at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
	at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
	at xsbt.boot.Locks$.apply0(Locks.scala:31)
	at xsbt.boot.Locks$.apply(Locks.scala:28)
	at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
	at sbt.IvySbt.withIvy(Ivy.scala:128)
	at sbt.IvySbt.withIvy(Ivy.scala:125)
	at sbt.IvySbt$Module.withModule(Ivy.scala:156)
	at sbt.IvyActions$.updateEither(IvyActions.scala:168)
	at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1541)
	at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1537)
	at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1572)
	at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1570)
	at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
	at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1575)
	at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1569)
	at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
	at sbt.Classpaths$.cachedUpdate(Defaults.scala:1592)
	at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1519)
	at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1471)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:237)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
[error] (lms-impl/*:update) sbt.ResolveException: unresolved dependency: com.example#example-models_2.11;1.0.0-SNAPSHOT: not found
[error] Total time: 876 s, completed Dec 5, 2018 1:36:18 PM

expectation

Discussions like #4015 and sbt/librarymanagement#224 didn't help.

notes

sbt version: insert sbt version

@yash-lf
Copy link
Author

yash-lf commented Dec 5, 2018

@eatkins any ideas?

@eed3si9n
Copy link
Member

eed3si9n commented Dec 5, 2018

See https://www.scala-sbt.org/1.x/docs/Proxy-Repositories.html

We use GitHub issue mostly to track bugs and discuss feature or bugs on sbt. If you need help, please check this out - https://www.scala-sbt.org/support.html#how-can-I-get-help

@eed3si9n eed3si9n closed this as completed Dec 5, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants