bazelbuild / migration-tooling

Migration tools for Bazel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Test and Runtime Maven Scopes

petroseskinder opened this issue · comments

Within the Resolver class (com.google.devtools.build.workspace.maven package), the resolveEffectiveModel function simply skips over any dependencies that are not scoped as COMPILE. Maven supports five other types of dependencies, of particular note are the test and runtime scope. It would be useful to add support to these scopes as well.

Here is the relevant portion of the Resolver

public Model resolveEffectiveModel(ModelSource modelSource, Set<String> exclusions, Rule parent) {
    Model model = modelResolver.getEffectiveModel(modelSource);
    ...
    for (Dependency dependency : model.getDependencies()) {
      if (!dependency.getScope().equals(COMPILE_SCOPE)) {
        continue;
      }
      ...
    }
    ...
}