camunda-community-hub / camunda-process-test-coverage

Community Extension Helper library to visualize which parts of a BPMN process have been covered by a process test.
https://camunda-community-hub.github.io/camunda-process-test-coverage/
Apache License 2.0
76 stars 44 forks source link

Test coverage report aggregator maven plugin does not work with maven 3.9.x #411

Closed tim-boerner closed 11 months ago

tim-boerner commented 1 year ago

I am using the test coverage report aggregator maven plugin in our project and it was working fine with maven 3.6.1 and 3.8.8. Now I have updated to maven 3.9.5 and the aggregate goal fails with following error:

[ERROR] Failed to execute goal org.camunda.community.process_test_coverage:camunda-process-test-coverage-report-aggregator-maven-plugin:2.3.1:aggregate (default-cli) on project wcms: Execution default-cli of goal org.camunda.community.process_test_coverage:camunda-process-test-coverage-report-aggregator-maven-plugin:2.3.1:aggregate failed: A required class was missing while executing org.camunda.community.process_test_coverage:camunda-process-test-coverage-report-aggregator-maven-plugin:2.3.1:aggregate: org/codehaus/plexus/util/FileUtils [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.camunda.community.process_test_coverage:camunda-process-test-coverage-report-aggregator-maven-plugin:2.3.1 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/ ... /.m2/repository/org/camunda/community/process_test_coverage/camunda-process-test-coverage-report-aggregator-maven-plugin/2.3.1/camunda-process-test-coverage-report-aggregator-maven-plugin-2.3.1.jar [ERROR] urls[1] = file:/ ... /.m2/repository/org/camunda/community/process_test_coverage/camunda-process-test-coverage-report-generator/2.3.1/camunda-process-test-coverage-report-generator-2.3.1.jar [ERROR] urls[2] = file:/ ... /.m2/repository/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar [ERROR] urls[3] = file:/ ... /.m2/repository/org/camunda/community/process_test_coverage/camunda-process-test-coverage-core/2.3.1/camunda-process-test-coverage-core-2.3.1.jar [ERROR] urls[4] = file:/ ... /.m2/repository/com/google/code/gson/gson/2.9.1/gson-2.9.1.jar [ERROR] urls[5] = file:/ ... /.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.1.0/maven-reporting-api-3.1.0.jar [ERROR] urls[6] = file:/ ... /.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.11.1/doxia-sink-api-1.11.1.jar [ERROR] urls[7] = file:/ ... /.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.11.1/doxia-logging-api-1.11.1.jar [ERROR] urls[8] = file:/ ... /.m2/repository/io/github/microutils/kotlin-logging-jvm/3.0.0/kotlin-logging-jvm-3.0.0.jar [ERROR] urls[9] = file:/ ... /.m2/repository/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.21/kotlin-stdlib-common-1.6.21.jar [ERROR] urls[10] = file:/ ... /.m2/repository/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.6.21/kotlin-stdlib-jdk8-1.6.21.jar [ERROR] urls[11] = file:/ ... /.m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.6.21/kotlin-stdlib-1.6.21.jar [ERROR] urls[12] = file:/ ... /.m2/repository/org/jetbrains/annotations/13.0/annotations-13.0.jar [ERROR] urls[13] = file:/ ... /.m2/repository/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.6.21/kotlin-stdlib-jdk7-1.6.21.jar [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] [ERROR] [ERROR] ----------------------------------------------------- [ERROR] : org.codehaus.plexus.util.FileUtils [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

ingorichtsmeier commented 1 year ago

Hi @tim-boerner,

I recently had the same effect on another project. It turns out that a newer maven version brings in other versions for plugin dependencies.

After fixing all plugins by providing a dedicated version, my build was successful again. As you have all maven versions at hand, could you please check the versions of the plugins and provide more details about the version changes?

The version numbers are printed in the output.

tim-boerner commented 1 year ago

I updated the plugin versions of compiler, surefire and failsafe plugin but i still get this error

tim-boerner commented 1 year ago

I think here is the reason: https://cwiki.apache.org/confluence/display/MAVEN/Notes+For+Maven+3.9.x+Plugin+Developers

The org.codehaus.plexus:plexus-utils artifact is not anymore "auto injected" (auto provided) to plugins classpath

rohwerj commented 11 months ago

@tim-boerner You're right. With Maven 3.9.0 this behavior was changed. Currently looking at the best way to fix this. And also looking at the best practices from site you mentioned.

AleksaMCode commented 5 months ago

I had the same problem with the 3.9.7 version.

rohwerj commented 5 months ago

@AleksaMCode But that problem is now solved with the most current version correct?

AleksaMCode commented 1 month ago

@rohwerj I'm not sure, perhaps. I've solved my issue by downgrading to 3.8.8.