migration-tooling
migration-tooling copied to clipboard
Aether dependency resolution fails and generates partial workspace
I'm not sure if this is the same bug as #47 with a different manifestation:
% bazel run //generate_workspace -- --output_dir /tmp --artifact=ru.vyarus:dropwizard-guicey:jar:4.0.1
INFO: Found 1 target...
Target //generate_workspace:generate_workspace up-to-date:
bazel-bin/generate_workspace/generate_workspace.jar
bazel-bin/generate_workspace/generate_workspace
INFO: Elapsed time: 0.072s, Critical Path: 0.00s
INFO: Running command line: bazel-bin/generate_workspace/generate_workspace --output_dir /tmp '--artifact=ru.vyarus:dropwizard-guicey:jar:4.0.1'
Aug 08, 2017 8:18:18 PM com.google.devtools.build.workspace.maven.DefaultModelResolver getEffectiveModel
WARNING: Unable to resolve Maven model from https://repo1.maven.org/maven2/ru/vyarus/dropwizard-guicey/4.0.1/dropwizard-guicey-4.0.1.pom: 4 problems were encountered while building the effective model for ru.vyarus:dropwizard-guicey:4.0.1
[FATAL] Non-resolvable parent POM com.google.inject:guice-parent:4.1.0: Unable to resolve version @ com.google.inject:guice-bom:[unknown-version]
[ERROR] 'dependencies.dependency.version' for com.google.inject:guice:jar is missing. @
[ERROR] 'dependencies.dependency.version' for com.google.inject.extensions:guice-servlet:jar is missing. @
[ERROR] 'dependencies.dependency.version' for com.google.inject.extensions:guice-multibindings:jar is missing. @
Wrote /tmp/generate_workspace.bzl
The generated file is bare:
# The following dependencies were calculated from:
#
# generate_workspace --output_dir /tmp --artifact=ru.vyarus:dropwizard-guicey:jar:4.0.1
def generated_maven_jars():
native.maven_jar(
name = "ru_vyarus_dropwizard_guicey",
artifact = "ru.vyarus:dropwizard-guicey:4.0.1",
)
def generated_java_libraries():
native.java_library(
name = "ru_vyarus_dropwizard_guicey",
visibility = ["//visibility:public"],
exports = ["@ru_vyarus_dropwizard_guicey//jar"],
)
If I check out an old commit before #45, the generated file is full of dependencies. I also tried the fix in #50, but it doesn't help this scenario.
Thanks for pointing this out.
No, this is a slightly different issue than #47.
dropwizard-guicy-4.0.1.pom doesn't explicitly specify the version of some of its dependencies. Instead relying on the dependency management section at the bottom.
We are currently not picking this up and then immediately failing out. I'll play around with this
Any updates on this? It seems similar to my issue https://github.com/bazelbuild/migration-tooling/issues/57
I just tried to reproduce on master and the generate_workspace.bzl file seems to have all of the dependencies in it now. Should we close this issue, or is there more that needs to be done?