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

ASF GitHub Bot logged work on BEAM-10661:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Sep/20 17:00
            Start Date: 06/Sep/20 17:00
    Worklog Time Spent: 10m 
      Work Description: SergiyKolesnikov commented on pull request #12778:
URL: https://github.com/apache/beam/pull/12778#issuecomment-687841877


   R: @amaliujia 
   R: @iemejia


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 479418)
    Time Spent: 20m  (was: 10m)

> 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
>            Priority: P3
>              Labels: documentation, quickstart
>          Time Spent: 20m
>  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)

Reply via email to