Hey everyone,
I've recently noticed upgrading from SBT 0.13.9 to 0.13.11+ causes source jars to be unresolved for a number of our dependencies. After digging into it, it appears to do this on dependencies where we depend on a configuration that extends a private configuration in the ivy definition.
An example of such a configuration is shown in the Ivy configuration example here:
I've noticed that SBT will refuse to publish any ivy files which have a public configuration extending a private configuration, however, it seems that non-SBT based builds will do so and there is nothing I could find in the Ivy specification against it. It seems SBT could be more robust and still resolve the appropriate javadoc/sources in the case where the extended configuration is private.
Using an existing SBT test, I was able to reproduce the issue. What appears to happen is it gives up resolving the docs with message "org.example#bippy_2.11;1.0-SNAPSHOT: configuration not public in org.example#bippy_2.11;1.0-SNAPSHOT: 'compileData'. It was required from org.example#myapp$sources_javadoc_2.11;1.0-SNAPSHOT test-internal"
After cloning, from the SBT root directory, you can reproduce with the following steps:
$ cd sbt/src/sbt-test/ivy-deps-management/update-classifiers-snapshot-srcs
$ sbt bippy/publishLocal
$ cp changes/ivy-1.0-SNAPSHOT.xml target/ivy/local/org.example/bippy_2.11/1.0-SNAPSHOT/ivys/ivy.xml
$ sbt
> myapp/updateClassifiers
> check 1
Sample output:
> myapp/updateClassifiers
[info] Updating {file:/Users/jrlin/Projects/sbt/sbt/src/sbt-test/ivy-deps-management/update-classifiers-snapshot-srcs/}myapp...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Resolving jline#jline;2.12.1 ...
[info] [SUCCESSFUL ] org.scala-lang#scala-library;2.11.7!scala-library.jar(doc) (757ms)
[info] [SUCCESSFUL ] org.scala-lang#scala-library;2.11.7!scala-library.jar(src) (46ms)
[info] [SUCCESSFUL ] org.scala-lang#scala-compiler;2.11.7!scala-compiler.jar(doc) (366ms)
[info] [SUCCESSFUL ] org.scala-lang#scala-compiler;2.11.7!scala-compiler.jar(src) (85ms)
[info] [SUCCESSFUL ] org.scala-lang.modules#scala-parser-combinators_2.11;1.0.4!scala-parser-combinators_2.11.jar(doc) (39ms)
[info] [SUCCESSFUL ] org.scala-lang.modules#scala-parser-combinators_2.11;1.0.4!scala-parser-combinators_2.11.jar(src) (19ms)
[info] [SUCCESSFUL ] org.scala-lang.modules#scala-xml_2.11;1.0.4!scala-xml_2.11.jar(src) (22ms)
[info] [SUCCESSFUL ] org.scala-lang.modules#scala-xml_2.11;1.0.4!scala-xml_2.11.jar(doc) (56ms)
[info] [SUCCESSFUL ] org.scala-lang#scala-reflect;2.11.7!scala-reflect.jar(src) (36ms)
[info] [SUCCESSFUL ] org.scala-lang#scala-reflect;2.11.7!scala-reflect.jar(doc) (153ms)
[info] [SUCCESSFUL ] jline#jline;2.12.1!jline.jar(src) (20ms)
[info] [SUCCESSFUL ] jline#jline;2.12.1!jline.jar(doc) (30ms)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.example#bippy_2.11;1.0-SNAPSHOT: configuration not public in org.example#bippy_2.11;1.0-SNAPSHOT: 'compileData'. It was required from org.example#myapp$sources_javadoc_2.11;1.0-SNAPSHOT test-internal
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[success] Total time: 3 s, completed Apr 28, 2017 3:33:05 PM
> check 1
[trace] Stack trace suppressed: run last update-classifiers-snapshot-srcs/*:check for the full output.
[error] (update-classifiers-snapshot-srcs/*:check) bippy_2.11-1.0-SNAPSHOT-sources.jar MIA
[error] Total time: 0 s, completed Apr 28, 2017 3:33:12 PM