Can I use Play framework version 2.3.0 with scala 2.10.4?
I know that this version of Play has 2.11.1 by default by I have a lib with 2.10.4 support only.
I get errors like these:
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.play#play_2.10;2.3.0: not found
[error] unresolved dependency: com.typesafe.play#play-iteratees_2.10;2.3.0: not found
[error] unresolved dependency: com.typesafe.play#play-test_2.10;2.3.0: not found
[error] unresolved dependency: com.typesafe.play#play-ws_2.10;2.3.0: not found
[error] unresolved dependency: com.typesafe.play#play-docs_2.10;2.3.0: not found
There is currently a problem with the Typesafe repository (many developers have the same problem).
You can temporarily add this resolver in your Build.scala/build.sbt.
"Typesafe Maven Repository" at "http://repo.typesafe.com/typesafe/maven-releases/"
Related
I keep getting the following error from my GitHub Actions workflow:
[info] welcome to sbt 1.7.1 (Eclipse Adoptium Java 11.0.16.1)
[info] loading settings for project plant-simulator-build from plugins.sbt ...
[info] loading project definition from /home/runner/work/plant-simulator/plant-simulator/project
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] org.scoverage:sbt-scoverage:2.0.7 (sbtVersion=1.0, scalaVersion=2.12)
[warn]
[warn] Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading org.scoverage:sbt-scoverage;sbtVersion=1.0;scalaVersion=2.12:2.0.7
[error] Not found
[error] Not found
[error] not found: https://repo1.maven.org/maven2/org/scoverage/sbt-scoverage_2.12_1.0/2.0.7/sbt-scoverage-2.0.7.pom
[error] not found: /home/runner/.ivy2/localorg.scoverage/sbt-scoverage/scala_2.12/sbt_1.0/2.0.7/ivys/ivy.xml
[error] not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scoverage/sbt-scoverage/scala_2.12/sbt_1.0/2.0.7/ivys/ivy.xml
[error] not found: https://repo.typesafe.com/typesafe/ivy-releases/org.scoverage/sbt-scoverage/scala_2.12/sbt_1.0/2.0.7/ivys/ivy.xml
[error] at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:345)
[error] at lmcoursier.CoursierDependencyResolution.$anonfun$update$38(CoursierDependencyResolution.scala:314)
[error] at scala.util.Either$LeftProjection.map(Either.scala:573)
[error] at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:314)
I have the following defined in my project/plugins.sbt file:
// For code coverage test
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.7")
My question is, why is it taking the 2.12_1.0 scoverage version instead of 2.12.17_2.0.7? This is ruining my build. Any ideas on how to fix this?
My question is, why is it taking the 2.12_1.0 scoverage version instead of 2.12.17_2.0.7?
It's not. It is trying to find version 2.0.7 of the plugin. The 2.12 refer to the Scala version of plugins expected by SBT (different from the version of your project), and 1.0 refer to SBT major version.
The error message is relatively clear:
Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
org.scoverage:sbt-scoverage:2.0.7 (sbtVersion=1.0, scalaVersion=2.12)
This is ruining my build. Any ideas on how to fix this?
There's no version 2.0.7 as of today. Latest is 2.0.5. Check out the GitHub page of the plugin for reference: https://github.com/scoverage/sbt-scoverage.
I have an old Scala 2.11 project where one of the libraries for Scala.js is not available any more. It's a multiproject build so, I created a lib folder inside of my Scala js project and in the settings of that project set:
unmanagedBase := baseDirectory.value / "lib"
When I go in the SBT shell to js project and type: unmanagedBase it shows correct path to the lib folder. But when I try to import the project in Intellij I'm getting this error:
[warn] :: com.mediamath#scala-json_2.11;1.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.mediamath:scala-json_2.11:1.1 (/home/my_project/pg/build.sbt#L59)
[warn] +- js:js_sjs0.6_2.11:0.1-SNAPSHOT
[trace] Stack trace suppressed: run 'last js/*:ssExtractDependencies' for the full output.
[trace] Stack trace suppressed: run 'last js/*:update' for the full output.
[error] (js/*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: com.mediamath#scala-json_2.11;1.1: not found
[error] (js/*:update) sbt.ResolveException: unresolved dependency: com.mediamath#scala-json_2.11;1.1: not found
And I have scala-json_2.11-1.1.jar in my lib folder
This warning
[warn] Note: Unresolved dependencies path:
[warn] com.mediamath:scala-json_2.11:1.1 (/home/my_project/pg/build.sbt#L59)
[warn] +- js:js_sjs0.6_2.11:0.1-SNAPSHOT
suggest that the actual issue that requires js:js_sjs0.6_2.11:0.1-SNAPSHOT, so some dependency related to Scala.js 0.6, while you provided scala-json_2.11-1.1.jar, a JAR dedicated for Scala.js 1.1.
Since you added a JAR as unmanaged, resolvers cannot perform evictions or suggest incompatibilities, and can merely verify whether dependencies are there or not, so you'd have to resolve them on your own.
You have some options like editing the MANIFEST file (if code would happen to be compatible between versions), or (if it's open source) compile the offending library yourself for Scala.js 1.1.
I have a scala 3.0.0-RC1 project that I'm trying to upgrade to scala 3.0.0.
I set the sbt version to 1.5.2 and scalaVersion := "3.0.0" but got this error:
[warn] Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading org.scala-lang:scala3-library_3.0.0:3.0.
You need to remove sbt-dotty plugin from your project/plugins.sbt.
I'm trying to create a new Spark application based on Hortonworks tutorial.But the build.sbt keeps throwing the below error when i try to import the necessary modules.
I have SCALA - 2.11.4 AND SBT 0.13 installed.Any help ??
Error:Error while importing SBT project:<br/>...<br/><pre>[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.scala-lang:scala-library:2.11.4 ((sbt.Classpaths) Defaults.scala#L1340)
[warn] +- sparktutorialscala:sparktutorialscala_2.11:1.0
[warn] org.apache.spark:spark-core_2.11:2.1.0 (C:\Users\USERNAME\IdeaProjects\HelloWorld\build.sbt#L7-13)
[warn] +- sparktutorialscala:sparktutorialscala_2.11:1.0
[warn] org.scala-lang:scala-compiler:2.11.4
[warn] +- sparktutorialscala:sparktutorialscala_2.11:1.0
[trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.11.4: not found
[error] unresolved dependency: org.apache.spark#spark-core_2.11;2.1.0: not found
[error] unresolved dependency: org.scala-lang#scala-compiler;2.11.4: not found
[error] (*:update) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.11.4: not found
[error] unresolved dependency: org.apache.spark#spark-core_2.11;2.1.0: not found
[error] unresolved dependency: org.scala-lang#scala-compiler;2.11.4: not found
[error] Total time: 66 s, completed 17-Oct-2017 10:49:23
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true</pre><br/>See complete
build.sbt
name := "sparkTutorialScala"
version := "1.0"
scalaVersion := "2.11.4"
libraryDependencies ++= {
val sparkVer = "2.1.0"
Seq(
"org.apache.spark" %% "spark-core" % sparkVer % "provided" withSources()
)
}
Updated Error message :
[error] unresolved dependency: org.apache.spark#spark-core_2.11;2.2.0: public: unable to get resource for org/apache/spark#spark-core_2.11;2.2.0: res=https://repo1.maven.org/maven2/org/apache/spark/spark-core_2.11/2.2.0/spark-core_2.11-2.2.0.pom: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.60.209:443
[error] unresolved dependency: org.scala-lang#scala-compiler;2.11.8: public: unable to get resource for org/scala-lang#scala-compiler;2.11.8: res=https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.11.8/scala-compiler-2.11.8.pom: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.60.209:443
[error] (*:ssExtractDependencies) sbt.librarymanagement.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.11.8: public: unable to get resource for org/scala-lang#scala-library;2.11.8: res=https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.8/scala-library-2.11.8.pom: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.60.209:443
[error] unresolved dependency: org.apache.spark#spark-core_2.11;2.2.0: public: unable to get resource for org/apache/spark#spark-core_2.11;2.2.0: res=https://repo1.maven.org/maven2/org/apache/spark/spark-core_2.11/2.2.0/spark-core_2.11-2.2.0.pom: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.60.209:443
[error] unresolved dependency: org.scala-lang#scala-compiler;2.11.8: public: unable to get resource for org/scala-lang#scala-compiler;2.11.8: res=https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.11.8/scala-compiler-2.11.8.pom: java.net.ConnectException: Failed to connect to repo1.maven.org/151.101.60.209:443
[error] Total time: 9 s, completed 19-Oct-2017 15:11:47
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true</pre><br/>See complete log in <a href="file:/C:/Users/
Well,SBT 1.0 was not compatible with the version of IDEAJ plugin or spark that I was using.Installing SBT 0.13 instead of the latest one resolved the issue.
Downloaded play-2.0 from type safe yesterday, following instructions as far as I can, but when I come to build with sbt I get unresolved dependency errors:
[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/george/work/play/gbraw/}gbraw/*: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
I have deleted my .sbt directory (from an earlier install of sbt) but no joy. I'm sure I have something lying around that I shouldn't have but I'd appreciate any guidance on where to look...
Thanks
so there is a problem with .ivy2 repository
as for commons-codec-1.4
there are ivy-1.4.xml and ivydata-1.4.properties files
in ${ivy_home}/cache/commons-codec/commons-codec dir
but NO real commons-codec-1.4.jar in /jars subdir
DELETE these .xml and .properties files and compile your project with sbt once again
dependency should fetch now
the same is for slf4j-api-1.6.1.jar