I have a sbt project with three modules A, B, Common wherein
A is compatible with scala version of 2.11.12 and depends on Common
B is compatible with scala version of 2.12.7 and depends on Common
Common can cross compile with both 2.11.12, 2.12.7 versions
To support this I have created a build.sbt as following:
import sbt._
val scalaL = "2.11.12"
val scalaH = "2.12.7"
lazy val common = (project in file("common"))
.settings(crossScalaVersions := Seq(scalaH, scalaL))
lazy val A = (project in file("A"))
.settings(scalaVersion := scalaL)
.dependsOn(common)
lazy val B = (project in file("B"))
.settings(scalaVersion := scalaH)
.dependsOn(common)
lazy val root = (project in file("."))
.aggregate(common, B, A)
.settings(crossScalaVersions := List())
I was able to update, compile this project from sbt shell by supplying the + prefix.
But when I tried building the project in Idea Intellij Ultimate 2017.3 version using the sbt project refresh option, it broke with following error:
Error while importing sbt project:
;reload; set _root_.org.jetbrains.sbt.StructureKeys.sbtStructureOptions in Global := "download resolveClassifiers" ;*/*:dumpStructureTo /tmp/sbt-structure1.xml; session clear-all
[info] Loading settings for project global-plugins from idea.sbt ...
[info] Loading global plugins from /home/bala/.sbt/1.0/plugins
[info] Loading project definition from /home/bala/ether-streaming/cross2/project
[info] Loading settings for project root from build.sbt ...
[warn] Discarding 1 session setting. Use 'session save' to persist session settings.
[info] Set current project to root (in build file:/home/bala/ether-streaming/cross2/)
[info] Defining Global / sbtStructureOptions
[info] The new value will be used by Global / ssOptions
[info] Reapplying settings...
[info] Set current project to root (in build file:/home/bala/ether-streaming/cross2/)
[info] Updating A...
[warn] module not found: common#common_2.11;0.1.0-SNAPSHOT
[warn] ==== local: tried
[warn] /home/bala/.ivy2/local/common/common_2.11/0.1.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/common/common_2.11/0.1.0-SNAPSHOT/common_2.11-0.1.0-SNAPSHOT.pom
[warn] ==== local-preloaded-ivy: tried
[warn] /home/bala/.sbt/preloaded/common/common_2.11/0.1.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:////home/bala/.sbt/preloaded/common/common_2.11/0.1.0-SNAPSHOT/common_2.11-0.1.0-SNAPSHOT.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: common#common_2.11;0.1.0-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] common:common_2.11:0.1.0-SNAPSHOT
[warn] +- a:a_2.11:0.1.0-SNAPSHOT
[error] sbt.librarymanagement.ResolveException: unresolved dependency: common#common_2.11;0.1.0-SNAPSHOT: not found
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error] at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
[error] at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2561)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: common#common_2.11;0.1.0-SNAPSHOT: not found
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error] at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
[error] at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2561)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (A / update) sbt.librarymanagement.ResolveException: unresolved dependency: common#common_2.11;0.1.0-SNAPSHOT: not found
[error] (A / ssExtractDependencies) sbt.librarymanagement.ResolveException: unresolved dependency: common#common_2.11;0.1.0-SNAPSHOT: not found
[error] Total time: 1 s, completed 12 Dec, 2018 12:24:28 AM
From the error it is evident that it failed to resolve the 2.11 dependency of Common module while updating A. Similar error would have occurred if I would have ran update instead of + update from shell.
How can I make cross-building work in Intellij ? Or is there any existing option in Intellij to support cross-builds ?
I think your layout is a bit unusual, but after some experimentation I was able to come up with something which I think is acceptable. It imports into the IDE, syntax highlighting works in all modules, IDE even correctly offers 2.11 / 2.12 specific completion in the A / B parts, and builds modules as necessary.
val scalaL = "2.11.12"
val scalaH = "2.12.7"
lazy val common = (project in file("common"))
.settings(crossScalaVersions := Seq(scalaH, scalaL))
lazy val A = (project in file("A"))
.settings(scalaVersion := scalaL)
.dependsOn(common)
lazy val B = (project in file("B"))
.settings(scalaVersion := scalaH)
.dependsOn(common)
lazy val rootA = (project in file("rootA"))
.aggregate(common, A)
.settings(scalaVersion := scalaL)
lazy val rootB = (project in file("rootB"))
.aggregate(common, B)
.settings(scalaVersion := scalaH)
lazy val root = (project in file(".")).aggregate(rootA)
Related
I am using sbt 1.2.8 and i am trying to add keycloak-admin-client
Here is my build.sbt:
scalaVersion in ThisBuild := "2.13.1"
libraryDependencies := { libraryDependencies.value ++ Seq(
"org.scalatest" %% "scalatest" % "3.1.0" % Test,
"javax.ws.rs" % "javax.ws.rs-api" % "2.0.1",
"org.keycloak" % "keycloak-adapter-core" % "3.3.0.CR2",
"org.keycloak" % "keycloak-core" % "3.3.0.CR2",
"org.keycloak" % "keycloak-admin-client" % "12.0.2")
i am getting exception
::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: junit#junit;working#yser-Inspiron-7773: not found
[warn] :: org.jboss.spec.javax.ws.rs#jboss-jaxrs-api_2.1_spec;working#yser-Inspiron-7773: not found
[warn] :: org.jboss.spec.javax.xml.bind#jboss-jaxb-api_2.3_spec;working#yser-Inspiron-7773: not found
[warn] :: org.jboss.spec.javax.servlet#jboss-servlet-api_4.0_spec;working#yser-Inspiron-7773: not found
[warn] :: org.jboss.spec.javax.annotation#jboss-annotations-api_1.3_spec;working#yser-Inspiron-7773: not found
[warn] :: javax.activation#activation;working#yser-Inspiron-7773: not found
[warn] :: org.apache.httpcomponents#httpclient;working#yser-Inspiron-7773: not found
[warn] :: commons-io#commons-io;working#yser-Inspiron-7773: not found
[warn] :: com.github.stephenc.jcip#jcip-annotations;working#yser-Inspiron-7773: not found
[warn] :: org.jboss.logging#jboss-logging;working#yser-Inspiron-7773: not found
[warn] :: org.jboss.logging#jboss-logging-annotations;working#yser-Inspiron-7773: not found
[warn] :: org.jboss.logging#jboss-logging-processor;working#yser-Inspiron-7773: not found
[warn] :: org.glassfish.jaxb#jaxb-runtime;working#yser-Inspiron-7773: not found
[warn] :: com.sun.mail#javax.mail;working#yser-Inspiron-7773: not found
[warn] :: org.apache.james#apache-mime4j;working#yser-Inspiron-7773: not found
[warn] :: com.github.fge#json-patch;working#yser-Inspiron-7773: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[error] sbt.librarymanagement.ResolveException: unresolved dependency: junit#junit;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.spec.javax.ws.rs#jboss-jaxrs-api_2.1_spec;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.spec.javax.xml.bind#jboss-jaxb-api_2.3_spec;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.spec.javax.servlet#jboss-servlet-api_4.0_spec;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.spec.javax.annotation#jboss-annotations-api_1.3_spec;working#yser-Inspiron-7773: not found
[error] unresolved dependency: javax.activation#activation;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.apache.httpcomponents#httpclient;working#yser-Inspiron-7773: not found
[error] unresolved dependency: commons-io#commons-io;working#yser-Inspiron-7773: not found
[error] unresolved dependency: com.github.stephenc.jcip#jcip-annotations;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.logging#jboss-logging;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.logging#jboss-logging-annotations;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.logging#jboss-logging-processor;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.glassfish.jaxb#jaxb-runtime;working#yser-Inspiron-7773: not found
[error] unresolved dependency: com.sun.mail#javax.mail;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.apache.james#apache-mime4j;working#yser-Inspiron-7773: not found
[error] unresolved dependency: com.github.fge#json-patch;working#yser-Inspiron-7773: not found
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error] at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
[error] at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2561)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:834)
[error] (update) sbt.librarymanagement.ResolveException: unresolved dependency: junit#junit;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.spec.javax.ws.rs#jboss-jaxrs-api_2.1_spec;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.spec.javax.xml.bind#jboss-jaxb-api_2.3_spec;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.spec.javax.servlet#jboss-servlet-api_4.0_spec;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.spec.javax.annotation#jboss-annotations-api_1.3_spec;working#yser-Inspiron-7773: not found
[error] unresolved dependency: javax.activation#activation;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.apache.httpcomponents#httpclient;working#yser-Inspiron-7773: not found
[error] unresolved dependency: commons-io#commons-io;working#yser-Inspiron-7773: not found
[error] unresolved dependency: com.github.stephenc.jcip#jcip-annotations;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.logging#jboss-logging;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.logging#jboss-logging-annotations;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.jboss.logging#jboss-logging-processor;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.glassfish.jaxb#jaxb-runtime;working#yser-Inspiron-7773: not found
[error] unresolved dependency: com.sun.mail#javax.mail;working#yser-Inspiron-7773: not found
[error] unresolved dependency: org.apache.james#apache-mime4j;working#yser-Inspiron-7773: not found
[error] unresolved dependency: com.github.fge#json-patch;working#yser-Inspiron-7773: not found
[error] Total time: 16 s, completed Jan 27, 2021, 3:22:22 PM
[IJ]sbt:myproject-auth>
Try to add libraryDependencies as suggested at Managed Dependencies:
scalaVersion in ThisBuild := "2.13.1"
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.1.0" % Test,
"javax.ws.rs" % "javax.ws.rs-api" % "2.0.1",
"org.keycloak" % "keycloak-adapter-core" % "3.3.0.CR2",
"org.keycloak" % "keycloak-core" % "3.3.0.CR2",
"org.keycloak" % "keycloak-admin-client" % "12.0.2"
)
I've below build.sbt file
name := "tads-akka-cluster-events"
organization := "technorati"
version := "0.0.3"
scalaVersion := "2.11.12"
crossScalaVersions := Seq("2.12.9", "2.13.0")
publishMavenStyle := true
PB.targets in Compile := Seq(
scalapb.gen() -> (sourceManaged in Compile).value
)
libraryDependencies += "com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % "protobuf"
credentials += Credentials("Artifactory Realm", "artifactory.svcs.opal.synacor.com", "admin", "password")
publishTo := {
val nexus = "http://artifactory.svcs.opal.synacor.com/"
if (isSnapshot.value)
Some("repository.synacor.com-snapshots" at nexus + "artifactory/synacor-local")
else
Some("repository.synacor.com-releases" at nexus + "artifactory/synacor-local")
}
When I did sbt publish, I get below error -
sbt:tads-akka-cluster-events> publish
[info] Packaging /Users/rajkumar.natarajan/Documents/Coding/misc/tads-akka-cluster-events/target/scala-2.11/tads-akka-cluster-events_2.11-0.0.3-sources.jar ...
[info] Done packaging.
[info] Wrote /Users/rajkumar.natarajan/Documents/Coding/misc/tads-akka-cluster-events/target/scala-2.11/tads-akka-cluster-events_2.11-0.0.3.pom
[info] Updating ...
[info] Done updating.
[info] Packaging /Users/rajkumar.natarajan/Documents/Coding/misc/tads-akka-cluster-events/target/scala-2.11/tads-akka-cluster-events_2.11-0.0.3.jar ...
[info] Packaging /Users/rajkumar.natarajan/Documents/Coding/misc/tads-akka-cluster-events/target/scala-2.11/tads-akka-cluster-events_2.11-0.0.3-javadoc.jar ...
[info] Done packaging.
[info] Done packaging.
[info] published tads-akka-cluster-events_2.11 to http://artifactory.svcs.opal.synacor.com/artifactory/synacor-local/technorati/tads-akka-cluster-events_2.11/0.0.3/tads-akka-cluster-events_2.11-0.0.3.pom
[error] java.io.IOException: PUT operation to URL http://artifactory.svcs.opal.synacor.com/artifactory/synacor-local/technorati/tads-akka-cluster-events_2.11/0.0.3/tads-akka-cluster-events_2.11-0.0.3.jar failed with status code 400: Bad Request
[error] at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:82)
[error] at sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.upload(GigahorseUrlHandler.scala:191)
[error] at org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatcher.java:82)
[error] at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150)
[error] at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:84)
[error] at sbt.internal.librarymanagement.ConvertResolver$LocalIfFileRepo.put(ConvertResolver.scala:366)
[error] at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
[error] at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put(ConvertResolver.scala:118)
[error] at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put$(ConvertResolver.scala:105)
[error] at sbt.internal.librarymanagement.ConvertResolver$$anonfun$defaultConvert$lzycompute$1$PluginCapableResolver$1.put(ConvertResolver.scala:165)
[error] at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5(IvyActions.scala:497)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5$adapted(IvyActions.scala:496)
[error] at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:788)
[error] at scala.collection.Iterator.foreach(Iterator.scala:937)
[error] at scala.collection.Iterator.foreach$(Iterator.scala:937)
[error] at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
[error] at scala.collection.IterableLike.foreach(IterableLike.scala:70)
[error] at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
[error] at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[error] at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:787)
[error] at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:496)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$3(IvyActions.scala:144)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:157)
[error] at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:151)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1(IvyActions.scala:144)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1$adapted(IvyActions.scala:134)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error] at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:134)
[error] at sbt.Classpaths$.$anonfun$publishTask$4(Defaults.scala:2416)
[error] at sbt.Classpaths$.$anonfun$publishTask$4$adapted(Defaults.scala:2416)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (publish) java.io.IOException: PUT operation to URL http://artifactory.svcs.opal.synacor.com/artifactory/synacor-local/technorati/tads-akka-cluster-events_2.11/0.0.3/tads-akka-cluster-events_2.11-0.0.3.jar failed with status code 400: Bad Request
[error] Total time: 2 s, completed Sep 3, 2019 4:12:46 PM
sbt:tads-akka-cluster-events>
When I checked the repository I see pom, pom.md5 and pom.sha1.
But it is missing jar, jar.md5 and jar.sha1.
Why I'm getting this error? What I'm missing and how can I fix this issue?
I've to add the setting updateOptions := updateOptions.value.withGigahorse(false) or run sbt like sbt -Dsbt.gigahorse=false clean publish.
For more details please see this github sbt issue.
I´m trying to add the dependencies to support java.time for jackson library. Those dependencies are:
val jacksonVersion = "2.9.7"
libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-parameter-names" % jacksonVersion
libraryDependencies += "com.fasterxml.jackson.module" % "jackson-datatype-jdk8" % jacksonVersion
libraryDependencies += "com.fasterxml.jackson.module" % "jackson-datatype-jsr310" % jacksonVersion
as specified here
The problem is that sbt can't find them. Based on the maven webpage here, they should be available at Maven Central and JCenter so I added the resolvers to my dependencies:
resolvers += Resolver.JCenterRepository
resolvers += Resolver.DefaultMavenRepository
I know one should be enough but they don't seem to work. The urls that they resolve for are:
[warn] ==== jcenter: tried
[warn] https://jcenter.bintray.com/com/fasterxml/jackson/module/jackson-datatype-jsr310/2.9.7/jackson-datatype-jsr310-2.9.7.pom
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/fasterxml/jackson/module/jackson-datatype-jsr310/2.9.7/jackson-datatype-jsr310-2.9.7.pom
but apparently they are not there. I don't know what I'm missing...
This is the error for the jackson-datatype-jdk8 one.
[warn] Note: Unresolved dependencies path:
[warn] com.fasterxml.jackson.module:jackson-datatype-jdk8:2.9.7 (/Users/overflow/MyDocuments/JaviOverflowDrive/_workspaces/RandomPlays/eurostar/pipeline/build.sbt#L15-16)
[warn] +- default:pipeline_2.12:0.1
[warn] com.fasterxml.jackson.module:jackson-datatype-jsr310:2.9.7 (/Users/overflow/MyDocuments/JaviOverflowDrive/_workspaces/RandomPlays/eurostar/pipeline/build.sbt#L16-17)
[warn] +- default:pipeline_2.12:0.1
[error] sbt.librarymanagement.ResolveException: unresolved dependency: com.fasterxml.jackson.module#jackson-datatype-jdk8;2.9.7: not found
[error] unresolved dependency: com.fasterxml.jackson.module#jackson-datatype-jsr310;2.9.7: not found
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error] at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
[error] at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2561)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: com.fasterxml.jackson.module#jackson-datatype-jdk8;2.9.7: not found
[error] unresolved dependency: com.fasterxml.jackson.module#jackson-datatype-jsr310;2.9.7: not found
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error] at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
[error] at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2561)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (update) sbt.librarymanagement.ResolveException: unresolved dependency: com.fasterxml.jackson.module#jackson-datatype-jdk8;2.9.7: not found
[error] unresolved dependency: com.fasterxml.jackson.module#jackson-datatype-jsr310;2.9.7: not found
[error] (ssExtractDependencies) sbt.librarymanagement.ResolveException: unresolved dependency: com.fasterxml.jackson.module#jackson-datatype-jdk8;2.9.7: not found
[error] unresolved dependency: com.fasterxml.jackson.module#jackson-datatype-jsr310;2.9.7: not found
Any idea why the dependencies are not there?
According to the link you provided, your last 2 dependencies should be with datatype :
val jacksonVersion = "2.9.7"
libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-
parameter-names" % jacksonVersion
libraryDependencies += "com.fasterxml.jackson.datatype" % "jackson-datatype-jdk8"
% jacksonVersion
libraryDependencies += "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % jacksonVersion
BTW, there is already newer version - 2.9.8 - take a look here
build.sbt: (snippet)
val hadoop_aws = "org.apache.hadoop"% "hadoop-aws" % "3.1.1"
libraryDependencies += hadoop_aws
But, when trying to sbt update:
> update
[info] Updating ...
[warn] module not found: org.apache.hadoop#hadoop-aws;3.1.1
[warn] ==== local: tried
[warn] ==== local-preloaded-ivy: tried
[warn] ==== local-preloaded: tried
[warn] ==== public: tried
[warn] ==== sbt-maven-releases: tried
[warn] ==== sbt-maven-snapshots: tried
[warn] ==== typesafe-ivy-releases: tried
[warn] ==== sbt-ivy-snapshots: tried
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.apache.hadoop#hadoop-aws;3.1.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.apache.hadoop:hadoop-aws:3.1.1 (/Users/me/project/build.sbt#L18-19)
[warn] +- com.company:project_2.11:5bbf9d74
[error] sbt.librarymanagement.ResolveException: unresolved dependency: org.apache.hadoop#hadoop-aws;3.1.1: not found
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error] at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
[error] at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2550)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (update) sbt.librarymanagement.ResolveException: unresolved dependency: org.apache.hadoop#hadoop-aws;3.1.1: not found
However, this module exists on maven-central, and sbt 1.2.3 (near as I can tell) checks maven central by default.
I'm not sure how to fix this or what to try next; everything else I've found on this looks to be solving the same error in sbt v0.13 by adding Maven as a resolver, but nothing for sbt v1.2.3, and nothing other than adding the (AFAIK) already-present Maven central resolver.
I was not able to reproduce this error using the following build with sbt 1.2.8:
ThisBuild / scalaVersion := "2.12.8"
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / organization := "com.example"
ThisBuild / organizationName := "example"
val hadoop_aws = "org.apache.hadoop"% "hadoop-aws" % "3.1.1"
lazy val root = (project in file("."))
.settings(
name := "hadoop",
libraryDependencies += hadoop_aws
)
it might be a newbie question but i'm trying to learn more about scala in intellij. I firstly created a simple HelloWorld project that worked fine. Next i watched a tutorial to create a WordCount project, but i'm getting exception error that i can't figure out.
The error i get is:
Error:Error while importing SBT project:<br/>...<br/><pre>
[error] at
sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:107)
[error] at sbt.io.Using.apply(Using.scala:22)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:101)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:57)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:42)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:34)
[error] at sbt.StandardMain$.runManaged(Main.scala:113)
[error] at sbt.xMain.run(Main.scala:76)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException:
org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[info] shutting down server
My build.sbt file is:
name := "Scalaprogramms"
version := "1.0"
scalaVersion:="2.11.8"
libraryDependencies += "org.apache.spark" %% "spark-core" % "2.2.0"
libraryDependencies += "org.apache.spark" %% "spark-streaming" % "2.2.0" % "provided"
My java version is 8
Last the last log file is
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=384M;
support was removed in 8.0
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from
/home/user/IdeaProjects/Scalaprogramms/project
[info] Loading settings from build.sbt ...
[info] Set current project to Scalaprogramms (in build
file:/home/user/IdeaProjects/Scalaprogramms/)
[info] sbt server started at
local:///home/user/.sbt/1.0/server/fc2d3f3386938f38b259/sock
sbt:Scalaprogramms>
[info] Defining Global / sbtStructureOptions, Global /
sbtStructureOutputFile, shellPrompt
[info] The new values will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to Scalaprogramms (in build
file:/home/user/IdeaProjects/Scalaprogramms/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks
from /home/user/.IdeaIC2017.2/config/plugins/Scala/launcher/sbt-
structure-1.1.jar
[error] java.lang.ClassNotFoundException:
org.jetbrains.sbt.CreateTasks$
[error] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[error] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[error] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[error] at java.lang.Class.forName0(Native Method)
[error] at java.lang.Class.forName(Class.java:348)
[error] at sbt.internal.inc.ModuleUtilities$.getObject(ModuleUtilities.scala:20)
[error] at sbt.BasicCommands$.$anonfun$call$5(BasicCommands.scala:203)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[error] at scala.collection.immutable.List.foreach(List.scala:389)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[error] at scala.collection.immutable.List.map(List.scala:295)
[error] at sbt.BasicCommands$.$anonfun$call$2(BasicCommands.scala:203)
[error] at sbt.Command$.$anonfun$applyEffect$4(Command.scala:134)
[error] at sbt.Command$.$anonfun$applyEffect$2(Command.scala:130)
[error] at sbt.MainLoop$.processCommand(MainLoop.scala:153)
[error] at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:136)
[error] at sbt.State$$anon$1.runCmd$1(State.scala:242)
[error] at sbt.State$$anon$1.process(State.scala:248)
[error] at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:136)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.MainLoop$.next(MainLoop.scala:136)
[error] at sbt.MainLoop$.run(MainLoop.scala:129)
[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:107)
[error] at sbt.io.Using.apply(Using.scala:22)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:101)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:57)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:42)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:34)
[error] at sbt.StandardMain$.runManaged(Main.scala:113)
[error] at sbt.xMain.run(Main.scala:76)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[info] shutting down server
Also, my code is:
package scala.SparkApps
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext
object WordCount {
def main(args: Array[String]): Unit = {
val inputFile = args(0)
val outputFile = args(1)
val conf = new SparkConf().setMaster("local(*)").setAppName("wordcount")
val sc = new SparkContext(Conf)
val input = sc.textFile(inputFile)
val words = input.flatMap(_.split(" "))
val counts = words.map(word => (word, 1)).reduceByKey(_+_)
counts.saveAsTextFile(outputFile)
}
}
Any ideas?