[groovy-user] GMaven 1.0-rc-5-SNAPSHOT updated

8 views
Skip to first unread message

Jason Dillon

unread,
Feb 23, 2009, 1:39:49 PM2/23/09
to us...@groovy.codehaus.org
I've fixed up a few bugs, among a few other things. Can folks please
give the latest 1.0-rc-5-SNAPSHOT a whirl... and lemme know if
anything starts breaking.

I hope to get this released very soon as 1.0, then move on the 1.1 and
get the rest of the annotation, generics and enum stuff working very
soon.

--jason

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

http://xircles.codehaus.org/manage_email


Peter Niederwieser

unread,
Feb 23, 2009, 3:39:52 PM2/23/09
to us...@groovy.codehaus.org

Jason Dillon wrote:
>
> Can folks please give the latest 1.0-rc-5-SNAPSHOT a whirl... and lemme
> know if anything starts breaking.
>

Works fine for me.

Cheers,
Peter

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22169639.html
Sent from the groovy - user mailing list archive at Nabble.com.

Jason Dillon

unread,
Feb 24, 2009, 11:53:46 AM2/24/09
to us...@groovy.codehaus.org
Anyone else give it a try?

I'm gonna wait another 24 hrs for feedback then push out a release...
so please, if you got a few minutes, try it out now :-)

--jason

Ken Rimple

unread,
Feb 24, 2009, 12:44:33 PM2/24/09
to us...@groovy.codehaus.org

I am not sure whether this is related or not... I am trying to test the GORM
framework standalone (outside of Grails) as is a new feature in 1.1. I'm
trying to do it via maven - the example Graeme gave was an ant build.

It uses a Groovy 1.6 feature - an AST called @Entity
(org.grails.persistence). Do you have support currently for working with
ASTs from gmaven? It is supposed to inject GORM functionality (such as the
Id primary key) and seems not to be doing it when I do the build from maven.

For reference you can find my original query to Graeme (and his responses)
here if you want to see the maven build file.

http://www.nabble.com/Standalone-GORM-td21548547.html

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22186715.html

Ian Roughley

unread,
Feb 24, 2009, 3:35:13 PM2/24/09
to us...@groovy.codehaus.org
I'm getting the message:

Missing:
----------
1) org.codehaus.groovy.maven.runtime:gmaven-runtime-default:jar:1.0-rc-5-SNAPSHOT


This seems to be supported when viewing the codehaus repo location
<http://repository.codehaus.org/org/codehaus/groovy/maven/runtime/gmaven-runtime-default/>.

/Ian

Jason Smith

unread,
Feb 24, 2009, 4:52:11 PM2/24/09
to us...@groovy.codehaus.org
Jason Dillon, is this a bug? I've always explicitly include the runtime as a dependency, like this:

<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0-rc-5-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy.maven.runtime</groupId>
<artifactId>gmaven-runtime-1.6</artifactId>
<version>1.0-rc-5-SNAPSHOT</version>
</dependency>
</dependencies>
<configuration>
<providerSelection>1.6</providerSelection>
</configuration>
<executions>
<execution>
<goals>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>

Ian, I am assuming you are not explicitly including gmaven-runtime in the plugin definition???

Ian Roughley

unread,
Feb 24, 2009, 4:57:07 PM2/24/09
to us...@groovy.codehaus.org

correct - I added in only the stanzas you have above.

Ken Rimple

unread,
Feb 24, 2009, 5:21:04 PM2/24/09
to us...@groovy.codehaus.org

My issue was resolved. Turns out I was attempting to mount the plugin and
the dependency for the runtime manually. Domingo Suarez Torres identified
that and once I removed the artifact dependency everything worked, including
the @Entity AST.

URL for reference:
http://www.nabble.com/Standalone-Gorm-via-Maven---almost-there-but-Identity-Property-not-found-error...-td22170609.html

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22191954.html

Ken Rimple

