For my own understanding, would this work? gradle -Ptest.jvmArgs='-Dfoo=bar'
There's no easy way to translate system properties into DSL properties, but -P seems like a straightforward way to access exactly what you want. On Tue, Mar 20, 2012 at 11:51 AM, Dan Durkin <[email protected]>wrote: > I was trying to pass a -D arg to tests like > > gradle -Dfoo=bar test > > which didn't work, as the forked jvm running the tests didn't see this > jvmArg. > > I added the following to build.gradle > > test{ > jvmArgs '-Dfoo=bar' > } > > This works and the forked jvm is passed the jvmArgs. > > Question: Can I do this via the command line any way? > > I tried: > > gradle -Dtest.jvmArgs='-Dfoo=bar' > gradle -Dtest.jvmArgs.foo=bar > > Thanks for any pointers. > > Dan > > > ------------------------------**------------------------------**--------- > To unsubscribe from this list, please visit: > > > http://xircles.codehaus.org/**manage_email<http://xircles.codehaus.org/manage_email> > > >
