I still don't have a solution to my problem and really need someone who understands the internals of default-plexus-container to help me through the problem. Please see, below, for a high-level description of the problem. What I've found is that what is happening is that I'm getting this exception (root of the matter):
Caused by: java.lang.IllegalArgumentException at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorI mpl.java:63) at java.lang.reflect.Field.set(Field.java:656) at org.codehaus.plexus.component.composition.FieldComponentComposer.assignR equirementToField(FieldComponentComposer.java:137) The "Field" in question here is has a class of org.apache.maven.plugin.jar.AbstractJarMojo, a "name" of jarArchiver, and a "type" of org.codehaus.plexus.archiver.jar.JarArchiver. The line of code that is throwing the IllegalArgumentException is: field.set( component, dependency ); The "component", above is a JarMojo (org.apache.maven.plugin.jar.JarMojo) and the "dependency" is a JarArchiver (org.codehaus.plexus.archiver.jar.JarArchiver). Nothing seems out-of-whack to me. As stated, below, everything works fine when I'm simply building the subdirectory - only when I try to do a reactor build of the parent (which includes this module as a child) do I get this problem. Can anyone point me in a direction that might lead to figuring out what is going wrong? I can't debug into Field.set (part of the reflection api) and I see no reason why java.lang.reflect would be failing - especially since we execute the exact same code in other cases without any problem. Help! Thanks. -- Eric ________________________________ From: Swenson, Eric Sent: Thursday, October 12, 2006 9:18 PM To: 'Maven Developers List' Subject: debugging maven with eclipse Can anyone point me to instructions on how to use eclipse to debug maven? I'm having a problem that no one, so far, has commented on - namely that when I do a reactor build of my project (top-level with sub-projects), I get the error (when doing "mvn install"): [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-jar-plugin:2.1:jar': Unable to find the mojo 'org.apache.maven.plugins:maven-jar-plugin:2.1:jar' in the plugin 'org.apache.maven.plugins:maven-jar-plugin' But when I go to each subdirectory in the project and do a "mvn install", they all complete successfully. Only when I try to run from the parent directory do I have this problem. Running with the -X -e options doesn't give me anything useful. Is there an easy way to produce an eclipse project from the maven2 source tree? Or do I have to manually all all the "src" directories in a new project? I'd like to run under the debugger and step through the execution to pinpoint the issue. Thanks. -- Eric