Jason,
I tried adding the configuration element with the providerSelection to my
pom like so:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo.groovy</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<providerSelection>1.0
</providerSelection>
</configuration>
</plugin>
</plugins>
</build>
and it didn't make any difference. I am still getting a
java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/GStringImpl
error when I use the groovy jar file my pom creates with the program that
uses groovy 1.0.
I tried adding the groovy-runtime-1.0 dependency, but it cannot be found in
the Maven repository (http://repo1.maven.org/maven2).
Anything else I need to do? Do I need the dependency or it is not necessary?
Thanks a lot for your help!
Eric
On Nov 1, 2007 5:08 PM, Jason Dillon <[EMAIL PROTECTED]> wrote:
> See these example modules for how to execute/compile using the 1.0runtime:
>
> http://svn.codehaus.org/mojo/trunk/mojo/groovy/groovy-mojo-testsuite/src/it/groovy-1.0/
>
> --jason
>
>
> On Nov 1, 2007, at 12:14 PM, Eric Lessard wrote:
>
> I am using the Maven 2 Groovy plug-in to build a jar file that can be used
> with a Groovy 1.0 runtime. If I use the plug-in without any kind of
> special configuration and I try to use the generated jar file with a
> 1.0runtime, I get the following exception:
>
> java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/GStringImpl
>
> How can I work around this problem?
>
> Here's what my pom file look like:
>
> <project xmlns=" http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
>
> <!-- +++ PROJECT INFO +++ -->
>
> <groupId>...</groupId>
> <artifactId>...</artifactId>
> <packaging>groovy-jar</packaging>
> <version>1.0</version>
> <name>...</name>
>
> <!-- +++ MODULES (SUB-PROJECTS) +++ -->
>
> <modules>
> <!-- None for now -->
> </modules>
>
> <!-- +++ GLOBAL DEPENDENCIES +++ -->
> <dependencies>
> <dependency>
> <groupId>log4j</groupId>
> <artifactId>log4j</artifactId>
> <version>1.2.13</version>
> </dependency>
> <dependency>
> <groupId>groovy</groupId>
> <artifactId>groovy-all</artifactId>
> <version>1.0</version>
> </dependency>
> <dependency>
> <groupId>xmlunit</groupId>
> <artifactId>xmlunit</artifactId>
> <version>1.1</version>
> </dependency>
> </dependencies>
>
> <!-- +++ BUILD +++ -->
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.codehaus.mojo.groovy</groupId>
> <artifactId>groovy-maven-plugin</artifactId>
> <extensions>true</extensions>
> </plugin>
> </plugins>
> </build>
> </project>
>
> Any help would be appreciated.
>
> Thanks,
>
> Eric
>
>
>