RE: debugging maven with eclipse
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
RE: debugging maven with eclipse
Hi Franz, I'll take a look at your writeup (thanks). However, I am happily debugging right now in the DefaultPlexusContainer code that appears to be the source of my problem. I'll report on my findings if/when I figure it out. Thanks again, though. I will look over your writeup to make sure I didn't miss anything. -- Eric -Original Message- From: Franz Allan Valencia See [mailto:[EMAIL PROTECTED] Sent: Thursday, October 12, 2006 11:40 PM To: Maven Developers List Subject: Re: debugging maven with eclipse Good day to you, Eric, I havve just created (or rather, continued) this short tutorial on debugging maven with eclipse, [1] However, I am a windows user, so my answer is based on windows. I am not sure about the exact steps in linux but more or less, the concept of running in debug mode is the same. Cheers, Franz [1] http://docs.codehaus.org/display/MAVENUSER/Dealing+with+Eclipse-based+ID E On 10/12/06, Swenson, Eric <[EMAIL PROTECTED]> wrote: > > I've managed to create an eclipse project by running "mvn > eclipse:eclipse" in the maven-2.0.4 source tree. And after defining the > M2_REPO classpath variable, I was able to get Eclipse to not show any > errors when building. In setting up for debugging, I use the command > line parameters: > > > > -Dclassworlds.conf=/opt/maven-2.0.4/bin/m2.conf > > -Dmaven.home=/opt/maven-2.0.4 > > > > When I run, I get the error: > > > > java.lang.Exception: classworlds configuration not specified nor found > in the classpath > > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:423) > > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > > > > > > Now, I believe I *am* specifying the classworlds config path correctly > (see above command line parameter). I can't seem to find the source for > classworlds (I can browse the cvs repository and download individual > files from this package, but I can't find a source jar file to > download). > > > > Anyone know what is going on? Anyone know where I can download the > source to classworlds so I can debug into Launcher to see why it doesn't > think it can find a conf file? 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 > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: debugging maven with eclipse
Good day to you, Eric, I havve just created (or rather, continued) this short tutorial on debugging maven with eclipse, [1] However, I am a windows user, so my answer is based on windows. I am not sure about the exact steps in linux but more or less, the concept of running in debug mode is the same. Cheers, Franz [1] http://docs.codehaus.org/display/MAVENUSER/Dealing+with+Eclipse-based+IDE On 10/12/06, Swenson, Eric <[EMAIL PROTECTED]> wrote: I've managed to create an eclipse project by running "mvn eclipse:eclipse" in the maven-2.0.4 source tree. And after defining the M2_REPO classpath variable, I was able to get Eclipse to not show any errors when building. In setting up for debugging, I use the command line parameters: -Dclassworlds.conf=/opt/maven-2.0.4/bin/m2.conf -Dmaven.home=/opt/maven-2.0.4 When I run, I get the error: java.lang.Exception: classworlds configuration not specified nor found in the classpath at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:423) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Now, I believe I *am* specifying the classworlds config path correctly (see above command line parameter). I can't seem to find the source for classworlds (I can browse the cvs repository and download individual files from this package, but I can't find a source jar file to download). Anyone know what is going on? Anyone know where I can download the source to classworlds so I can debug into Launcher to see why it doesn't think it can find a conf file? 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
RE: debugging maven with eclipse
I apologize for the stupidity, I used the command line parameters rather than the vm parameters. I can get past this problem and into MavenCli now. So I'm going to try to debug the problem with the plugin manager. Thanks. -- Eric From: Swenson, Eric Sent: Thursday, October 12, 2006 10:42 PM To: Swenson, Eric; Maven Developers List Subject: RE: debugging maven with eclipse I've managed to create an eclipse project by running "mvn eclipse:eclipse" in the maven-2.0.4 source tree. And after defining the M2_REPO classpath variable, I was able to get Eclipse to not show any errors when building. In setting up for debugging, I use the command line parameters: -Dclassworlds.conf=/opt/maven-2.0.4/bin/m2.conf -Dmaven.home=/opt/maven-2.0.4 When I run, I get the error: java.lang.Exception: classworlds configuration not specified nor found in the classpath at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:423) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Now, I believe I *am* specifying the classworlds config path correctly (see above command line parameter). I can't seem to find the source for classworlds (I can browse the cvs repository and download individual files from this package, but I can't find a source jar file to download). Anyone know what is going on? Anyone know where I can download the source to classworlds so I can debug into Launcher to see why it doesn't think it can find a conf file? 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
RE: debugging maven with eclipse
I've managed to create an eclipse project by running "mvn eclipse:eclipse" in the maven-2.0.4 source tree. And after defining the M2_REPO classpath variable, I was able to get Eclipse to not show any errors when building. In setting up for debugging, I use the command line parameters: -Dclassworlds.conf=/opt/maven-2.0.4/bin/m2.conf -Dmaven.home=/opt/maven-2.0.4 When I run, I get the error: java.lang.Exception: classworlds configuration not specified nor found in the classpath at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:423) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Now, I believe I *am* specifying the classworlds config path correctly (see above command line parameter). I can't seem to find the source for classworlds (I can browse the cvs repository and download individual files from this package, but I can't find a source jar file to download). Anyone know what is going on? Anyone know where I can download the source to classworlds so I can debug into Launcher to see why it doesn't think it can find a conf file? 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
Re: Debugging Maven with Eclipse?
Geoffrey De Smet wrote: I created a "mvnd" script and there is an issue for it. After that it's just a matter of creating a remote debugger in eclipse. Would you mind sharing the issue link with us? -- Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach {Software Engineering, Open Source, Web Applications, Apache Cocoon} web(log): http://www.poetz.cc ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Debugging Maven with Eclipse?
I created a "mvnd" script and there is an issue for it. After that it's just a matter of creating a remote debugger in eclipse. With kind regards, Geoffrey De Smet Jochen Kuhnle wrote: Hi, is there a guide/howto for this? Or even better, does anybody have a working .launch file? Regards, Jochen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Debugging Maven with Eclipse?
Have you found this threads in the archives: http://www.mail-archive.com/users@maven.apache.org/msg31345.html http://www.mail-archive.com/users@maven.apache.org/msg27239.html Hope this helps -Tim Jochen Kuhnle schrieb: Hi, is there a guide/howto for this? Or even better, does anybody have a working .launch file? Regards, Jochen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]