I've added "com.amazonaws" % "dynamodb-titan100-storage-backend" % "1.0.0" to my dependencies and the build broke because of com.amazonaws#DynamoDBLocal;[1.10.5.1, 2.0.0): not found. I've fixed this by adding mavenLocal resolver(I have built dynamodb-titan100-storage-backend localy earlier) but it is not the best solution, I think.
dynamodb-titan100-storage-backend has additional repository called "AWS DynamoDB Local Release Repository" in pom.xml pointing to http://dynamodb-local.s3-website-us-west-2.amazonaws.com/release but adding it as sbt resolver doesn't fix the problem.
My question is: why this repostiry works with maven but does not with sbt?
Link to pom.xml
Part of sbt log:
[info] Resolving com.amazonaws#DynamoDBLocal;[1.10.5.1, 2.0.0) ...
[warn] module not found: com.amazonaws#DynamoDBLocal;[1.10.5.1, 2.0.0)
[warn] ==== local: tried
[warn] /home/wpitula/.ivy2/local/com.amazonaws/DynamoDBLocal/[revision]/ivys/ivy.xml
[warn] ==== fedora: tried
[warn] file:/usr/share/sbt/ivy-local/com.amazonaws/DynamoDBLocal/[revision]/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/amazonaws/DynamoDBLocal/[revision]/DynamoDBLocal-[revision].pom
[warn] ==== sonatype-snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/com/amazonaws/DynamoDBLocal/[revision]/DynamoDBLocal-[revision].pom
[warn] ==== DynamoDbLocal: tried
[warn] http://dynamodb-local.s3-website-us-west-2.amazonaws.com/release/com/amazonaws/DynamoDBLocal/[revision]/DynamoDBLocal-[revision].pom
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.amazonaws#DynamoDBLocal;[1.10.5.1, 2.0.0): not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
The problem was likely in a wrong type of the SBT resolver. You should use a Maven-repository resolver like this:
resolvers += "DynamoDBLocal" at "https://s3-us-west-2.amazonaws.com/dynamodb-local/release"
Related
I don't understand why sbt can't resolve a dependency. All of a sudden today I've been getting this error:
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] :: com.amazonaws#aws-java-sdk-core;1.11.106: not found
sbt.last.log reports:
[warn] ==== maven-central: tried
[warn] http://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-core/1.11.106/aws-java-sdk-core-1.11.106.pom
Yet I can web-browse to that folder and see the files sbt should find:
http://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-core/1.11.106/
com/amazonaws/aws-java-sdk-core/1.11.106
...
aws-java-sdk-core-1.11.106.jar 2017-03-20 23:44 840754
...
aws-java-sdk-core-1.11.106.pom 2017-03-20 23:44 4039
Use version 0.13.13 of SBT, it works.
I use SBT 0.13.1.
When I add HornetQ as my dependency:
libraryDependencies += "org.hornetq" % "hornetq-server" % "2.4.1.Final"
sbt throws exception below.
What I want is to have SBT resolving org.hornetq#hornetq-native;2.4.1.Final!hornetq-native.jar but not org.hornetq#hornetq-native;2.4.1.Final!hornetq-native.${native-package-type}.
Is this a SBT bug or can/should I specify some property to get it going?
[error] (*:update) sbt.ResolveException: download failed: org.hornetq#hornetq-native;2.4.1.Final!hornetq-native.${native-package-type}
[info] Updating {file:/Users/my/workhome/dev/scala-learn/}scala_learn...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] [FAILED ] org.hornetq#hornetq-native;2.4.1.Final!hornetq-native.${native-package-type}: (0ms)
[warn] ==== local: tried
[warn] /Users/my/.ivy2/local/org.hornetq/hornetq-native/2.4.1.Final/${native-package-type}s/hornetq-native.${native-package-type}
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/org/hornetq/hornetq-native/2.4.1.Final/hornetq-native-2.4.1.Final.${native-package-type}
[warn] ==== 99-empty: tried
[warn] http://version99.qos.ch/org/hornetq/hornetq-native/2.4.1.Final/hornetq-native-2.4.1.Final.${native-package-type}
[warn] ==== Local Maven Repository: tried
[warn] file:///Users/my/.m2/repository/org/hornetq/hornetq-native/2.4.1.Final/hornetq-native-2.4.1.Final.${native-package-type}
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.hornetq#hornetq-native;2.4.1.Final!hornetq-native.${native-package-type}
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: download failed: org.hornetq#hornetq-native;2.4.1.Final!hornetq-native.${native-package-type}
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:213)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:104)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:51)
at sbt.IvySbt$$anon$3.call(Ivy.scala:60)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:81)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
at xsbt.boot.Using$.withResource(Using.scala:11)
at xsbt.boot.Using$.apply(Using.scala:10)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:60)
at sbt.IvySbt.withIvy(Ivy.scala:101)
at sbt.IvySbt.withIvy(Ivy.scala:97)
at sbt.IvySbt$Module.withModule(Ivy.scala:116)
at sbt.IvyActions$.update(IvyActions.scala:121)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1161)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1159)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1182)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1180)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1184)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1179)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1187)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1152)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1130)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
at sbt.std.Transform$$anon$4.work(System.scala:64)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:244)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
[error] (*:update) sbt.ResolveException: download failed: org.hornetq#hornetq-native;2.4.1.Final!hornetq-native.${native-package-type}
[error] Failed to obtain dependency classpath
java.lang.IllegalArgumentException
at org.sbtidea.SbtIdeaModuleMapping$LibrariesExtractor.managedLibraries(SbtIdeaModuleMapping.scala:42)
at org.sbtidea.SbtIdeaModuleMapping$LibrariesExtractor.allLibraries(SbtIdeaModuleMapping.scala:31)
at org.sbtidea.SbtIdeaPlugin$.projectData(SbtIdeaPlugin.scala:220)
at org.sbtidea.SbtIdeaPlugin$$anonfun$2.applyOrElse(SbtIdeaPlugin.scala:88)
at org.sbtidea.SbtIdeaPlugin$$anonfun$2.applyOrElse(SbtIdeaPlugin.scala:87)
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33)
at scala.collection.TraversableLike$$anonfun$collect$1.apply(TraversableLike.scala:278)
at scala.collection.immutable.Map$Map1.foreach(Map.scala:109)
at scala.collection.TraversableLike$class.collect(TraversableLike.scala:278)
at scala.collection.AbstractTraversable.collect(Traversable.scala:105)
at org.sbtidea.SbtIdeaPlugin$.doCommand(SbtIdeaPlugin.scala:87)
at org.sbtidea.SbtIdeaPlugin$$anonfun$org$sbtidea$SbtIdeaPlugin$$ideaCommand$2.apply(SbtIdeaPlugin.scala:45)
at org.sbtidea.SbtIdeaPlugin$$anonfun$org$sbtidea$SbtIdeaPlugin$$ideaCommand$2.apply(SbtIdeaPlugin.scala:45)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
at sbt.Command$.process(Command.scala:95)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:100)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:100)
at sbt.State$$anon$1.process(State.scala:179)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:100)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:100)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.MainLoop$.next(MainLoop.scala:100)
at sbt.MainLoop$.run(MainLoop.scala:93)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:71)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:66)
at sbt.Using.apply(Using.scala:25)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:66)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:49)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:33)
at sbt.MainLoop$.runLogged(MainLoop.scala:25)
at sbt.StandardMain$.runManaged(Main.scala:57)
at sbt.xMain.run(Main.scala:29)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
at xsbt.boot.Launch$.run(Launch.scala:57)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:65)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:32)
at xsbt.boot.Boot$.main(Boot.scala:21)
at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.IllegalArgumentException
[error] Use 'last' for the full log.
It appears that it's a bug (or at least a Maven feature that breaks build tools) in HornetQ as reported by a Gradle user in http://forums.gradle.org/gradle/topics/gradle_fails_to_parse_a_org_hornetq_hornetq_native_2_4_0_final_pom:
It seems, Gradle does not expand the property ${native-package-type}
defined at the pom bottom when downloading the artifact.
It's buried in pom.xml.
As a workaround use the following in build.sbt:
libraryDependencies += "org.hornetq" % "hornetq-server" % "2.4.1.Final"
libraryDependencies += "org.hornetq" % "hornetq-native" % "2.4.1.Final" from "http://repo1.maven.org/maven2/org/hornetq/hornetq-native/2.4.1.Final/hornetq-native-2.4.1.Final.jar"
It worked for me.
I just started working with Play 2 and Heroku, but when I tried to deployed the application I got an error. I tried doing an sbt clean compile and this is what I got:
Marcelos-MacBook-Pro:guzmanenergy marcelo$ sbt clean compile
Marcelos-MacBook-Pro:guzmanenergy marcelo$ sbt clean compile
[info] Loading project definition from /projects/guzmanenergy/project
[warn] [NOT FOUND ] xml-apis#xml-apis;1.0.b2!xml-apis.jar (146ms)
[warn] ==== Typesafe repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: xml-apis#xml-apis;1.0.b2!xml-apis.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/projects/guzmanenergy/project/}default-de2d7b/*:update: sbt.ResolveException: download failed: xml-apis#xml-apis;1.0.b2!xml-apis.ja
Try adding the line
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/repo1/"
to your project/plugins.sbt file. Make sure there is a white line between every line, check the guide for more info
Got a fresh Homebrew install of scala, giter8, sbt (0.11.3), and maven and everything checks out for the most part. brew doctor shows just known mods I've made by installing pcre and python 2.7 manually. When I get the play-scala template and then run it for the first time, I get the following unresolved deps on slf4j
# sudo sbt run
...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile
[warn] :: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/Users/homedir/typesafe/my_app/}my_app/:update: sbt.ResolveException: unresolved dependency: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile
[error] unresolved dependency: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
[warn] some of the dependencies were not recompiled properly, so classloader is not avaialable
[info] Updating {file:/Users/homedir/typesafe/my_app/}my_app...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile
[warn] :: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/Users/homedir/typesafe/my_app/}my_app/:update: sbt.ResolveException: unresolved dependency: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile
[error] unresolved dependency: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
Running clean, reload, update manually:
# sudo sbt
[info] Loading project definition from /Users/homedir/typesafe/my_app/project
[info] Set current project to my_app (in build file:/Users/homedir/typesafe/my_app/)
[my_app] $ clean
[success] Total time: 0 s, completed Aug 15, 2012 7:23:10 AM
[my_app] $ reload
[info] Loading project definition from /Users/homedir/typesafe/my_app/project
[info] Set current project to my_app (in build file:/Users/homedir/typesafe/my_app/)
[my_app] $ update
[info] Updating {file:/Users/homedir/typesafe/my_app/}my_app...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile
[warn] :: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/Users/homedir/typesafe/my_app/}my_app/:update: sbt.ResolveException: unresolved dependency: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile
[error] unresolved dependency: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
[error] Total time: 7 s, completed Aug 15, 2012 7:23:23 AM
What is the proper way to prevent this? Shouldn't these deps be downloaded during initialization?
Thanks!
Thanks to this question I ended up deleting ~/.m2 and ~/.ivy2, then did clean, update, reload. Subsequently everything worked. The update command successfully retrieved slf4j:
[my_app] $ update
[info] Updating {file:/Users/homedir/typesafe/my_app/}my_app...
[info] downloading http://repo.typesafe.com/typesafe/releases/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar ...
[info] [SUCCESSFUL ] org.slf4j#slf4j-api;1.6.1!slf4j-api.jar (1481ms)
Reading this lead me to doing the task before pushing/resolving.
I have looked at related questions and tried the suggestions there. They don't seem to help.
Here is what I have in my build.sbt file:
resolvers += Resolver.sonatypeRepo("snapshots")
...
libraryDependencies ++= Seq(
"org.elasticsearch" %% "elasticsearch-spark" % "2.2.0.BUILD-SNAPSHOT"
)
...
I have confirmed that repo has the appropriate jar. Here is the output from doing compile in the sbt interpreter:
[info] Resolving org.elasticsearch#elasticsearch-spark_2.11;2.2.0.BUILD-SNAPSHOT ...
[warn] module not found: org.elasticsearch#elasticsearch-spark_2.11;2.2.0.BUILD-SNAPSHOT
[warn] ==== local: tried
[warn] /Users/aswami/.ivy2/local/org.elasticsearch/elasticsearch-spark_2.11/2.2.0.BUILD-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-spark_2.11/2.2.0.BUILD-SNAPSHOT/elasticsearch-spark_2.11-2.2.0.BUILD-SNAPSHOT.pom
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.elasticsearch#elasticsearch-spark_2.11;2.2.0.BUILD-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.elasticsearch:elasticsearch-spark_2.11:2.2.0.BUILD-SNAPSHOT (/Users/aswami/repos/dtex-datascience/build.sbt#L129)
[warn] +- com.dtex:analysis_2.11:0.1
[trace] Stack trace suppressed: run last analysis/*:update for the full output.
[error] (analysis/*:update) sbt.ResolveException: unresolved dependency: org.elasticsearch#elasticsearch-spark_2.11;2.2.0.BUILD-SNAPSHOT: not found
Why does it not try the sonatype-snapshots repo?
What should I do differently to resolve the problem?
Thanks.
You can specify additional resolvers, for sonatype snapshots you could add resolvers +=
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" , see http://www.scala-sbt.org/0.13/docs/Resolvers.html for more information.