migration-tooling icon indicating copy to clipboard operation
migration-tooling copied to clipboard

Cannot interpolate variables

Open nfisher opened this issue 7 years ago • 1 comments

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

nfisher avatar Sep 17 '18 19:09 nfisher

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.

xylo04 avatar Dec 31 '18 21:12 xylo04