You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2021/10/15 17:25:04 UTC

[jira] [Commented] (BEAM-10661) Java quickstart using Gradle doesn't work

    [ https://issues.apache.org/jira/browse/BEAM-10661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17429414#comment-17429414 ] 

Beam JIRA Bot commented on BEAM-10661:
--------------------------------------

This issue is assigned but has not received an update in 30 days so it has been labeled "stale-assigned". If you are still working on the issue, please give an update and remove the label. If you are no longer working on the issue, please unassign so someone else may work on it. In 7 days the issue will be automatically unassigned.

> Java quickstart using Gradle doesn't work
> -----------------------------------------
>
>                 Key: BEAM-10661
>                 URL: https://issues.apache.org/jira/browse/BEAM-10661
>             Project: Beam
>          Issue Type: Bug
>          Components: website
>            Reporter: Marcus Truscello
>            Assignee: David Huntsperger
>            Priority: P3
>              Labels: documentation, quickstart, stale-assigned
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> As written, the Java quickstart using Gradle doesn't work.  The issue is that the {{execute}} task created in step 2 makes it so that the {{exec.args}} define is required for every task (including build!), otherwise a NullPointerException is thrown.
>  
> Example output:
>  
> {code:java}
> ~/word-count-beam$ gradle build
> FAILURE: Build failed with an exception.
> * Where:
> Build file '/Users/username/word-count-beam/build.gradle' line: 56
> * What went wrong:
> A problem occurred evaluating root project 'word-count-beam'.
> > java.lang.NullPointerException (no error message)
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
> * Get more help at https://help.gradle.org
> BUILD FAILED in 582ms
> {code}
>  
> Where line 56 of my build.gradle file is the split command in the execute task:
> {code:java}
>     52	task execute (type:JavaExec) {
>     53	        main = System.getProperty("mainClass")
>     54	        classpath = sourceSets.main.runtimeClasspath
>     55	        systemProperties System.getProperties()
>     56	        args System.getProperty("exec.args").split()
>     57	}
> {code}
>  
> Running with an empty exec.args fixes the issue:
> {code:java}
> ~/word-count-beam$ gradle build -Dexec.args=""
> Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
> Use '--warning-mode all' to show the individual deprecation warnings.
> See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings
> BUILD SUCCESSFUL in 782ms
> 4 actionable tasks: 4 up-to-date
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)