Thoughts Electrique

Adding custom system properties to Gradles jettyRun

I recently had to specify some custom JVM parameters (like -Dmyapp.home=/home/foo) to Gradles jettyRun task. Thanks to Gradles task API this is easily accomplished. So if anyone is looking for a solution:

jettyRun.doFirst {
System.setProperty(“my.system.property”,”value”)
}

Thats it! I am really liking Gradle so far. I may finally step away from Ant.

Tags: , , ,

Leave a Reply