1

I am using Gradle Tomcat plugin and wanting to set JVM arguments like: "-javaagent:/home/blablabla.jar" to "tomcatRun" tasks. I am using Gradle 2.4. I tried many examples , but failed. What is the right way to do it.

Maladec VampaYa
  • 351
  • 3
  • 21

1 Answers1

1

The embedded Tomcat container runs in the same JVM process as Gradle. You'll have to provide your JVM arguments when starting the Gradle process. You could probably just add it to the environment variable GRADLE_OPTS. What is it your are specifically trying to achieve?

Benjamin Muschko
  • 32,442
  • 9
  • 61
  • 82
  • I am trying to add spring threading agent: "-javaagent:/home/killer/jars/org.springframework.instrument-3.0.5.RELEASE.jar" Also would be nice to add it only for a particular task rather than export a variable to environment. – Maladec VampaYa Jun 08 '15 at 12:28
  • 2
    Not possible at the moment. For that the implementation would need to create a forked process that runs Tomcat. Contributions welcome! – Benjamin Muschko Jun 08 '15 at 15:25