migration-tooling
migration-tooling copied to clipboard
generate_workspace doesn't include runtime dependencies of maven artifact
trafficstars
Migrated from issue 2316 in main repository
example:
bazel run //src/tools/generate_workspace -- --artifact=org.mockito:mockito-core:2.4.2
mockito-core has 4 runtime dependencies, none were generated.
I believe the cause of this issue is this line in the Maven Resolver:
public Model resolveEffectiveModel(ModelSource modelSource, Set<String> exclusions, Rule parent) {
Model model = modelResolver.getEffectiveModel(modelSource, handler);
...
for (Dependency dependency : model.getDependencies()) {
if (!dependency.getScope().equals(COMPILE_SCOPE)) {
continue;
}
...
}
Any maven dependencies that aren't scoped for compile time are ignored.