unread,
Feb 24, 2009, 5:24:15 PM2/24/09
to us...@groovy.codehaus.org

I had to do a mvn -U to force snapshot updates, which then loaded everything
properly.

My configuration, now working, after a mvn -U clean install :

<repositories>
<repository>
<id>codehaus-snapshots</id>
<url>http://snapshots.repository.codehaus.org</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>codehaus-plugin-snapshots</id>
<url>http://snapshots.repository.codehaus.org</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
...
<build>
<plugins>
...


<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0-rc-5-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy.maven.runtime</groupId>
<artifactId>gmaven-runtime-1.6</artifactId>
<version>1.0-rc-5-SNAPSHOT</version>
</dependency>
</dependencies>

<executions>
<execution>
<goals>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>

...
</plugins>
<build>
...

Ken

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22192005.html


Sent from the groovy - user mailing list archive at Nabble.com.

Peter Niederwieser

unread,
Feb 24, 2009, 6:00:49 PM2/24/09
to us...@groovy.codehaus.org

AFAICT, the following parts of your POM are redundant and can be removed
(tested with Maven 2.0.9). Of course, everything could change with the next
minor release of Maven. :-)

<snapshots>
<enabled>true</enabled>
</snapshots>

<dependencies>


<dependency>
<groupId>org.codehaus.groovy.maven.runtime</groupId>
<artifactId>gmaven-runtime-1.6</artifactId>
<version>1.0-rc-5-SNAPSHOT</version>
</dependency>
</dependencies>

Cheers,
Peter

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22192665.html

Jason Dillon

unread,
Feb 25, 2009, 2:46:17 AM2/25/09
to us...@groovy.codehaus.org
On Feb 25, 2009, at 3:35 AM, Ian Roughley wrote:
> I'm getting the message:
>
> Missing:
> ----------
> 1) org.codehaus.groovy.maven.runtime:gmaven-runtime-default:jar:1.0-
> rc-5-SNAPSHOT
>
>
> This seems to be supported when viewing the codehaus repo location
> <http://repository.codehaus.org/org/codehaus/groovy/maven/runtime/gmaven-runtime-default/
> >.

The default runtime was dropped in 1.0-rc-4 (it was in the release
notes: http://groovy.codehaus.org/GMaven+-+1.0-rc-4+Release), though
ATM I can't remember why I dropped it.

Use gmaven-runtime-1.6 or add the dependencies on the groovy jars
directly, which is probably better for most users.

If you do want the default runtime back, please file a JIRA stating
what your use-case is and I will look into breathing life back into it.

--jason

Jason Dillon

unread,
Feb 25, 2009, 2:49:10 AM2/25/09
to us...@groovy.codehaus.org

You should not need to include the runtime in your plugin dependencies
section, the artifact is loaded automatically based on what the
providerSelection parameter has resolved to.

--jason

Jason Dillon

unread,
Feb 25, 2009, 3:02:24 AM2/25/09
to us...@groovy.codehaus.org
You shouldn't need the plugin dependency on the runtime, that is
automatically loaded based on what provider is selected.

--jason

Jason Dillon

unread,
Feb 25, 2009, 3:05:04 AM2/25/09
to us...@groovy.codehaus.org
I'm confused a little about the referenced nabble bits a little, its
not clear what version of the plugin and/or runtime was being used...
and certainly you will run into problems if the plugin and runtime are
not using the same release ;-)

1.0-rc-4 had problems with AST bits, so I'd only expect 1.0-rc-5-
SNAPSHOT to function.

--jason

Ken Rimple

unread,
Feb 25, 2009, 8:43:16 AM2/25/09
to us...@groovy.codehaus.org

Right, I was using 1.0-rc-4, which didn't recognize the @Entity AST.

I switched to 1.0-rc-5, and removed the dependency on the gmaven and
groovy-all artifacts, only using the plugin itself as a dependency.

