sbt / sbt-native-packager

sbt Native Packager
https://sbt-native-packager.readthedocs.io/en/stable/
BSD 2-Clause "Simplified" License
1.59k stars 437 forks source link

Unable to use the plugin - Error downloading com.typesafe.sbt:sbt-native-packager;sbtVersion=1.0;scalaVersion=2.12:1.9.4 #1526

Closed OndrejSpanel closed 1 year ago

OndrejSpanel commented 1 year ago

Expected behaviour

When I add addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.4") into project/plugins,sbt as instructed by documentation, the sbt file should still work.

Actual behaviour

Once I have added addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.4"), my SBT gives error when loading. The error is:

sbt.librarymanagement.ResolveException: Error downloading com.typesafe.sbt:sbt-native-packager;sbtVersion=1.0;scalaVersion=2.12:1.9.4

Information

The issue can be reproduced both on my system and on github runners. See log of https://github.com/OpenGrabeso/loctio/actions/runs/3322523336/jobs/5491662284, which also contains additional info about the search:

    Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.typesafe.sbt:sbt-native-packager:1.9.4 (sbtVersion=1.0, scalaVersion=2.12)
[warn] 
[warn]  Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.sbt:sbt-native-packager;sbtVersion=1.0;scalaVersion=2.12:1.9.4
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-native-packager_2.12_1.0/1.9.4/sbt-native-packager-1.9.4.pom
[error]   not found: /home/runner/.ivy2/localcom.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.9.4/ivys/ivy.xml
[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.9.4/ivys/ivy.xml
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.9.4/ivys/ivy.xml

The complete project can be seen at https://github.com/OpenGrabeso/loctio/tree/docker

OndrejSpanel commented 1 year ago

Note: when I search for the artifacts on Maven, I am shown this:

https://search.maven.org/artifact/com.github.sbt/sbt-native-packager/1.9.9/jar

Following link shown at the page as Download produces 404 error, though:

https://repo1.maven.org/maven2/com/github/sbt/sbt-native-packager/1.9.9/sbt-native-packager-1.9.9.jar

guizmaii commented 1 year ago

sbtVersion=1.0 🤔

Which version of sbt are you using?

OndrejSpanel commented 1 year ago

As you can see in the project, I am using 1.7.2 - I have recently upgraded to that, I was using 1.6.1. Project is open source, and it fails not only on my machine, but on GitHub runners as well, see links in the issue.

OndrejSpanel commented 1 year ago

I have merged your PR, the error is still the same:

https://github.com/OpenGrabeso/loctio/actions/runs/3323086881/jobs/5492987647

Is it possible the plugin artifacts got deleted from Maven servers somehow?

[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.typesafe.sbt:sbt-native-packager:1.9.11 (sbtVersion=1.0, scalaVersion=2.12)
[warn] 
[warn]  Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.sbt:sbt-native-packager;sbtVersion=1.0;scalaVersion=2.12:1.9.11
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-native-packager_2.12_1.0/1.9.11/sbt-native-packager-1.9.11.pom
[error]   not found: /home/runner/.ivy2/localcom.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.9.11/ivys/ivy.xml
[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.9.11/ivys/ivy.xml
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.9.11/ivys/ivy.xml
guizmaii commented 1 year ago

@OndrejSpanel https://github.com/OpenGrabeso/loctio/pull/20/files#r1004806991

guizmaii commented 1 year ago

@OndrejSpanel I think you can close your issue 🙂