Extend classpath, additional system properties


(rupert THURNER) #1

we have a framework which is included in all java programs run by adding a shell variable to the classpath, and a shell variable for the system properties: java -cp %FRAMEWORKCP% %FRAMWORKJAVAPROPERTIES% …

framworkproperties includes security settings which must be there on start of the jvm, like -Djava.security.properties .

what would be the best way to include such settings into calls to gradle?


(rupert THURNER) #2

i should have added: how would one add these to unit tests as well?


(Luke Daley) #3

So you need to configure the Gradle process itself? Or something that it is running?


(rupert THURNER) #4

yes, a gradle plugin is compiled, and unit tested with gradle. one method needs to set security parameters to do x509 authentication, i.e. a couple of jar files into the class path, and system parameters.


(Luke Daley) #5

I don’t think you need these for the Gradle process. You need them for the test process.

You can configure the system properties for the test task.

http://www.gradle.org/docs/current/dsl/org.gradle.api.tasks.testing.Test.html