Eclipse breakpoints not working in maven groovy project

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Eclipse breakpoints not working in maven groovy project

Bruce Edge
Groovy noob alert. My first groovy attempt.


I can build & debug/run my project from eclipse, but breakpoints are ignored.
If I add a 'stop on main', it stops on the groovy runner main, but not in any of my apps breakpoints.

My sources are in src/main/groovy, and eclipse seems happy with this in that it's not complaining about mismatched package names etc.

Here's the relevant bits of my pom, which I suspect may be related to this problem:

<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.1.5</version>
</dependency>

...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<!-- Bind Groovy Eclipse Compiler -->
<compilerId>groovy-eclipse-compiler</compilerId>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>2.8.0-01</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<!-- <version>1.8.6-01</version> -->
<version>2.1.5-03</version>
</dependency>
</dependencies>
</plugin>

<plugin>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>2.8.0-01</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/groovy</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/groovy</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse breakpoints not working in maven groovy project

Andrew Eisenberg
Do you have the groovy configurator for maven installed in your
Eclipse?  It might be that these projects are not being converted to
maven projects on import (that's what the configurator does).  Do you
see a little 'Gr' overlay on your project icon?

Also, when you are running your app, do you see little check marks on
your breakpoints in groovy code (a check mark means that this
breakpoint has been loaded into the jvm, no check mark means it is
being ignored).

On Tue, Jul 16, 2013 at 10:55 AM, Bruce Edge <[hidden email]> wrote:

> Groovy noob alert. My first groovy attempt.
>
> I followed the setup here:
> http://groovy.codehaus.org/Groovy-Eclipse+compiler+plugin+for+Maven
>
> I can build & debug/run my project from eclipse, but breakpoints are
> ignored.
> If I add a 'stop on main', it stops on the groovy runner main, but not in
> any of my apps breakpoints.
>
> My sources are in src/main/groovy, and eclipse seems happy with this in that
> it's not complaining about mismatched package names etc.
>
> Here's the relevant bits of my pom, which I suspect may be related to this
> problem:
>
> <dependencies>
> <dependency>
> <groupId>org.codehaus.groovy</groupId>
> <artifactId>groovy-all</artifactId>
> <version>2.1.5</version>
> </dependency>
>
> ...
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>3.1</version>
> <configuration>
> <!-- Bind Groovy Eclipse Compiler -->
> <compilerId>groovy-eclipse-compiler</compilerId>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.codehaus.groovy</groupId>
> <artifactId>groovy-eclipse-compiler</artifactId>
> <version>2.8.0-01</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.groovy</groupId>
> <artifactId>groovy-eclipse-batch</artifactId>
> <!-- <version>1.8.6-01</version> -->
> <version>2.1.5-03</version>
> </dependency>
> </dependencies>
> </plugin>
>
> <plugin>
> <groupId>org.codehaus.groovy</groupId>
> <artifactId>groovy-eclipse-compiler</artifactId>
> <version>2.8.0-01</version>
> <extensions>true</extensions>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>build-helper-maven-plugin</artifactId>
> <version>1.5</version>
> <executions>
> <execution>
> <id>add-source</id>
> <phase>generate-sources</phase>
> <goals>
> <goal>add-source</goal>
> </goals>
> <configuration>
> <sources>
> <source>src/main/groovy</source>
> </sources>
> </configuration>
> </execution>
> <execution>
> <id>add-test-source</id>
> <phase>generate-test-sources</phase>
> <goals>
> <goal>add-test-source</goal>
> </goals>
> <configuration>
> <sources>
> <source>src/test/groovy</source>
> </sources>
> </configuration>
> </execution>
> </executions>
> </plugin>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Eclipse breakpoints not working in maven groovy project

Bruce Edge
Yes on the "Gr" project overlay.

As for the breakpoint check marks, no, I don't see anything there other than the standard blue circle for breakpoints. Not sure if this is conclusive as since it runs to completion in a few seconds, any jvm breakpoint status may not be reflected in the GUI. However, that does sound like what's happening.

What's the next step in determining why the jvm is not loading the breakpoints?


On Tue, Jul 16, 2013 at 11:12 AM, Andrew Eisenberg <[hidden email]> wrote:
Do you have the groovy configurator for maven installed in your
Eclipse?  It might be that these projects are not being converted to
maven projects on import (that's what the configurator does).  Do you
see a little 'Gr' overlay on your project icon?

Also, when you are running your app, do you see little check marks on
your breakpoints in groovy code (a check mark means that this
breakpoint has been loaded into the jvm, no check mark means it is
being ignored).

On Tue, Jul 16, 2013 at 10:55 AM, Bruce Edge <[hidden email]> wrote:
> Groovy noob alert. My first groovy attempt.
>
> I followed the setup here:
> http://groovy.codehaus.org/Groovy-Eclipse+compiler+plugin+for+Maven
>
> I can build & debug/run my project from eclipse, but breakpoints are
> ignored.
> If I add a 'stop on main', it stops on the groovy runner main, but not in
> any of my apps breakpoints.
>
> My sources are in src/main/groovy, and eclipse seems happy with this in that
> it's not complaining about mismatched package names etc.
>
> Here's the relevant bits of my pom, which I suspect may be related to this
> problem:
>
> <dependencies>
> <dependency>
> <groupId>org.codehaus.groovy</groupId>
> <artifactId>groovy-all</artifactId>
> <version>2.1.5</version>
> </dependency>
>
> ...
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>3.1</version>
> <configuration>
> <!-- Bind Groovy Eclipse Compiler -->
> <compilerId>groovy-eclipse-compiler</compilerId>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.codehaus.groovy</groupId>
> <artifactId>groovy-eclipse-compiler</artifactId>
> <version>2.8.0-01</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.groovy</groupId>
> <artifactId>groovy-eclipse-batch</artifactId>
> <!-- <version>1.8.6-01</version> -->
> <version>2.1.5-03</version>
> </dependency>
> </dependencies>
> </plugin>
>
> <plugin>
> <groupId>org.codehaus.groovy</groupId>
> <artifactId>groovy-eclipse-compiler</artifactId>
> <version>2.8.0-01</version>
> <extensions>true</extensions>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>build-helper-maven-plugin</artifactId>
> <version>1.5</version>
> <executions>
> <execution>
> <id>add-source</id>
> <phase>generate-sources</phase>
> <goals>
> <goal>add-source</goal>
> </goals>
> <configuration>
> <sources>
> <source>src/main/groovy</source>
> </sources>
> </configuration>
> </execution>
> <execution>
> <id>add-test-source</id>
> <phase>generate-test-sources</phase>
> <goals>
> <goal>add-test-source</goal>
> </goals>
> <configuration>
> <sources>
> <source>src/test/groovy</source>
> </sources>
> </configuration>
> </execution>
> </executions>
> </plugin>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Eclipse breakpoints not working in maven groovy project

Andrew Eisenberg
I see that you just commented on an open bug report
https://jira.codehaus.org/browse/GRECLIPSE-1598

This is something that I have not been able to reproduce.  Try running
as a Java application instead.

On Tue, Jul 16, 2013 at 11:50 AM, Bruce Edge <[hidden email]> wrote:

> Yes on the "Gr" project overlay.
>
> As for the breakpoint check marks, no, I don't see anything there other than
> the standard blue circle for breakpoints. Not sure if this is conclusive as
> since it runs to completion in a few seconds, any jvm breakpoint status may
> not be reflected in the GUI. However, that does sound like what's happening.
>
> What's the next step in determining why the jvm is not loading the
> breakpoints?
>
>
> On Tue, Jul 16, 2013 at 11:12 AM, Andrew Eisenberg <[hidden email]>
> wrote:
>>
>> Do you have the groovy configurator for maven installed in your
>> Eclipse?  It might be that these projects are not being converted to
>> maven projects on import (that's what the configurator does).  Do you
>> see a little 'Gr' overlay on your project icon?
>>
>> Also, when you are running your app, do you see little check marks on
>> your breakpoints in groovy code (a check mark means that this
>> breakpoint has been loaded into the jvm, no check mark means it is
>> being ignored).
>>
>> On Tue, Jul 16, 2013 at 10:55 AM, Bruce Edge <[hidden email]> wrote:
>> > Groovy noob alert. My first groovy attempt.
>> >
>> > I followed the setup here:
>> > http://groovy.codehaus.org/Groovy-Eclipse+compiler+plugin+for+Maven
>> >
>> > I can build & debug/run my project from eclipse, but breakpoints are
>> > ignored.
>> > If I add a 'stop on main', it stops on the groovy runner main, but not
>> > in
>> > any of my apps breakpoints.
>> >
>> > My sources are in src/main/groovy, and eclipse seems happy with this in
>> > that
>> > it's not complaining about mismatched package names etc.
>> >
>> > Here's the relevant bits of my pom, which I suspect may be related to
>> > this
>> > problem:
>> >
>> > <dependencies>
>> > <dependency>
>> > <groupId>org.codehaus.groovy</groupId>
>> > <artifactId>groovy-all</artifactId>
>> > <version>2.1.5</version>
>> > </dependency>
>> >
>> > ...
>> > <plugin>
>> > <groupId>org.apache.maven.plugins</groupId>
>> > <artifactId>maven-compiler-plugin</artifactId>
>> > <version>3.1</version>
>> > <configuration>
>> > <!-- Bind Groovy Eclipse Compiler -->
>> > <compilerId>groovy-eclipse-compiler</compilerId>
>> > </configuration>
>> > <dependencies>
>> > <dependency>
>> > <groupId>org.codehaus.groovy</groupId>
>> > <artifactId>groovy-eclipse-compiler</artifactId>
>> > <version>2.8.0-01</version>
>> > </dependency>
>> > <dependency>
>> > <groupId>org.codehaus.groovy</groupId>
>> > <artifactId>groovy-eclipse-batch</artifactId>
>> > <!-- <version>1.8.6-01</version> -->
>> > <version>2.1.5-03</version>
>> > </dependency>
>> > </dependencies>
>> > </plugin>
>> >
>> > <plugin>
>> > <groupId>org.codehaus.groovy</groupId>
>> > <artifactId>groovy-eclipse-compiler</artifactId>
>> > <version>2.8.0-01</version>
>> > <extensions>true</extensions>
>> > </plugin>
>> > <plugin>
>> > <groupId>org.codehaus.mojo</groupId>
>> > <artifactId>build-helper-maven-plugin</artifactId>
>> > <version>1.5</version>
>> > <executions>
>> > <execution>
>> > <id>add-source</id>
>> > <phase>generate-sources</phase>
>> > <goals>
>> > <goal>add-source</goal>
>> > </goals>
>> > <configuration>
>> > <sources>
>> > <source>src/main/groovy</source>
>> > </sources>
>> > </configuration>
>> > </execution>
>> > <execution>
>> > <id>add-test-source</id>
>> > <phase>generate-test-sources</phase>
>> > <goals>
>> > <goal>add-test-source</goal>
>> > </goals>
>> > <configuration>
>> > <sources>
>> > <source>src/test/groovy</source>
>> > </sources>
>> > </configuration>
>> > </execution>
>> > </executions>
>> > </plugin>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email