How to run jettyRun with jvm flag to set JRebel javaagent?

(Marcel Overdijk) #1

It is possible to set javaagent in jettyRun task?

I would like to use JRebel in combination with Jetty to auto reload classes…

(Marcel Overdijk) #2

Note that only mentions 3 properties (httpPort, stopPort, stopKey) but mentions more.

But unfortunately I don’t see anything related to providing jvm flags.

(Marcel Overdijk) #3

I used the to workaround this by putting the below in

org.gradle.daemon = true
org.gradle.jvmargs = "-javaagent:/Applications/jrebel/jrebel-5.3.1/jrebel.jar"

I only wonder if I can refer to system properties inside the jvmargs property String. Something like


Any ideas?

(Peter Niederwieser) #4

No you can’t. It’s a plain properties file.

(Marcel Overdijk) #5

Can I set the jvmargs then via build.gradle maybe?

(Peter Niederwieser) #6

Unfortunately, ‘’ is the only option, as the ‘jetty’ plugin executes Jetty in the Gradle JVM.

The ‘jetty’ plugin has a lot of weaknesses, and we plan to replace it with a solution based on the Arquillian Gradle plugin. I encourage you to try that plugin today, and report back how it works for you.

(oscar.bernal) #7

Is the arquillian plugin still what you are aiming at using to replace the jetty plugin? Seems like it hasn’t been maintained for a while and we would like to extend one of the plugins to use the jrebel agent.

(Peter Niederwieser) #8

A decision hasn’t been made. I’d recommend to evaluate the Arquillian, Cargo, and Tomcat plugins, and choose what fits best for your needs.

(oscar.bernal) #9

thanks for the prompt reply! We will evaluate all the plugins and see which one is more suited for what we need. Thanks!