I think the whole problem was that I was using 1.0-rc-4 to begin with. After
I switched, I found other errors that were due to my overmanagement of the
situation (I was excluding artifacts from one dependency, etc...) Pilot
error, so to speak.

Now I only have:

<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0-rc-5-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy.maven.runtime</groupId>
<artifactId>gmaven-runtime-1.6</artifactId>
<version>1.0-rc-5-SNAPSHOT</version>
</dependency>
</dependencies>

<executions>
<execution>
<goals>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>

Is there anything I don't need? I had to add the snapshot repository and
mvn -U to get things going.

Ken

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22203032.html

Jason Dillon

unread,
Feb 25, 2009, 9:19:05 AM2/25/09
to us...@groovy.codehaus.org
On Feb 25, 2009, at 8:43 PM, Ken Rimple wrote:
> Now I only have:

You should not need the gmaven-runtime-1.6 or any other plugin/
dependencies/dependency* configured for the gmaven-plugin. The
runtime dependency artifacts are internally automatically resolved and
used to build the classpath to execute the various GMaven components.

--jason

Ian Roughley

unread,
Feb 25, 2009, 9:31:45 AM2/25/09
to us...@groovy.codehaus.org
The mvn -U command isn't working for me.

I'm on maven 2.0.10 with the following config:


<repositories>
<repository>
<id>Codehaus Snapshots</id>
<url>http://snapshots.repository.codehaus.org/</url>


<snapshots>
<enabled>true</enabled>
</snapshots>

</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>Codehaus Snapshots</id>
<url>http://snapshots.repository.codehaus.org/</url>


<snapshots>
<enabled>true</enabled>
</snapshots>

</pluginRepository>
</pluginRepositories>
...

<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>

<version>${gmaven.version}</version>


<executions>
<execution>
<goals>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>


The maven output is:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Adaptive Collaboration Architecture - Common
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
...
Downloading:
http://mars.wal.novell.com/archiva/repository/snapshots//org/codehaus/groovy/maven/runtime/gmaven-runtime-default/1.0-rc-5-SNAPSHOT/gmaven-runtime-default-1.0-rc-5-SNAPSHOT.pom
Downloading:
http://repo1.maven.org/maven2/org/codehaus/groovy/maven/runtime/gmaven-runtime-default/1.0-rc-5-SNAPSHOT/gmaven-runtime-default-1.0-rc-5-SNAPSHOT.pom
Downloading:
http://snapshots.repository.codehaus.org//org/codehaus/groovy/maven/runtime/gmaven-runtime-default/1.0-rc-5-SNAPSHOT/gmaven-runtime-default-1.0-rc-5-SNAPSHOT.pom
Downloading:
http://mars.wal.novell.com/archiva/repository/snapshots//org/codehaus/groovy/maven/runtime/gmaven-runtime-default/1.0-rc-5-SNAPSHOT/gmaven-runtime-default-1.0-rc-5-SNAPSHOT.jar
Downloading:
http://repo1.maven.org/maven2/org/codehaus/groovy/maven/runtime/gmaven-runtime-default/1.0-rc-5-SNAPSHOT/gmaven-runtime-default-1.0-rc-5-SNAPSHOT.jar
Downloading:
http://snapshots.repository.codehaus.org//org/codehaus/groovy/maven/runtime/gmaven-runtime-default/1.0-rc-5-SNAPSHOT/gmaven-runtime-default-1.0-rc-5-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) org.codehaus.groovy.maven.runtime:gmaven-runtime-default:jar:1.0-rc-5-SNAPSHOT

Try downloading the file manually from the project website.

...

