I would like to configure the maven sure fire plugin to start the unit testing jvm with the argument for a java agent. The agent jar file is being obtained from maven central so I want maven to automatically figure out the path to the agent's jar file.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<argLine>-javaagent: How to reference an agent jar that is a depedency </argLine>
</configuration>
</plugin>
How can I refer to the path to the agent which is a dependency of the project using maven co-ordinates?