Home > Enterprise >  Eclipse - Maven throws Error injecting: org.codehaus.plexus.archiver.jar.JarArchiver java.lang.Excep
Eclipse - Maven throws Error injecting: org.codehaus.plexus.archiver.jar.JarArchiver java.lang.Excep

Time:11-04

I am using Eclipse 2021.03

When issuing maven clean install on my project (from Eclipse, right-click on parent project > Run as > Maven Clean, then same for Maven Install), Maven throws error:

"maven-ear-plugin:2.10:ear (default-ear) @ my-services-ear --- [WARNING] Error injecting: org.codehaus.plexus.archiver.jar.JarArchiver java.lang.ExceptionInInitializerError"

when executing maven-ear-plugin goal.

CodePudding user response:

Updating maven-ear-plugin version from , in my case like below because I use <properties> section for defining versions of dependencies. So, in your case, you might just need to update <version> section of <maven-ear-plugin> dependency.

<maven-ear-plugin.version>2.10</maven-ear-plugin.version>

to

<maven-ear-plugin.version>3.0.2</maven-ear-plugin.version>

resolved the issue for me.

Same issue and fix for IntelliJ.

  • Related