khmarbaise / maven-it-extension

Experimental JUnit Jupiter Extension for writing integration tests for Maven plugins/Maven extensions/Maven Core
https://khmarbaise.github.io/maven-it-extension/
Apache License 2.0
90 stars 31 forks source link

itf-maven-plugin:0.13.0:install fails due to missing class ArtifactIdUtils #445

Closed acanda closed 11 months ago

acanda commented 11 months ago

Describe the bug After updating from 0.12.0 to 0.13.0, itf-maven-plugin:0.13.0:install fails due to missing the class org.eclipse.aether.util.artifact.ArtifactIdUtils.

[INFO] --- itf-maven-plugin:0.13.0:install (default) @ code-analysis-maven-plugin ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10.856 s
[INFO] Finished at: 2023-12-28T12:08:09+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.soebes.itf.jupiter.extension:itf-maven-plugin:0.13.0:install (default) on project code-analysis-maven-plugin: Execution default of goal com.soebes.itf.jupiter.extension:itf-maven-plugin:0.13.0:install failed: A required class was missing while executing com.soebes.itf.jupiter.extension:itf-maven-plugin:0.13.0:install: org/eclipse/aether/util/artifact/ArtifactIdUtils
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>com.soebes.itf.jupiter.extension:itf-maven-plugin:0.13.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/Philip/.m2/repository/com/soebes/itf/jupiter/extension/itf-maven-plugin/0.13.0/itf-maven-plugin-0.13.0.jar
[ERROR] urls[1] = file:/C:/Users/Philip/.m2/repository/com/soebes/itf/jupiter/extension/itf-extension-maven/0.13.0/itf-extension-maven-0.13.0.jar
[ERROR] urls[2] = file:/C:/Users/Philip/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar
[ERROR] urls[3] = file:/C:/Users/Philip/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.27/plexus-interpolation-1.27.jar
[ERROR] urls[4] = file:/C:/Users/Philip/.m2/repository/org/apache/maven/shared/maven-filtering/3.3.1/maven-filtering-3.3.1.jar
[ERROR] urls[5] = file:/C:/Users/Philip/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
[ERROR] urls[6] = file:/C:/Users/Philip/.m2/repository/org/codehaus/plexus/plexus-utils/3.5.1/plexus-utils-3.5.1.jar
[ERROR] urls[7] = file:/C:/Users/Philip/.m2/repository/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar
[ERROR] urls[8] = file:/C:/Users/Philip/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.4.2/maven-shared-utils-3.4.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : org.eclipse.aether.util.artifact.ArtifactIdUtils
[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

To Reproduce Checkout the branch renovate/itf.version of acanda/code-analysis-maven-plugin and run mvn verify.

Current behavior itf-maven-plugin:0.13.0:install fails due to missing class org.eclipse.aether.util.artifact.ArtifactIdUtils.

Expected behavior The tests can be successfully excecuted without itf-maven-plugin:0.13.0:install failing, as they did with 0.12.0.

Log files/Information Log of a failing build: https://github.com/acanda/code-analysis-maven-plugin/actions/runs/7342226647/job/19991171785?pr=241

The used versions

> mvn --version
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: C:\Program Files\Maven\maven-3.8.2
Java version: 17.0.8.1, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-17.0.8.101-hotspot
Default locale: de_CH, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

ITF: 0.13.0

khmarbaise commented 11 months ago

First thank you for your report. I've taken a look into your repository which defines <maven.version>3.9.6</maven.version> so I would suggest to check building with Maven 3.9.X instead of Maven 3.8.X...

acanda commented 11 months ago

Thanks for looking into it. It indeed works with Maven 3.9.6. I've tested with Maven 3.8.8 (the latest 3.8.x release) as well and it also fails with the same error. I've also set <maven.version> in my pom.xml to the respective version I was using and it made no difference. It looks like 0.13.0 now requires at least Maven 3.9.x. You might want to update the requirements you list in the readme.

khmarbaise commented 11 months ago

Thanks for testing that. I will check because that looks like an issue.. I need to investigate the underlying problem..

khmarbaise commented 11 months ago

Unfortunately I have to acknowledge that is bug... really sad...

khmarbaise commented 11 months ago

@acanda If you have time it would be great if you could test 0.13.1 release (maybe the synch to central could take a few hours)...

acanda commented 11 months ago

I can confirm that building acanda/code-analysis-maven-plugin with ITF 0.13.1 works with Maven 3.8.2 and 3.9.6. Thank you very much for all your efforts.

khmarbaise commented 11 months ago

Great to hear that. That was a incomatible change (0.13.0) which was not intended nor documented...