maven-git-versioning-extension icon indicating copy to clipboard operation
maven-git-versioning-extension copied to clipboard

ClassCastException when using this extension this in a multi module project

Open DAGRSAG opened this issue 1 year ago • 3 comments
trafficstars

Hi,

I'm using your extension in a huge multi module project. My Maven version is 3.8.6 (unchanged). I'm updated your extension from 7.1.2 to the newest one (9.7.0). Since that the following error occurs:

[exec] Caused by: java.lang.ClassCastException: class org.codehaus.plexus.util.xml.Xpp3Dom cannot be cast to class org.codehaus.plexus.util.xml.Xpp3Dom (org.codehaus.plexus.util.xml.Xpp3Dom is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @13221655; org.codehaus.plexus.util.xml.Xpp3Dom is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @6d9fb2d1)
     [exec]     at me.qoomon.maven.gitversioning.GitVersioningModelProcessor.lambda$addBuildPlugin$11 (GitVersioningModelProcessor.java:613)

Before the version update everything worked fine

The code changes were added from 9.3.1 to 9.3.2 https://github.com/qoomon/maven-git-versioning-extension/commit/83a015ef0b66dbfc4f0beaddb1b723a321353e0e and related to #171

Best regards Daniel

DAGRSAG avatar Apr 15 '24 08:04 DAGRSAG

Can be related to https://issues.apache.org/jira/browse/MNG-7160

But also with Maven 3.9.5 I still get this CCE in combination with the extension

DAGRSAG avatar Apr 15 '24 08:04 DAGRSAG

@DAGRSAG Could you create a repo with a most simple project setup to recreate this error?

qoomon avatar Apr 15 '24 10:04 qoomon

I will try to create one.

For now I'm using the configuration within the extensions.xml

<classLoadingStrategy>parent-first</classLoadingStrategy>

and this also solves the problem

DAGRSAG avatar Apr 15 '24 13:04 DAGRSAG