Re: Debugging maven 2 with Netbeans

2007-10-04 Thread Milos Kleint
it should be enough to open ant-run-plugin project sources in the IDE,
place the breakpoints in the test and execute the Debug file action
on the test file.
With the approach you have taken, it's possible to debug maven
internals, however the test is probably executed in yet another VM
which is not in debug mode.

Milos Kleint

On 10/4/07, Paul Sterk [EMAIL PROTECTED] wrote:

 Hi,

 I want to run 'mvn test' and have maven open a jdwp listener so that I
 can debug a plugin unit test.  I thought I found the answer:

 export MAVEN_OPTS=-Xdebug
 -Xrunjdwp:transport=dt_socket,address=9009,server=y,suspend=y

 I then ran 'mvn test' and connected to port 9009 with Netbeans 5.5.1.
 One problem: none of my breakpoints were hit.  Why is that?  More info
 on my env:

 Maven version: 2.0.7
 Java version: 1.6.0_02
 OS name: linux version: 2.6.20-15-generic arch: amd64

 Surely, someone has found a way to debug maven plugins using an IDE.
 Please tell me how.

 Thanks,
 Paul


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Debugging maven 2 with Netbeans

2007-10-04 Thread Tim Kettler

Hi,

the surefire-plugin defaults to fork a new jvm for running the tests. 
You either have to specify the debug options in the argLine/ parameter 
of the plugin configuration or disable the forking.


-Tim

Paul Sterk schrieb:

Hi,

I want to run 'mvn test' and have maven open a jdwp listener so that I
can debug a plugin unit test.  I thought I found the answer:

export MAVEN_OPTS=-Xdebug
-Xrunjdwp:transport=dt_socket,address=9009,server=y,suspend=y

I then ran 'mvn test' and connected to port 9009 with Netbeans 5.5.1.
One problem: none of my breakpoints were hit.  Why is that?  More info
on my env:

Maven version: 2.0.7
Java version: 1.6.0_02
OS name: linux version: 2.6.20-15-generic arch: amd64

Surely, someone has found a way to debug maven plugins using an IDE.
Please tell me how.

Thanks,
Paul




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]