Quantcast

groovy + maven

classic Classic list List threaded Threaded
52 messages Options
123
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

groovy + maven

Travis Schneeberger
Guys,

First off, thanks a bunch for all your work & groovy 1.8 and the groovy-eclipse integration!  Getting the support for groovy 1.8 into eclipse has really helped us evaluate groovy 1.8.  Great work!  on to my question....

I've noticed that there hasn't been any recent activity on the gmaven plugin.  Is this project still maintained at all?  Will it be updated for groovy 1.8?  I've been able to compile groovy 1.8 classes with gmaven as it is right now (by swapping the version of groovy) but I'm not sure if this is a good idea.  Any issues with this I should be aware of?

I'm also aware that the groovy-eclipse-compiler is another way to compile groovy code with maven.  Any idea when this will be stable and released?  I tried this briefly and faced some compilation errors when attempting to use it.  This method of compilation would be great to avoid those pesky stub errors.

Thanks in advance

~Travis




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Johann Burkard
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 05/09/2011 08:18 PM, Travis Schneeberger wrote:
> I've been able to compile groovy 1.8 classes with
> gmaven as it is right now (by swapping the version of groovy) but I'm
> not sure if this is a good idea.  Any issues with this I should be aware of?

I'd be interested in your Maven setup. I've been trying to compile
agains Groovy 1.8 but couldn't with GMaven 1.3.
- --
Regards,

Johann Burkard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3IMHsACgkQgOXEH1Six2ECPwCgoYSiDCHT8roLgIO7Tji+KOin
RmcAoJFkNQ3omebMxqntDGc2SIWVqxC7
=50tg
-----END PGP SIGNATURE-----

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

    http://xircles.codehaus.org/manage_email

