It shouldn't be.  I would expect that this line of code:

args group

would only be executed if group was passed on command line, in which case it
is not null.  I changed the code to the following but the result is exactly
the same:

group = hasProperty('group') ? group : 'nosuchgroup'

task listTests(type:JavaExec){
    main = "util.TestGroupScanner"
    classpath = sourceSets.util.runtimeClasspath
    args group
}

I get NullPoniterException on line 21 and that's:

    args group


Lidia



Robert Fischer wrote
> 
> Is "group" null?
> 
> ~~ Robert.
> 


--
View this message in context: 
http://gradle.1045684.n5.nabble.com/Passing-argument-from-command-line-to-java-code-tp5709919p5709924.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to