how to publish scalajs plugin for sbt 1.0 in local - scala.js

https://github.com/scala-js/scala-js/blob/master/DEVELOPING.md#publish-locally
Tried So far :
> ^^ 1.0.2
> ;ir/publishLocal;tools/publishLocal;jsEnvs/publishLocal;jsEnvsTestKit/publishLocal;nodeJSEnv/publishLocal;testAdapter/publishLocal;sbtPlugin/publishLocal
Error :
[error] (sbtPlugin/*:update) sbt.ResolveException: unresolved dependency: org.scala-native#sbt-crossproject;0.2.1: not found

You have to do ++2.12.3 first:
> ++2.12.3
> ^^1.0.2
> ;ir/publishLocal;...

Related

Scala SBT Plugin Version Error During Build

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.

Spark: sbt - dependency error

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.

failing to download a dependencies with sbt

I'm trying to use this code in the link bellow : https://github.com/dmiszkiewicz/sendgrid-scala but i can't download dependency org.miszkiewicz#sendgrid-scala_2.12;0.2-SNAPSHOT, i get this error:
::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.miszkiewicz#sendgrid-scala_2.12;0.2-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.miszkiewicz:sendgrid-scala_2.12:0.2-SNAPSHOT (/Users/aicha/Projets/data-providers/project/FruitionDataProvidersBuild.scala#L62)
[warn] +- com.fruitionsciences:sendgrid-mailer_2.12:0.1
[trace] Stack trace suppressed: run 'last sendgrid-mailer/*:update' for the full output.
[trace] Stack trace suppressed: run 'last sendgrid-mailer/*:ssExtractDependencies' for the full output.
[error] (sendgrid-mailer/*:update) sbt.ResolveException: unresolved dependency: org.miszkiewicz#sendgrid-scala_2.12;0.2-SNAPSHOT: not found
[error] (sendgrid-mailer/*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.miszkiewicz#sendgrid-scala_2.12;0.2-SNAPSHOT: not found
i'm working with scala 2.12, Does anybody have an idea
You should use Scala 2.11 to use this dependency from Sonatype repo. As you may see here, there is build of sendgrid only for Scala 2.11 in Sonatype repo, not for Scala 2.12.
Or maybe, it will be better for you to just use sendgrid-java.

play 2.3.0 and Scala 2.10.4

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/"

scalatra issue when running ./sbt: sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;2.1.1: not found

I tried adding eclipse support to my project by running ./sbt eclipse after adding addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.1") to project/plugins.sbt.
I get this error message
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;2.1.1: not found
I created the project by g8 using the simplest template. I'm trying to add eclipse support
[Edit: sbt version]
Detected sbt version 0.13.0
Starting sbt: invoke with -help for other options
Using /Users/andre/.sbt/0.13.0 as sbt dir, -sbt-dir to override.
Which version of sbt are you using? typesafehub/sbteclipse says the latest is 2.3.0 for sbt 0.13, and 2.2.0 for sbt 0.12.