0x54A2C761.asc (1K) Download Attachment
0x54A2C761.asc.sig (100 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Travis Schneeberger
Keep in mind I have not done a lot of testing with this so far....  Everything compiles and appears to work.


    <groovy.version>1.8.0</groovy.version>
...         


 <!-- should switch to the offical groovy-eclipse-compiler at some point
        <plugin>
          <groupId>org.codehaus.gmaven</groupId>
          <artifactId>gmaven-plugin</artifactId>
          <version>1.3</version>
          <configuration>
            <providerSelection>1.7</providerSelection>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.codehaus.gmaven.runtime</groupId>
              <artifactId>gmaven-runtime-1.7</artifactId>
              <version>1.3</version>
              <exclusions>
                <exclusion>
                  <groupId>org.codehaus.groovy</groupId>
                  <artifactId>groovy-all</artifactId>
                </exclusion>
              </exclusions>
            </dependency>
            <dependency>
              <groupId>org.codehaus.groovy</groupId>
              <artifactId>groovy-all</artifactId>
              <version>${groovy.version}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <goals>
                <goal>generateStubs</goal>
                <goal>compile</goal>
                <!-- test stubs aren't needed now since we are not creating
                     groovy test code for reference in java test code-->
                <!--<goal>generateTestStubs</goal>-->
                <goal>testCompile</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

On Mon, May 9, 2011 at 2:20 PM, Johann Burkard <[hidden email]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 05/09/2011 08:18 PM, Travis Schneeberger wrote:
> I've been able to compile groovy 1.8 classes with
> gmaven as it is right now (by swapping the version of groovy) but I'm
> not sure if this is a good idea.  Any issues with this I should be aware of?

I'd be interested in your Maven setup. I've been trying to compile
agains Groovy 1.8 but couldn't with GMaven 1.3.
- --
Regards,

Johann Burkard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3IMHsACgkQgOXEH1Six2ECPwCgoYSiDCHT8roLgIO7Tji+KOin
RmcAoJFkNQ3omebMxqntDGc2SIWVqxC7
=50tg
-----END PGP SIGNATURE-----

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

   http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Johann Burkard
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 05/09/2011 08:27 PM, Travis Schneeberger wrote:
>             <dependency>

thanks, that seems to work -- somehow.

I got one error when compiling a Groovy class and several classpath
problems along with it.

[ERROR]
/home/johann/workspace/media.io/src/test/java/media/picocontainer/MediaWebappComposerTest.java:[20,-1]
cannot access com.eaio.concurrent.DynamicBlockingQueue
bad class file:
/home/johann/workspace/media.io/target/classes/com/eaio/concurrent/DynamicBlockingQueue.class
undeclared type variable: E

DynamicBlockingQueue looks like this:

class DynamicBlockingQueue {

    @Delegate
    BlockingQueue queue

    ThreadPoolExecutor executor

    DynamicBlockingQueue(BlockingQueue queue = null) {
        this.queue = queue
    }

    boolean offer(def e) {
        !executor || executor.poolSize == executor.maximumPoolSize ?
queue.offer(e) : false
    }

}

And the classpath errors look like this:

[ERROR]
/home/johann/workspace/media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[12,32]
cannot find symbol
symbol: variable Parameterized
@org.junit.runner.RunWith(value=Parameterized) public class
DownloadServletTest

JUnit is on the classpath.

Any ideas?
- --
Regards,

Johann Burkard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3INroACgkQgOXEH1Six2GgRgCgqam2gIJ+dIS7xQYZ343NuBXF
lQoAnjhhK+TiqvqmoJeC+4Q/QMxj9PUp
=hJ1a
-----END PGP SIGNATURE-----

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

    http://xircles.codehaus.org/manage_email

0x54A2C761.asc (1K) Download Attachment
0x54A2C761.asc.sig (100 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Travis Schneeberger
for the junit error change the code to the following:

[ERROR]
/home/johann/workspace/<a href="http://media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[12,32]" target="_blank">media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[12,32]
cannot find symbol
symbol: variable Parameterized
@org.junit.runner.RunWith(value=Parameterized.class) public class
DownloadServletTest

Groovy (or the stub compiler?) has issues w/ class tokens in annotations.  I believe there is an open jira for this issue.



On Mon, May 9, 2011 at 2:47 PM, Johann Burkard <[hidden email]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 05/09/2011 08:27 PM, Travis Schneeberger wrote:
>             <dependency>

thanks, that seems to work -- somehow.

I got one error when compiling a Groovy class and several classpath
problems along with it.

[ERROR]
/home/johann/workspace/<a href="http://media.io/src/test/java/media/picocontainer/MediaWebappComposerTest.java:[20,-1]" target="_blank">media.io/src/test/java/media/picocontainer/MediaWebappComposerTest.java:[20,-1]
cannot access com.eaio.concurrent.DynamicBlockingQueue
bad class file:
/home/johann/workspace/media.io/target/classes/com/eaio/concurrent/DynamicBlockingQueue.class
undeclared type variable: E

DynamicBlockingQueue looks like this:

class DynamicBlockingQueue {

   @Delegate
   BlockingQueue queue

   ThreadPoolExecutor executor

   DynamicBlockingQueue(BlockingQueue queue = null) {
       this.queue = queue
   }

   boolean offer(def e) {
       !executor || executor.poolSize == executor.maximumPoolSize ?
queue.offer(e) : false
   }

}

And the classpath errors look like this:

[ERROR]
/home/johann/workspace/<a href="http://media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[12,32]" target="_blank">media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[12,32]
cannot find symbol
symbol: variable Parameterized
@org.junit.runner.RunWith(value=Parameterized) public class
DownloadServletTest

JUnit is on the classpath.

Any ideas?
- --
Regards,

Johann Burkard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3INroACgkQgOXEH1Six2GgRgCgqam2gIJ+dIS7xQYZ343NuBXF
lQoAnjhhK+TiqvqmoJeC+4Q/QMxj9PUp
=hJ1a
-----END PGP SIGNATURE-----

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

   http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Travis Schneeberger
notice the value=Parameterized.class versus value=Parameterized

see http://jira.codehaus.org/browse/GROOVY-4354



On Mon, May 9, 2011 at 3:26 PM, Travis Schneeberger <[hidden email]> wrote:
for the junit error change the code to the following:


[ERROR]
/home/johann/workspace/media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[12,32]
cannot find symbol
symbol: variable Parameterized
@org.junit.runner.RunWith(value=Parameterized.class) public class
DownloadServletTest

Groovy (or the stub compiler?) has issues w/ class tokens in annotations.  I believe there is an open jira for this issue.



On Mon, May 9, 2011 at 2:47 PM, Johann Burkard <[hidden email]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 05/09/2011 08:27 PM, Travis Schneeberger wrote:
>             <dependency>

thanks, that seems to work -- somehow.

I got one error when compiling a Groovy class and several classpath
problems along with it.

[ERROR]
/home/johann/workspace/media.io/src/test/java/media/picocontainer/MediaWebappComposerTest.java:[20,-1]
cannot access com.eaio.concurrent.DynamicBlockingQueue
bad class file:
/home/johann/workspace/media.io/target/classes/com/eaio/concurrent/DynamicBlockingQueue.class
undeclared type variable: E

DynamicBlockingQueue looks like this:

class DynamicBlockingQueue {

   @Delegate
   BlockingQueue queue

   ThreadPoolExecutor executor

   DynamicBlockingQueue(BlockingQueue queue = null) {
       this.queue = queue
   }

   boolean offer(def e) {
       !executor || executor.poolSize == executor.maximumPoolSize ?
queue.offer(e) : false
   }

}

And the classpath errors look like this:

[ERROR]
/home/johann/workspace/media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[12,32]
cannot find symbol
symbol: variable Parameterized
@org.junit.runner.RunWith(value=Parameterized) public class
DownloadServletTest

JUnit is on the classpath.

Any ideas?
- --
Regards,

Johann Burkard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3INroACgkQgOXEH1Six2GgRgCgqam2gIJ+dIS7xQYZ343NuBXF
lQoAnjhhK+TiqvqmoJeC+4Q/QMxj9PUp
=hJ1a
-----END PGP SIGNATURE-----

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

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Andrew Eisenberg
In reply to this post by Travis Schneeberger
I can speak a little about the groovy-eclipse-compiler is currently
using Groovy 1.7.5.  I haven't updated it in a while since I'm not
really sure how much this is being used, but since I know that at
least some people would like to use it, I can update it for 1.8 and
1.7.10.

You mentioned that you had some compilation errors with it.  Do you
remember what they were?

On Mon, May 9, 2011 at 11:18 AM, Travis Schneeberger
<[hidden email]> wrote:

> Guys,
> First off, thanks a bunch for all your work & groovy 1.8 and the
> groovy-eclipse integration!  Getting the support for groovy 1.8 into eclipse
> has really helped us evaluate groovy 1.8.  Great work!  on to my
> question....
>
> I've noticed that there hasn't been any recent activity on the gmaven
> plugin.  Is this project still maintained at all?  Will it be updated for
> groovy 1.8?  I've been able to compile groovy 1.8 classes with gmaven as it
> is right now (by swapping the version of groovy) but I'm not sure if this is
> a good idea.  Any issues with this I should be aware of?
>
> I'm also aware that the groovy-eclipse-compiler is another way to compile
> groovy code with maven.  Any idea when this will be stable and released?  I
> tried this briefly and faced some compilation errors when attempting to use
> it.  This method of compilation would be great to avoid those pesky stub
> errors.
>
> Thanks in advance
> ~Travis
>
>
>
>
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Johann Burkard
In reply to this post by Travis Schneeberger
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,,

On 05/09/2011 09:45 PM, Travis Schneeberger wrote:
> notice the value=Parameterized*.class* versus value=Parameterized
>
> see http://jira.codehaus.org/browse/GROOVY-4354

thanks Travis, I'll try that.

> /home/johann/workspace/media.io/src/test/java/media/picocontainer/MediaWebappComposerTest.java:[20,-1]
> <http://media.io/src/test/java/media/picocontainer/MediaWebappComposerTest.java:%5B20,-1%5D>
> cannot access com.eaio.concurrent.DynamicBlockingQueue
> bad class file:
> /home/johann/workspace/media.io/target/classes/com/eaio/concurrent/DynamicBlockingQueue.class
> <http://media.io/target/classes/com/eaio/concurrent/DynamicBlockingQueue.class>
> undeclared type variable: E

Any ideas what this could be?
- --
Regards,

Johann Burkard

<http://johannburkard.de>
<http://twitter.com/johannburkard>
<mailto:[hidden email]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3ISIoACgkQgOXEH1Six2F+kACfaqa7jr/zI1rPTWeoUDAV+cNs
WREAnRlnhZnqKtyZaR4BxeRMbpXME1uK
=MX3x
-----END PGP SIGNATURE-----

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

    http://xircles.codehaus.org/manage_email

0x54A2C761.asc (1K) Download Attachment
0x54A2C761.asc.sig (100 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Travis Schneeberger
In reply to this post by Andrew Eisenberg
Yes, please update it for groovy 1.8.  I think it would be a great alternative to gmaven.  Especially since bug with the gmaven stubs are fairly common.  BTW.  What is the recommended/official integration for groovy & maven?  gmaven or groovy-eclipse-compiler?

The errors I was getting with groovy-eclipse compiler had to do with junit annotations.  I didn't look into the problems a lot but here is an issue I was getting:

Groovy:unable to resolve class org.junit.Assert
----------
336. ERROR in C:\IdeaProjects\kuali-rice-trunk\trunk\core\api\src\test\groovy\org\kuali\rice\core\api\criteria
\SimplePredicateTest.groovy (at line 41)
        @Test
         ^
Groovy:class org.junit.Test is not an annotation in @org.junit.Test
----------
337. ERROR in C:\IdeaProjects\kuali-rice-trunk\trunk\core\api\src\test\groovy\org\kuali\rice\core\api\criteria
\SimplePredicateTest.groovy (at line 53)
        @Test
         ^

I would be willing to help you debug it more if you want.

~Travis

On Mon, May 9, 2011 at 4:01 PM, Andrew Eisenberg <[hidden email]> wrote:
I can speak a little about the groovy-eclipse-compiler is currently
using Groovy 1.7.5.  I haven't updated it in a while since I'm not
really sure how much this is being used, but since I know that at
least some people would like to use it, I can update it for 1.8 and
1.7.10.

You mentioned that you had some compilation errors with it.  Do you
remember what they were?

On Mon, May 9, 2011 at 11:18 AM, Travis Schneeberger
<[hidden email]> wrote:
> Guys,
> First off, thanks a bunch for all your work & groovy 1.8 and the
> groovy-eclipse integration!  Getting the support for groovy 1.8 into eclipse
> has really helped us evaluate groovy 1.8.  Great work!  on to my
> question....
>
> I've noticed that there hasn't been any recent activity on the gmaven
> plugin.  Is this project still maintained at all?  Will it be updated for
> groovy 1.8?  I've been able to compile groovy 1.8 classes with gmaven as it
> is right now (by swapping the version of groovy) but I'm not sure if this is
> a good idea.  Any issues with this I should be aware of?
>
> I'm also aware that the groovy-eclipse-compiler is another way to compile
> groovy code with maven.  Any idea when this will be stable and released?  I
> tried this briefly and faced some compilation errors when attempting to use
> it.  This method of compilation would be great to avoid those pesky stub
> errors.
>
> Thanks in advance
> ~Travis
>
>
>
>
>

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

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Travis Schneeberger
In reply to this post by Johann Burkard
I've seen those "bad class file" errors before when attempting to reference a class compiled with a <target>1.6</target> in a class set to compile at <target>1.5</target>

To put it another way, make sure your java compilation target version number is correct.

ex:

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <source>1.6</source>
            <target>1.6</target>
          </configuration>
        </plugin>

On Mon, May 9, 2011 at 4:03 PM, Johann Burkard <[hidden email]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,,

On 05/09/2011 09:45 PM, Travis Schneeberger wrote:
> notice the value=Parameterized*.class* versus value=Parameterized
>
> see http://jira.codehaus.org/browse/GROOVY-4354

thanks Travis, I'll try that.

> /home/johann/workspace/<a href="http://media.io/src/test/java/media/picocontainer/MediaWebappComposerTest.java:[20,-1]" target="_blank">media.io/src/test/java/media/picocontainer/MediaWebappComposerTest.java:[20,-1]
> <http://media.io/src/test/java/media/picocontainer/MediaWebappComposerTest.java:%5B20,-1%5D>
> cannot access com.eaio.concurrent.DynamicBlockingQueue
> bad class file:
> /home/johann/workspace/media.io/target/classes/com/eaio/concurrent/DynamicBlockingQueue.class
> <http://media.io/target/classes/com/eaio/concurrent/DynamicBlockingQueue.class>
> undeclared type variable: E

Any ideas what this could be?
- --
Regards,

Johann Burkard

<http://johannburkard.de>
<http://twitter.com/johannburkard>
<mailto:[hidden email]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3ISIoACgkQgOXEH1Six2F+kACfaqa7jr/zI1rPTWeoUDAV+cNs
WREAnRlnhZnqKtyZaR4BxeRMbpXME1uK
=MX3x
-----END PGP SIGNATURE-----

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

   http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Johann Burkard
In reply to this post by Travis Schneeberger
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 05/09/2011 09:45 PM, Travis Schneeberger wrote:
> notice the value=Parameterized*.class* versus value=Parameterized

I just tried that. Still doesn't work:

/home/johann/workspace/media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[12,32]
cannot find symbol
symbol: class Parameterized
@org.junit.runner.RunWith(value=Parameterized.class) public class
DownloadServletTest
/home/johann/workspace/media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[35,18]
cannot find symbol
symbol  : class Parameterized$Parameters
location: package org.junit.runners

Both Parameterized and Parameterized.Parameters are imported.

Could this be a classpath issue? Is there a JUnit 3 somewhere?
- --
Regards,

Johann Burkard

<http://johannburkard.de>
<http://twitter.com/johannburkard>
<mailto:[hidden email]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3IUfoACgkQgOXEH1Six2FpzQCbBvSvYofZNKm9EWcvZakhiD/S
6MgAoOJNn/TMXWl2ZdA7oiMf/TnTVDam
=/r7y
-----END PGP SIGNATURE-----

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

    http://xircles.codehaus.org/manage_email

0x54A2C761.asc (1K) Download Attachment
0x54A2C761.asc.sig (100 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Johann Burkard
In reply to this post by Travis Schneeberger
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 05/09/2011 10:38 PM, Travis Schneeberger wrote:
> To put it another way, make sure your java compilation target version
> number is correct.

I have that

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-g</compilerArgument>
</configuration>
</plugin>

Compiling without debugging info doesn't help.
- --
Regards,

Johann Burkard

<http://johannburkard.de>
<http://twitter.com/johannburkard>
<mailto:[hidden email]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3IUvwACgkQgOXEH1Six2ERHACeJVcgQkCsz8baz+kDm6eV7YAH
wC4AoMlhKcKF0BjX2Ad/qxb1uavfLbyd
=Xx+P
-----END PGP SIGNATURE-----

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

    http://xircles.codehaus.org/manage_email

0x54A2C761.asc (1K) Download Attachment
0x54A2C761.asc.sig (100 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Travis Schneeberger
In reply to this post by Johann Burkard
try the fully qualified class names rather than doing an import.  I've noticed I've had to do this on occasion to get the stubs correct. example:

ex:

@org.junit.runner.RunWith(value=org.junit.runners.Parameterized.class) public class
DownloadServletTest

On Mon, May 9, 2011 at 4:43 PM, Johann Burkard <[hidden email]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 05/09/2011 09:45 PM, Travis Schneeberger wrote:
> notice the value=Parameterized*.class* versus value=Parameterized

I just tried that. Still doesn't work:

/home/johann/workspace/<a href="http://media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[12,32]" target="_blank">media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[12,32]
cannot find symbol
symbol: class Parameterized
@org.junit.runner.RunWith(value=Parameterized.class) public class
DownloadServletTest
/home/johann/workspace/<a href="http://media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[35,18]" target="_blank">media.io/target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java:[35,18]
cannot find symbol
symbol  : class Parameterized$Parameters
location: package org.junit.runners

Both Parameterized and Parameterized.Parameters are imported.

Could this be a classpath issue? Is there a JUnit 3 somewhere?
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3IUfoACgkQgOXEH1Six2FpzQCbBvSvYofZNKm9EWcvZakhiD/S
6MgAoOJNn/TMXWl2ZdA7oiMf/TnTVDam
=/r7y
-----END PGP SIGNATURE-----

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

   http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Johann Burkard
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 05/09/2011 10:48 PM, Travis Schneeberger wrote:
> try the fully qualified class names rather than doing an import.  I've
> noticed I've had to do this on occasion to get the stubs correct. example:

thanks, that did work for the @RunWith annotation but the @Parameters
annotation is an inner class of Parameterized and that doesn't work. It
gets compiled to:

$ grep Parameters
.../target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java
@org.junit.runners.Parameterized$Parameters() public static
java.util.Collection<java.lang.Object[]> data() { return
(java.util.Collection<java.lang.Object[]>)null;}

The Parameterized$Parameters is wrong, it should be
Parameterized.Parameters.
- --
Regards,

Johann Burkard

<http://johannburkard.de>
<http://twitter.com/johannburkard>
<mailto:[hidden email]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3IVdgACgkQgOXEH1Six2HMdQCeLrDzJf8O9au4EgWQuBeoDknF
FYwAnRv1R9WyQfrPRyCkDpUxfYbO/qEe
=Ma53
-----END PGP SIGNATURE-----

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

    http://xircles.codehaus.org/manage_email

0x54A2C761.asc (1K) Download Attachment
0x54A2C761.asc.sig (100 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Andrew Eisenberg
In reply to this post by Travis Schneeberger
I'll have a look at this soon.  Currently, I'm spending most of my
time preparing for the Groovy conference in Copenhagen, but soon after
that, or during the downtime I may be able to have a look.

On Mon, May 9, 2011 at 1:31 PM, Travis Schneeberger
<[hidden email]> wrote:

> Yes, please update it for groovy 1.8.  I think it would be a great
> alternative to gmaven.  Especially since bug with the gmaven stubs are
> fairly common.  BTW.  What is the recommended/official integration for
> groovy & maven?  gmaven or groovy-eclipse-compiler?
> The errors I was getting with groovy-eclipse compiler had to do with junit
> annotations.  I didn't look into the problems a lot but here is an issue I
> was getting:
> Groovy:unable to resolve class org.junit.Assert
> ----------
> 336. ERROR in
> C:\IdeaProjects\kuali-rice-trunk\trunk\core\api\src\test\groovy\org\kuali\rice\core\api\criteria
> \SimplePredicateTest.groovy (at line 41)
>         @Test
>          ^
> Groovy:class org.junit.Test is not an annotation in @org.junit.Test
> ----------
> 337. ERROR in
> C:\IdeaProjects\kuali-rice-trunk\trunk\core\api\src\test\groovy\org\kuali\rice\core\api\criteria
> \SimplePredicateTest.groovy (at line 53)
>         @Test
>          ^
> I would be willing to help you debug it more if you want.
>
> ~Travis
>
> On Mon, May 9, 2011 at 4:01 PM, Andrew Eisenberg <[hidden email]>
> wrote:
>>
>> I can speak a little about the groovy-eclipse-compiler is currently
>> using Groovy 1.7.5.  I haven't updated it in a while since I'm not
>> really sure how much this is being used, but since I know that at
>> least some people would like to use it, I can update it for 1.8 and
>> 1.7.10.
>>
>> You mentioned that you had some compilation errors with it.  Do you
>> remember what they were?
>>
>> On Mon, May 9, 2011 at 11:18 AM, Travis Schneeberger
>> <[hidden email]> wrote:
>> > Guys,
>> > First off, thanks a bunch for all your work & groovy 1.8 and the
>> > groovy-eclipse integration!  Getting the support for groovy 1.8 into
>> > eclipse
>> > has really helped us evaluate groovy 1.8.  Great work!  on to my
>> > question....
>> >
>> > I've noticed that there hasn't been any recent activity on the gmaven
>> > plugin.  Is this project still maintained at all?  Will it be updated
>> > for
>> > groovy 1.8?  I've been able to compile groovy 1.8 classes with gmaven as
>> > it
>> > is right now (by swapping the version of groovy) but I'm not sure if
>> > this is
>> > a good idea.  Any issues with this I should be aware of?
>> >
>> > I'm also aware that the groovy-eclipse-compiler is another way to
>> > compile
>> > groovy code with maven.  Any idea when this will be stable and released?
>> >  I
>> > tried this briefly and faced some compilation errors when attempting to
>> > use
>> > it.  This method of compilation would be great to avoid those pesky stub
>> > errors.
>> >
>> > Thanks in advance
>> > ~Travis
>> >
>> >
>> >
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> 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


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Travis Schneeberger
In reply to this post by Johann Burkard
Crap yeah I think you're screwed then :-(  This looks like another bug with the stub compiler.  Another really troublesome area with the stub compiler is nested annotations - they do not get generated correctly.  This is why I turned stub compilation off for our test code.  Still though, this may not be an option for some.  These errors are the main reason I was hoping to switch to the groovy-eclipse compiler for maven.  I'm just not sure if that method of compiling is ready for prime time yet...

For now I would say: turn stub compiling off unless you absolutely need it.

On Mon, May 9, 2011 at 5:00 PM, Johann Burkard <[hidden email]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 05/09/2011 10:48 PM, Travis Schneeberger wrote:
> try the fully qualified class names rather than doing an import.  I've
> noticed I've had to do this on occasion to get the stubs correct. example:

thanks, that did work for the @RunWith annotation but the @Parameters
annotation is an inner class of Parameterized and that doesn't work. It
gets compiled to:

$ grep Parameters
.../target/generated-sources/groovy-stubs/test/media/servlet/DownloadServletTest.java
@org.junit.runners.Parameterized$Parameters() public static
java.util.Collection<java.lang.Object[]> data() { return
(java.util.Collection<java.lang.Object[]>)null;}

The Parameterized$Parameters is wrong, it should be
Parameterized.Parameters.
- --
Regards,

Johann Burkard

<http://johannburkard.de>
<http://twitter.com/johannburkard>
<mailto:[hidden email]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3IVdgACgkQgOXEH1Six2HMdQCeLrDzJf8O9au4EgWQuBeoDknF
FYwAnRv1R9WyQfrPRyCkDpUxfYbO/qEe
=Ma53
-----END PGP SIGNATURE-----

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

   http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Travis Schneeberger
In reply to this post by Andrew Eisenberg
Andrew,

I figured out the problem.  The example I was following at: http://communitymapbuilder.org/pages/viewpage.action?pageId=195100680 is not correct.  The plugin configuration for the build-helper-maven-plugin should have two executions; one to add the main source directory and one to add the test source directory.  After correcting that the groovy-eclipse compiler works (at least in my small example).  Now if we could get an updated version of the compiler for groovy 1.8 ;-)  See below for the corrected maven example.  Hopefully someone out there following this mailing list can update that webpage.  Thanks a bunch!

<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>



On Mon, May 9, 2011 at 5:02 PM, Andrew Eisenberg <[hidden email]> wrote:
I'll have a look at this soon.  Currently, I'm spending most of my
time preparing for the Groovy conference in Copenhagen, but soon after
that, or during the downtime I may be able to have a look.

On Mon, May 9, 2011 at 1:31 PM, Travis Schneeberger
<[hidden email]> wrote:
> Yes, please update it for groovy 1.8.  I think it would be a great
> alternative to gmaven.  Especially since bug with the gmaven stubs are
> fairly common.  BTW.  What is the recommended/official integration for
> groovy & maven?  gmaven or groovy-eclipse-compiler?
> The errors I was getting with groovy-eclipse compiler had to do with junit
> annotations.  I didn't look into the problems a lot but here is an issue I
> was getting:
> Groovy:unable to resolve class org.junit.Assert
> ----------
> 336. ERROR in
> C:\IdeaProjects\kuali-rice-trunk\trunk\core\api\src\test\groovy\org\kuali\rice\core\api\criteria
> \SimplePredicateTest.groovy (at line 41)
>         @Test
>          ^
> Groovy:class org.junit.Test is not an annotation in @org.junit.Test
> ----------
> 337. ERROR in
> C:\IdeaProjects\kuali-rice-trunk\trunk\core\api\src\test\groovy\org\kuali\rice\core\api\criteria
> \SimplePredicateTest.groovy (at line 53)
>         @Test
>          ^
> I would be willing to help you debug it more if you want.
>
> ~Travis
>
> On Mon, May 9, 2011 at 4:01 PM, Andrew Eisenberg <[hidden email]>
> wrote:
>>
>> I can speak a little about the groovy-eclipse-compiler is currently
>> using Groovy 1.7.5.  I haven't updated it in a while since I'm not
>> really sure how much this is being used, but since I know that at
>> least some people would like to use it, I can update it for 1.8 and
>> 1.7.10.
>>
>> You mentioned that you had some compilation errors with it.  Do you
>> remember what they were?
>>
>> On Mon, May 9, 2011 at 11:18 AM, Travis Schneeberger
>> <[hidden email]> wrote:
>> > Guys,
>> > First off, thanks a bunch for all your work & groovy 1.8 and the
>> > groovy-eclipse integration!  Getting the support for groovy 1.8 into
>> > eclipse
>> > has really helped us evaluate groovy 1.8.  Great work!  on to my
>> > question....
>> >
>> > I've noticed that there hasn't been any recent activity on the gmaven
>> > plugin.  Is this project still maintained at all?  Will it be updated
>> > for
>> > groovy 1.8?  I've been able to compile groovy 1.8 classes with gmaven as
>> > it
>> > is right now (by swapping the version of groovy) but I'm not sure if
>> > this is
>> > a good idea.  Any issues with this I should be aware of?
>> >
>> > I'm also aware that the groovy-eclipse-compiler is another way to
>> > compile
>> > groovy code with maven.  Any idea when this will be stable and released?
>> >  I
>> > tried this briefly and faced some compilation errors when attempting to
>> > use
>> > it.  This method of compilation would be great to avoid those pesky stub
>> > errors.
>> >
>> > Thanks in advance
>> > ~Travis
>> >
>> >
>> >
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> 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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Andrew Eisenberg
Thanks for the update.  I made the change to the wiki.

On Mon, May 9, 2011 at 5:34 PM, Travis Schneeberger
<[hidden email]> wrote:

> <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>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Travis Schneeberger
Andrew,

When you do get around to updating the groovy-eclipse compiler, let this list know and I'll do some testing. I'm currently working on a pretty large joint java-groovy multimodule maven project (that requires stub gen with gmaven).

On Mon, May 9, 2011 at 10:57 PM, Andrew Eisenberg <[hidden email]> wrote:
Thanks for the update.  I made the change to the wiki.

On Mon, May 9, 2011 at 5:34 PM, Travis Schneeberger
<[hidden email]> wrote:
> <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>

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

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: groovy + maven

Andrew Eisenberg
Sure.  Oddly, in the past 3 days, I've had a few people asking for
this.  I'll see what I can do in the next little bit.

On Tue, May 10, 2011 at 9:58 AM, Travis Schneeberger
<[hidden email]> wrote:

> Andrew,
>
> When you do get around to updating the groovy-eclipse compiler, let this
> list know and I'll do some testing. I'm currently working on a pretty large
> joint java-groovy multimodule maven project (that requires stub gen with
> gmaven).
>
> On Mon, May 9, 2011 at 10:57 PM, Andrew Eisenberg <[hidden email]>
> wrote:
>>
>> Thanks for the update.  I made the change to the wiki.
>>
>> On Mon, May 9, 2011 at 5:34 PM, Travis Schneeberger
>> <[hidden email]> wrote:
>> > <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>
>>
>> ---------------------------------------------------------------------
>> 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


123
Loading...