bazelbuild / migration-tooling

Migration tools for Bazel
Apache License 2.0
45 stars 30 forks source link

Cannot interpolate variables #94

Open nfisher opened 6 years ago

nfisher commented 6 years ago

It appears this tool has an issue with variable interpolation from properties.

As an example when I run the following command it does not include a reference to OpenCensus in the resulting generate_workspace.bzl;

bazel run //generate_workspace -- -r http://uk.maven.org/maven2 -a org.apache.beam:beam-sdks-java-core:2.6.0 -a org.apache.beam:beam-runners-direct-java:2.6.0 -a org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.6.0 -o ~/workspace/go/src/github.com/connectedventures/bquploader/

<!-- snip -->

INFO:   Downloading pom for com.google.cloud.bigtable:bigtable-protos:1.0.0-pre3
Sep 17, 2018 4:39:24 PM com.google.devtools.build.workspace.maven.DefaultModelResolver getEffectiveModel
WARNING: Unable to resolve Maven model from https://repo.maven.apache.org/maven2/com/google/cloud/bigtable/bigtable-client-core/1.0.0/bigtable-client-core-1.0.0.pom: 1 problem was encountered while building the effective model for com.google.cloud.bigtable:bigtable-client-core:1.0.0-pre3
[ERROR] 'dependencies.dependency.version' for io.opencensus:opencensus-contrib-grpc-util:jar must be a valid version but is '${opencensus.version}'. @ 

Wrote /Users/nathanfisher/workspace/go/src/github.com/connectedventures/bquploader/generate_workspace.bzl
xylo04 commented 5 years ago

I'm running into this as well. As a workaround, I've found I could use the "effective POM" output by mvn help:effective-pom -Doutput=eff_pom.xml as an input for generate_workspace.