I copied the MinimalWordCount example.
I also copied all the dependencies from pom.xml
. When I run it with
mvn compile exec:java -Dexec.mainClass=com.example.MyExample
it compiles, but I get java.lang.NoSuchMethodError: com.google.api.services.dataflow.model.Environment.setSdkPipelineOptions
with the stacktrace pointing to the p.run()
line.
答案 0 :(得分:2)
In addition to the dependencies, you need to add the Google Cloud Dataflow parent pom.
<parent>
<groupId>com.google.cloud.dataflow</groupId>
<artifactId>google-cloud-dataflow-java-sdk-parent</artifactId>
<version>1.6.0</version>
</parent>