Maven is deploying instrumented jars

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

A Maven project with clover-maven-plugin configured with the clover:setup goal.

When "mvn deploy" command is used, Maven deploys a JAR which contains classes instrument by Clover.

 

Cause

The clover:setup goal performs instrumentation in the main life cycle build. This is normal behavior.

 

Resolution

You can use:

  • "clover:instrument" goal, which forks a parallel build life cycle and creates a second set of artifacts with "-clover" suffix; thanks to this non-instrumented and instrumented code is separated; however artifacts having custom classifiers may not be installed correctly (see CLOV-1668)
  • "clover:instrument-test" goal, which forks a parallel life cycle, but runs it till the "test" phase; thus instrumented artifacts are not installed
  • "clover:setup" goal configured in a profile and execute two separate builds (for example "mvn clean install -Pwith.clover" and "mvn clean deploy")

 

Last modified on Dec 8, 2015

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.