'Maven 3.8.4 target produces exception stacks
Until today I have used Maven 3.8.3. It worked fine.
Now, I have downloaded and unzipped Maven 3.8.4 and adapt the environment variables to this new path. After restarting the console (and the complete system), "mvn -version" worked fine and shows the correct version of maven, but I am not able to build any project anymore.
After calling "mvn clean package" I receive hundreds of exception stacks; the last lines are:
...
constituent[0]: file:/C:/mypath/apache-maven-3.8.4/conf/logging/
constituent[1]: file:/C:/mypath/apache-maven-3.8.4/lib/commons-cli-1.4.jar
constituent[2]: file:/C:/mypath/apache-maven-3.8.4/lib/commons-io-2.6.jar
constituent[3]: file:/C:/mypath/apache-maven-3.8.4/lib/commons-lang3-3.8.1.jar
constituent[4]: file:/C:/mypath/apache-maven-3.8.4/lib/guava-25.1-android.jar
constituent[5]: file:/C:/mypath/apache-maven-3.8.4/lib/guice-4.2.2-no_aop.jar
constituent[6]: file:/C:/mypath/apache-maven-3.8.4/lib/jansi-2.4.0.jar
constituent[7]: file:/C:/mypath/apache-maven-3.8.4/lib/javax.annotation-api-1.2.jar
constituent[8]: file:/C:/mypath/apache-maven-3.8.4/lib/javax.inject-1.jar
constituent[9]: file:/C:/mypath/apache-maven-3.8.4/lib/jcl-over-slf4j-1.7.32.jar
constituent[10]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-artifact-3.8.4.jar
constituent[11]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-builder-support-3.8.4.jar
constituent[12]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-compat-3.8.4.jar
constituent[13]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-core-3.8.4.jar
constituent[14]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-embedder-3.8.4.jar
constituent[15]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-model-3.8.4.jar
constituent[16]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-model-builder-3.8.4.jar
constituent[17]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-plugin-api-3.8.4.jar
constituent[18]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-repository-metadata-3.8.4.jar
constituent[19]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-resolver-api-1.6.3.jar
constituent[20]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-resolver-connector-basic-1.6.3.jar
constituent[21]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-resolver-impl-1.6.3.jar
constituent[22]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-resolver-provider-3.8.4.jar
constituent[23]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-resolver-spi-1.6.3.jar
constituent[24]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-resolver-transport-wagon-1.6.3.jar
constituent[25]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-settings-3.8.4.jar
constituent[26]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-settings-builder-3.8.4.jar
constituent[27]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-shared-utils-3.3.4.jar
constituent[28]: file:/C:/mypath/apache-maven-3.8.4/lib/maven-slf4j-provider-3.8.4.jar
constituent[29]: file:/C:/mypath/apache-maven-3.8.4/lib/org.eclipse.sisu.inject-0.3.5.jar
constituent[30]: file:/C:/mypath/apache-maven-3.8.4/lib/org.eclipse.sisu.plexus-0.3.5.jar
constituent[31]: file:/C:/mypath/apache-maven-3.8.4/lib/plexus-cipher-2.0.jar
constituent[32]: file:/C:/mypath/apache-maven-3.8.4/lib/plexus-component-annotations-2.1.0.jar
constituent[33]: file:/C:/mypath/apache-maven-3.8.4/lib/plexus-interpolation-1.26.jar
constituent[34]: file:/C:/mypath/apache-maven-3.8.4/lib/plexus-sec-dispatcher-2.0.jar
constituent[35]: file:/C:/mypath/apache-maven-3.8.4/lib/plexus-utils-3.3.0.jar
constituent[36]: file:/C:/mypath/apache-maven-3.8.4/lib/slf4j-api-1.7.32.jar
constituent[37]: file:/C:/mypath/apache-maven-3.8.4/lib/wagon-file-3.4.3.jar
constituent[38]: file:/C:/mypath/apache-maven-3.8.4/lib/wagon-http-3.4.3-shaded.jar
constituent[39]: file:/C:/mypath/apache-maven-3.8.4/lib/wagon-provider-api-3.4.3.jar
---------------------------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/aether/util/graph/visitor/PreorderNodeListGenerator
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at com.google.inject.spi.InjectionPoint.getDeclaredMethods(InjectionPoint.java:766)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:683)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:378)
at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:182)
at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:661)
at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:617)
...
at org.apache.maven.cli.MavenCli.container(MavenCli.java:691)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: java.lang.ClassNotFoundException: org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 135 more
The paths to 3.8.3 and 3.8.4 look exactly the same. The lib-directory including the jar-files inside of the maven directories exists in both cases. Can somebody give me any advice what I am doing wrong here?
Advice: I am not using "eclipse" as an IDE here, I try to build the project on cmd.
I am using the following Java:
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_312-b07)
OpenJDK 64-Bit Server VM (Temurin)(build 25.312-b07, mixed mode)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