from the specified remote repositories:
codehaus (http://repository.codehaus.org/),
aca.snapshots (http://mars.wal.novell.com/archiva/repository/snapshots/),
central (http://repo1.maven.org/maven2),
aca.internal (http://mars.wal.novell.com/archiva/repository/internal/),
Codehaus Snapshots (http://snapshots.repository.codehaus.org/)


If I go to the repo location
http://snapshots.repository.codehaus.org//org/codehaus/groovy/maven/runtime/gmaven-runtime-default/
there is only a rc-4, so it kinda makes sense. Adding in the dependency stanza provided the same
results.


/Ian

> plugin/dependencies/dependency* configured for the gmaven-plugin. The

Jason Smith

unread,
Feb 25, 2009, 9:59:46 AM2/25/09
to us...@groovy.codehaus.org
Add this in. If it is still not resolving, it is possible that you have something in your settings.xml that is causing this. Remove the passwords from your settings.xml and publish it here. And if this works, maybe there is something going on with the automatic default resolution???

<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>${gmaven.version}</version>

<dependencies>


<dependency>
<groupId>org.codehaus.groovy.maven.runtime</groupId>
<artifactId>gmaven-runtime-1.6</artifactId>

<version>${gmaven.version}</version>


</dependency>
</dependencies>
<configuration>
<providerSelection>1.6</providerSelection>
</configuration>

<executions>


<execution>
<goals>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>

-----Original Message-----
From: Ian Roughley [mailto:roug...@gmail.com]
Sent: Wednesday, February 25, 2009 7:32 AM
To: us...@groovy.codehaus.org

Jason Dillon

unread,
Feb 25, 2009, 10:18:30 AM2/25/09
to us...@groovy.codehaus.org
Jason, why do you keep using the runtime dependency in the plugin
configuration? This should not be needed... why are you configuring
the plugin like this?

--jason

Jason Smith

unread,
Feb 25, 2009, 11:22:07 AM2/25/09
to us...@groovy.codehaus.org
He seems to have a dependency problem, and if he still has a dependency problem after adding that in, then it is most likely something with his setup.

The reason I keep adding that in is it comes from code I copied from your wiki page. :-) Also, there has to be a way to specify the version of Groovy I want to use. 1.5.7 is different from 1.6, and I don't know what DEFAULT means just by looking at it. And neither would someone who is reading my POM. I assume there are differences in compilation from 1.5.7 to 1.6... ???

Jason Smith

unread,
Feb 25, 2009, 1:37:25 PM2/25/09
to us...@groovy.codehaus.org
Ian, I am not sure what to tell you. It is working for me, with or without the dependency declaration.

Things to try:
* Wipe your local Maven repo, usually under c:\Documents and Settings\username\.m2\repository. Sometimes these sorts of things happen because you have a corrupt local repo.
* Build from source code. Available at http://svn.codehaus.org/groovy/gmaven/trunk. That will put all the dependencies into your local repo.
* Make sure you aren't suppressing online checking of anything in your settings.xml. You can get fancy later - right now you just want it to work. :-)

Best of luck.

Ian Roughley

unread,
Feb 25, 2009, 2:34:48 PM2/25/09
to us...@groovy.codehaus.org
Thanks for the help.

I think I worked out the problem (just checking it now). For some reason, issuing mvn -U -cpu
install doesn't work from the root of a multi-project pom. I've had to go into each individual
project that uses the gmaven plugin and run the update. This has led to either (a) problems moving
from groovy 1.5.6 to 1.6.0, or (b) someone else messing up some of my groovy scripts. Checking on
this as we speak. And then I'll be able to circle around and see if the site command work ;-)

/Ian

Peter Niederwieser

unread,
Feb 26, 2009, 6:17:03 AM2/26/09
to us...@groovy.codehaus.org

Jason Smith-11 wrote:
>
> Also, there has to be a way to specify the version of Groovy I want to
> use.
>

IMHO, the preferred way to specify a Groovy version is:

<configuration>
<providerSelection>1.5</providerSelection>
</configuration>

I only mess around with gmaven-runtime dependencies when I need to compile
with a Groovy version that I built myself.

Cheers,
Peter

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22222128.html


Sent from the groovy - user mailing list archive at Nabble.com.

Barry Kern

unread,
Feb 26, 2009, 4:28:26 PM2/26/09
to us...@groovy.codehaus.org
upgrading to rc5 worked for me.

ZJacobson

unread,
Feb 26, 2009, 6:34:31 PM2/26/09
to us...@groovy.codehaus.org

Hi -

I'm setting up a maven build for a multi module project. I'm getting the
following error during the generateStubs goal execution of one of the
sub-modules:

[WARNING] Attempting to build MavenProject instance for Artifact
(org.codehaus.mojo:groovy-maven-plugin:1.0-rc-5-20090223.182426-3) of type:
maven-plugin; constructing POM artifact instead.
[INFO] snapshot org.codehaus.groovy.maven:gmaven-plugin:1.0-rc-5-SNAPSHOT:
checking for updates from codehaus.org
[INFO] [groovy:generateStubs]


[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------

[INFO] String index out of range: -2


Any ideas how I can figure out what is going on? I can import the poms (a
root pom w/ 2 modules) into IntelliJ and run all my tests. But maven can't.
I'm using the pom configuration that has been referred to in this thread.

Thanks-
Zak

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22235296.html

ZJacobson

unread,
Feb 26, 2009, 6:38:04 PM2/26/09
to us...@groovy.codehaus.org

Here's the stacktrace from mvn -X groovy:generateStubs


[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: String index out of
range: -2
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: String index out
of range: -2
at
org.codehaus.groovy.maven.plugin.MojoSupport.execute(MojoSupport.java:85)
at
org.codehaus.groovy.maven.plugin.stubgen.AbstractGenerateStubsMojo.execute(AbstractGenerateStubsMojo.java:60)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
... 16 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
range: -2
at java.lang.String.substring(String.java:1768)
at org.codehaus.groovy.antlr.SourceBuffer.getSnippet(SourceBuffer.java:77)
at
org.codehaus.groovy.maven.runtime.v1_6.stubgen.ParserFactoryImpl$ParserSupport.snippet(ParserFactoryImpl.java:182)
at
org.codehaus.groovy.maven.runtime.support.stubgen.model.ModelFactorySupport.javadocs(ModelFactorySupport.java:704)
at
org.codehaus.groovy.maven.runtime.support.stubgen.model.ModelFactorySupport.classDef(ModelFactorySupport.java:259)
at
org.codehaus.groovy.maven.runtime.support.stubgen.model.ModelFactorySupport.process(ModelFactorySupport.java:120)
at
org.codehaus.groovy.maven.runtime.support.stubgen.model.ModelFactorySupport.create(ModelFactorySupport.java:84)
at
org.codehaus.groovy.maven.runtime.v1_6.StubCompilerFeature$StubCompilerImpl.render(StubCompilerFeature.java:100)
at
org.codehaus.groovy.maven.runtime.v1_6.StubCompilerFeature$StubCompilerImpl.compile(StubCompilerFeature.java:89)
at
org.codehaus.groovy.maven.plugin.stubgen.AbstractGenerateStubsMojo.compile(AbstractGenerateStubsMojo.java:160)
at
org.codehaus.groovy.maven.plugin.stubgen.AbstractGenerateStubsMojo.process(AbstractGenerateStubsMojo.java:131)
at
org.codehaus.groovy.maven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:60)
at
org.codehaus.groovy.maven.plugin.MojoSupport.execute(MojoSupport.java:69)
... 19 more

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22235298.html

Jason Smith

unread,
Feb 26, 2009, 7:57:55 PM2/26/09
to us...@groovy.codehaus.org
Did you happen to run it with errors and/or debug turned on? If you can get a stack trace, it would help tremendously.

-----Original Message-----
From: ZJacobson [mailto:jaco...@gmail.com]
Sent: Thursday, February 26, 2009 4:35 PM
To: us...@groovy.codehaus.org

ZJacobson

unread,
Feb 26, 2009, 8:49:04 PM2/26/09
to us...@groovy.codehaus.org

It looks like the problem was because of Mac line endings, I changed my files
to use Unix line endings and this went away. Jira?

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22237960.html

Jason Smith

unread,
Feb 27, 2009, 9:49:39 AM2/27/09
to us...@groovy.codehaus.org
It looks to me like you have found a legitimate data-dependent bug. The error is happening in antlr, so something in parsing is causing this. Any chance you have figured out which Groovy source this is occurring against? It would be a lot easier to reproduce the error with source that causes the problem. And then we can write up a Jira.

-----Original Message-----
From: ZJacobson [mailto:jaco...@gmail.com]
Sent: Thursday, February 26, 2009 4:38 PM
To: us...@groovy.codehaus.org
Subject: Re: [groovy-user] GMaven 1.0-rc-5-SNAPSHOT updated

ZJacobson

unread,
Feb 27, 2009, 1:01:05 PM2/27/09
to us...@groovy.codehaus.org

On Mac OSX, if I have a file with incorrect line endings (I blame Perforce
for this) I can reproduce the error. It seems to require a .groovy file
with > 1 class defined. I have attached the file:
http://www.nabble.com/file/p22251088/Bootstrap.groovy Bootstrap.groovy

Note that when I look at this file in vi, I see ^M's, but when I look at the
file I uploaded in a browser it looks ok.

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22251088.html

Haw-Bin Chai

unread,
Mar 2, 2009, 11:22:47 PM3/2/09
to us...@groovy.codehaus.org
I'm getting an error like the following when trying to use a jar containing classes built with 1.0-rc-5. The error happens when I try to instantiate the Groovy class. Has anyone else seen this?


Caught: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/callsite/CallSiteArray
    at com.thoughtworks.selenium.GroovySelenium.$createCallSiteArray(GroovySelenium.groovy)
    at com.thoughtworks.selenium.GroovySelenium.$getCallSiteArray(GroovySelenium.groovy)
    at com.thoughtworks.selenium.GroovySelenium.<clinit>(GroovySelenium.groovy:12)
    at SimpleTest.class$(SimpleTest.groovy)
    at SimpleTest.run(SimpleTest.groovy:4)
    at SimpleTest.main(SimpleTest.groovy)


Haw-Bin

Jason Dillon

unread,
Mar 3, 2009, 12:18:51 AM3/3/09
to us...@groovy.codehaus.org
Looks like a runtime mismatch.

--jason

Guillaume Laforge

unread,
Mar 3, 2009, 3:45:44 AM3/3/09
to us...@groovy.codehaus.org
As if he had two Groovy runtimes? or one for compiling and one for
running the compilde code against which doesn't match?

On Tue, Mar 3, 2009 at 06:18, Jason Dillon <ja...@planet57.com> wrote:
> Looks like a runtime mismatch.
> --jason

> - Show quoted text -

--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

Jason Dillon

unread,
Mar 3, 2009, 3:49:04 AM3/3/09
to us...@groovy.codehaus.org
Ya, I think this means that the code was compiled with the 1.6
runtime, but when run is not using the same runtime.

--jason

Tomáš Hubálek

unread,
Mar 3, 2009, 4:18:57 AM3/3/09
to us...@groovy.codehaus.org

I have the same trouble. It started suddenly. I left my project a few days
ago (and I think it was working) and when I came back something went
wrong...


gyrm wrote:
>
> I'm getting an error like the following when trying to use a jar
> containing
> classes built with 1.0-rc-5. The error happens when I try to instantiate
> the
> Groovy class. Has anyone else seen this?
>
>
> Caught: java.lang.NoClassDefFoundError:
> org/codehaus/groovy/runtime/callsite/CallSiteArray
> at
> com.thoughtworks.selenium.GroovySelenium.$createCallSiteArray(GroovySelenium.groovy)
> at
> com.thoughtworks.selenium.GroovySelenium.$getCallSiteArray(GroovySelenium.groovy)
> at
> com.thoughtworks.selenium.GroovySelenium.<clinit>(GroovySelenium.groovy:12)
> at SimpleTest.class$(SimpleTest.groovy)
> at SimpleTest.run(SimpleTest.groovy:4)
> at SimpleTest.main(SimpleTest.groovy)
>
>
> Haw-Bin
>
>

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22305032.html

Jason Dillon

unread,
Mar 3, 2009, 4:38:33 AM3/3/09
to us...@groovy.codehaus.org
On Mar 3, 2009, at 4:18 PM, Tomáš Hubálek wrote:
> I have the same trouble. It started suddenly. I left my project a
> few days
> ago (and I think it was working) and when I came back something went
> wrong...

Cases where things just start breaking, especially after a release,
smells like you have not configured your project to use specific
versions of the GMaven plugin.

Always, always... ALWAYS, configure the versions of Maven plugins your
project uses.

--jason

>
> gyrm wrote:
>>
>> I'm getting an error like the following when trying to use a jar
>> containing
>> classes built with 1.0-rc-5. The error happens when I try to
>> instantiate
>> the
>> Groovy class. Has anyone else seen this?
>>
>>
>> Caught: java.lang.NoClassDefFoundError:
>> org/codehaus/groovy/runtime/callsite/CallSiteArray
>> at

>> com.thoughtworks.selenium.GroovySelenium.
>> $createCallSiteArray(GroovySelenium.groovy)
>> at
>> com.thoughtworks.selenium.GroovySelenium.
>> $getCallSiteArray(GroovySelenium.groovy)
>> at
>> com
>> .thoughtworks

Tomáš Hubálek

unread,
Mar 3, 2009, 4:42:27 AM3/3/09
to us...@groovy.codehaus.org

I had there explictely said 1.0-rc-4. This is what does not makes sense to me
why it went wrong...

Tom

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22305372.html

Tomáš Hubálek

unread,
Mar 3, 2009, 4:47:43 AM3/3/09
to us...@groovy.codehaus.org

Oh sorry, I had specified version in dependecies section but not in plugin
section. Now it works well...

Sorry for confusion.

Tom

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22305476.html

Jason Dillon

unread,
Mar 3, 2009, 5:08:00 AM3/3/09
to us...@groovy.codehaus.org
Glad you got it figured out.

Unfortunately Maven lets users configure a plugin w/o a version...
which IMO is very bad *feature*, allowing crazy problems to just start
magically when a new version is released.

Always configure the version of the plugins you are using :-)
Consider using the enforcer plugin to make sure you do: http://maven.apache.org/enforcer/enforcer-rules/requirePluginVersions.html

--jason

Haw-Bin Chai

unread,
Mar 3, 2009, 1:07:43 PM3/3/09
to us...@groovy.codehaus.org
I will have to double check when I get home, but as I recall I specified version 1.0-rc-5 in the places as described on the GMaven site (http://docs.codehaus.org/display/GROOVY/GMaven+-+1.0-rc-5+Release) . I will check what version of the Groovy runtime actually got embedded in the final jar.


Haw-Bin

Jason Dillon

unread,
Mar 4, 2009, 8:44:04 AM3/4/09
to us...@groovy.codehaus.org
Post a pom.xml or small project and I can see what it really going on.

--jason

Haw-Bin Chai

unread,
Mar 4, 2009, 3:36:44 PM3/4/09
to us...@groovy.codehaus.org
Hey, I took a quick look last night. Looks like my maven project (this is the Selenium client driver) is not packaging up any dependencies with the generated artifact, so I guess I may simply need to add the Groovy runtime jar to my classpath. D'oh if that's the case, however with the previous dependency setup (using 1.0-rc-3), I did not have to include any other jars ...


Haw-Bin

Jason Dillon

unread,
Mar 5, 2009, 10:10:12 AM3/5/09
to us...@groovy.codehaus.org
If you can post a test project I can look at it, otherwise I'm just stabbing in the dark.  BTW, you should include the Groovy jar you need, don't let the runtime magic do this for you.  Soon the runtime will be detected by the Groovy artifacts you have listed.

--jason

Tom Nichols

unread,
Mar 5, 2009, 10:18:55 AM3/5/09
to us...@groovy.codehaus.org
Yes, I've always included the groovy artifact as a dependency as well
as putting the groovy plugin in the <build> section. I had errors
i.e. running the test phase if the plugin's default runtime version is
mismatched from your dependency version, but that is easy to fix by
just specifying the groovy runtime in the plugin.

Haw-Bin Chai

unread,
Mar 5, 2009, 10:52:09 AM3/5/09
to us...@groovy.codehaus.org
I attached two file - the "old" pom which used 1.0-rc-3, and the "new" one which uses 1.0-rc-5 . Running tests with the old one worked, while with the new one I get errors such as:


Exception in constructor: testWaitForSucceeds (java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.GroovyCategorySupport.getCategoryNameUsage(Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicInteger; at org.codehaus.groovy.runtime.callsite.AbstractCallSite.<init>(AbstractCallSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.<init>(CallSiteArray.java:38) at com.thoughtworks.selenium.GroovySeleneseTestCaseTest.$createCallSiteArray(GroovySeleneseTestCaseTest.groovy) at com.thoughtworks.selenium.GroovySeleneseTestCaseTest.$getCallSiteArray(GroovySeleneseTestCaseTest.groovy) at com.thoughtworks.selenium.GroovySeleneseTestCaseTest.<init>(GroovySeleneseTestCaseTest.groovy) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at junit.framework.TestSuite.createTest(TestSuite.java:131) at junit.framework.TestSuite.addTestMethod(TestSuite.java:114) at junit.framework.TestSuite.<init>(TestSuite.java:75) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.maven.surefire.junit.JUnitTestSet.constructTestObject(JUnitTestSet.java:151) at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:197) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) )


Haw-Bin
pom-new-not-working.xml
pom-old-working-ok.xml

Jason Dillon

unread,
Mar 5, 2009, 11:00:40 AM3/5/09
to us...@groovy.codehaus.org
Why does the *new* one need gmaven-mojo or the gmaven-runtime-1.6 dependencies?

--jason


<pom-new-not-working.xml><pom-old-working-ok.xml>---------------------------------------------------------------------

techneardestruction

unread,
Mar 5, 2009, 12:13:11 PM3/5/09
to us...@groovy.codehaus.org

Hi,
Could you coonfirm what is the minimum version of Maven for running GMaven?
(I couldn't find this info on the GMaven site)

We are currently running Maven 2.0.1.
I received some error messages when I tried to run the command:
mvn archetype:generate
-DarchetypeGroupId=org.codehaus.groovy.maven.archetypes
-DarchetypeArtifactId=gmaven-archetype-basic

Based on the output, it looks like we need Maven 2.0.7, at a minimum for
this to work.

Results:
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] EAST shared code
[INFO] Course Guide
[INFO] EAST applications bundle
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] Ignoring available plugin update: 2.0-alpha-4 as it requires Maven
version 2.0.7
[INFO] Ignoring available plugin update: 2.0-alpha-3 as it requires Maven
version 2.0.7
[INFO] Ignoring available plugin update: 2.0-alpha-2 as it requires Maven
version 2.0.7
[INFO] Ignoring available plugin update: 2.0-alpha-1 as it requires Maven
version 2.0.7
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
----------------------------------------------------------------------------
[INFO] Required goal not found: archetype:generate
[INFO]
----------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
----------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Mar 05 11:04:46 CST 2009
[INFO] Final Memory: 2M/6M
[INFO]
----------------------------------------------------------------------------


Thanks,
Mike

--
View this message in context: http://www.nabble.com/GMaven-1.0-rc-5-SNAPSHOT-updated-tp22167405p22356081.html

Reply all
Reply to author
Forward
0 new messages