[
https://issues.apache.org/jira/browse/BEAM-12770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17401175#comment-17401175
]
Luke Cwik commented on BEAM-12770:
----------------------------------
We can see that the profiles aren't ported over when using the gradle 6.8.3
init command.
It produced:
{noformat}
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
id 'java'
id 'maven-publish'
}
repositories {
mavenLocal()
maven {
url =
uri('https://repository.apache.org/content/repositories/snapshots/')
}
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
}
dependencies {
implementation 'org.apache.beam:beam-sdks-java-core:2.31.0'
implementation
'org.apache.beam:beam-sdks-java-io-google-cloud-platform:2.31.0'
implementation 'com.google.api-client:google-api-client:1.31.1'
implementation
'com.google.apis:google-api-services-bigquery:v2-rev20210410-1.31.0'
implementation 'com.google.http-client:google-http-client:1.39.2'
implementation
'com.google.apis:google-api-services-pubsub:v1-rev20210322-1.31.0'
implementation 'joda-time:joda-time:2.10.10'
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'org.hamcrest:hamcrest-core:2.1'
implementation 'org.hamcrest:hamcrest-library:2.1'
implementation 'junit:junit:4.13.1'
runtimeOnly 'org.slf4j:slf4j-jdk14:1.7.30'
runtimeOnly 'org.apache.beam:beam-runners-direct-java:2.31.0'
runtimeOnly 'org.apache.beam:beam-runners-portability-java:2.31.0'
testImplementation 'org.mockito:mockito-core:3.7.7'
}
group = 'org.example'
version = '0.1'
description = 'word-count-beam'
java.sourceCompatibility = JavaVersion.VERSION_1_8
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}
{noformat}
> Java Quickstart: Gradle/Dataflow runner command is incorrect
> ------------------------------------------------------------
>
> Key: BEAM-12770
> URL: https://issues.apache.org/jira/browse/BEAM-12770
> Project: Beam
> Issue Type: Bug
> Components: website
> Reporter: David Huntsperger
> Priority: P2
>
> The Gradle command for running the WordCount example on Dataflow does not
> actually use the Dataflow Runner. See:
> https://beam.apache.org/get-started/quickstart-java/#run-wordcount-using-gradle
> But if you add `--runner=DataflowRunner` to -Dexec.args, you get an error:
> `Exception in thread "main" java.lang.IllegalArgumentException: Unknown
> 'runner' specified 'DataflowRunner', supported pipeline runners
> [DirectRunner, PortableRunner, TestUniversalRunner]`
> Per [~lcwik]: "It is likely that the profiles in Maven aren't being converted
> over correctly to Gradle. (e.g. the additional stuff that -Pdataflow-runner
> is doing such as adding the DataflowRunner dep to the runtime classpath)"
> So it looks like we actually need to finish implementing the [Maven-to-Gradle
> conversion|https://docs.gradle.org/current/userguide/migrating_from_maven.html].
--
This message was sent by Atlassian Jira
(v8.3.4#803005)