issue with resolving sbt dependencies scalameta

85 views Asked by At

I have created an sbt project. I am trying to add the org.scalameta dependency for scala code formatting. I added following dependency in project/plugins.sbt addSbtPlugin("org.scalameta" %% "scalameta_2.11" % "4.5.3")

But I am getting following error:

[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]          org.scalameta:scalameta_2.11:4.5.3 (sbtVersion=1.0, scalaVersion=2.12)
[warn]
[warn]  Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading org.scalameta:scalameta_2.11;sbtVersion=1.0;scalaVersion=2.12:4.5.3
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/org/scalameta/scalameta_2.11_2.12_1.0/4.5.3/scalameta_2.11-4.5.3.pom
1

There are 1 answers

0
Austinito On

If a double percent symbol (%%) is used, sbt will resolve the relevant Scala version.

A single percent symbol (%) is used to resolve the dependencies to a specific Scala version.

I just copy and pasted the example from Maven, and it worked for me:

libraryDependencies += "org.scalameta" %% "scalameta" % "4.5.3"

You can find an example within the Maven repository page.