Quantcast

groovy + maven

classic Classic list List threaded Threaded
52 messages Options
1234 ... 6
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


1234 ... 6
Loading...