Hi all,

can anybody tell me the difference between having a
/build/extensions/extension element and a /build/plugins/plugin/extensions
in the POM ?

I have a plugin with a custom packaging, and if I put that plugin into the
extensions list, I'm getting weird errors in unrelated modules like:

Caused by: java.lang.IllegalArgumentException: Can not set
org.codehaus.plexus.archiver.jar.JarArchiver field
org.apache.maven.plugin.jar.AbstractJarMojo.jarAr
hiver to org.codehaus.plexus.archiver.jar.JarArchiver
       at
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
UnsafeFieldAccessorImpl.java:146)
       at
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(
UnsafeFieldAccessorImpl.java:150)
       at sun.reflect.UnsafeObjectFieldAccessorImpl.set(
UnsafeObjectFieldAccessorImpl.java:63)
       at java.lang.reflect.Field.set(Field.java:656)
       at
org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField
(FieldComponentComposer.java:137)
       ... 29 more

Setting the extensions-element on the plugin eliminates this.

In both cases, if I build only one project with this packaging, everything
works just fine - I'm guessing that conflicting versions or classloaders are
the problem...

Tom

Reply via email to