Skip to content

Instantly share code, notes, and snippets.

@jdmwood
Last active June 26, 2019 15:26
Show Gist options
  • Save jdmwood/00eeb479c0873b34a9f8c0071fa17a14 to your computer and use it in GitHub Desktop.
Save jdmwood/00eeb479c0873b34a9f8c0071fa17a14 to your computer and use it in GitHub Desktop.
<!-- Make the jacoco agent Jar available to our test Docker containers by copying it to the
docker shared dir. -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<tasks>
<delete dir="${project.build.directory}/jacoco-it" failonerror="false"/>
<mkdir dir="${project.build.directory}/jacoco-it"/>
<!-- The "org.jacoco:org..." property contains the location of the Jar file - powered by the maven-dependency-plugin -->
<copy file="${org.jacoco:org.jacoco.agent:jar:runtime}" tofile="${project.build.directory}/jacoco-it/jacoco-agent.jar"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment