Hi,
I need to use a java instrumentation agent in my JUnit 4 tests to enable
Spring load-time weaving.
So far, I've tried to declare the agent library as an external dependency,
and then refer explicitly to the cache path in the test task:
test {
options.fork(jvmArgs:
["-javaagent:"+System.getProperty('user.home')+"/.gradle/cache/org.springframework/spring-agent/jars/spring-agent-2.5.6.jar"])
}
Is there a better way to get the dependency path in the cache ? for instance
can we get a File object from a resolved external dependency ?
In this case, does it make sense to declare the dependency in the "runtime"
configuration or would it be better to use a custom configuration ?
Or would you advise me to not use a dependency but instead commit the agent
in the project directory in the VCS ?
I'm very new to Gradle and totally unexperienced in Groovy, please share
your experience ! ;)
Thanks,
Romain.
--
View this message in context:
http://www.nabble.com/Use-an-instrumentation-agent-in-a-JUnit-fork-tp25279795p25279795.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email