79742941

Date: 2025-08-22 03:41:10
Score: 1.5
Natty:
Report link

The reason you don’t see the extra artifacts in a regular mvn dependency:tree is because the MUnit Maven plugin downloads additional test-only dependencies dynamically during the code coverage phase, not as part of your project’s declared pom.xml dependencies. The standard dependency:tree goal only resolves dependencies from the project’s dependency graph, so it won’t include those.

Options to capture them:

  1. Run with verbose dependency plugin on the test scope
mvn dependency:tree -Dscope=test -Dverbose

This will at least show all test-scoped dependencies that Maven resolves from your POM.

  1. List resolved artifacts for a specific phase
    Use:
mvn dependency:list -DincludeScope=test -DoutputFile=deps.txt

Then run the plugin phase that triggers coverage (munit:coverage-report) in the same build. This way you can compare which artifacts are pulled in.

  1. Use dependency:go-offline
mvn dependency:go-offline -DincludeScope=test

This forces Maven to download everything needed (including test/coverage). Then inspect the local repository folder (~/.m2/repository) to see what was actually pulled in by the MUnit plugin.

  1. Enable debug logging when running coverage
mvn -X test
mvn -X munit:coverage-report

With -X, Maven logs every artifact resolution. You’ll be able to see which additional dependencies the plugin downloads specifically for coverage.


Key Point:
Those extra jars are not “normal” dependencies of your project—they are plugin-managed artifacts that the MUnit Maven plugin itself pulls in. So the only way to see them is either with -X debug logging during plugin execution, or by looking in the local Maven repo after running coverage.

If you want a consolidated dependency tree for test execution including MUnit coverage, run the build with:

mvn clean test munit:coverage-report -X

and parse the “Downloading from …” / “Resolved …” sections in the logs.


Would you like me to write a ready-to-run shell script that extracts just the resolved test dependencies (including MUnit coverage) from the Maven debug output?

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Windra Nazarudin Azhar