sbt-git icon indicating copy to clipboard operation
sbt-git copied to clipboard

updateSbtClassifiers fails after adding sbt-git

Open dvic opened this issue 8 years ago • 10 comments
trafficstars

Somehow the javax and com.sun dependency are still fetched, I get this error:

[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::              FAILED DOWNLOADS            ::
[warn] 	:: ^ see resolution messages for details  ^ ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: javax.jms#jms;1.1!jms.jar
[warn] 	:: com.sun.jdmk#jmxtools;1.2.1!jmxtools.jar
[warn] 	:: com.sun.jmx#jmxri;1.2.1!jmxri.jar
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::

See dvic/sbt-git-update-sbt-classifiers-fails for a simple example of this issue (scala-seed project with SBT 0.13.15 and Scala 2.12.2).

Could this be because of transitive dependencies in plugins.sbt of sbt-git?

dvic avatar May 17 '17 21:05 dvic

perhaps #129 will fix this.

bchazalet avatar May 18 '17 07:05 bchazalet

Maybe, but it would surprise me because the failed downloads are already excluded from the build:

libraryDependencies ++= Seq(
  "org.eclipse.jgit" % "org.eclipse.jgit.pgm" % "4.5.0.201609210915-r"
    exclude("javax.jms", "jms")
    exclude("com.sun.jdmk", "jmxtools")
    exclude("com.sun.jmx", "jmxri")
    exclude("org.slf4j", "slf4j-log4j12")
    exclude("log4j", "log4j")
)

Could it be one of the dependencies in plugins.sbt? (bintray-sbt or scripted-plugin)

dvic avatar May 18 '17 11:05 dvic

Also, I notice that the latest version for bintray-sbt is "org.foundweekends" % "sbt-bintray" % "0.4.0", not sure if it's compatible or solves the problem. I'll see if I can try it out later tonight.

dvic avatar May 18 '17 11:05 dvic

the dependencies in plugins.sbt are not supposed to affect the published artefact's dependencies though...

bchazalet avatar May 18 '17 12:05 bchazalet

Yeah that's what I'm thinking as well. I just tried running updateSbtClassifiers on the master branch and it fails. Commenting out addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.2") and the related sbt-git settings fixes the problem. Maybe0.9.2 got published without the exclude parts?

dvic avatar May 18 '17 13:05 dvic

or maybe one or all of our excludes are plain wrong?

bchazalet avatar May 18 '17 14:05 bchazalet

Maybe.. Or updateSbtClassifiers ignores the exclusions?

I tried the following in plugins.sbt but it also does not work:

addSbtPlugin("com.typesafe.sbt" % "sbt-git"     % "0.9.2" excludeAll(
    ExclusionRule(organization = "com.sun.jdmk"),
    ExclusionRule(organization = "com.sun.jmx"),
    ExclusionRule(organization = "javax.jms")
  )
)

dvic avatar May 18 '17 14:05 dvic

hey @dvic , do you want to try 0.9.3 and see if that makes a difference?

bchazalet avatar May 22 '17 09:05 bchazalet

0.9.3 has been released. Can you try if that helps?

leonardehrenfried avatar May 22 '17 09:05 leonardehrenfried

Project build failed inside docker container with the same exception as @dvic mentioned. After analyzing transient dependencies found that the issue is related to plugins.

Migration from 0.9.2 to 0.9.3 helped to resolve it. Thanks.

UnknownNPC avatar Feb 07 '18 13:02 UnknownNPC