See these example modules for how to execute/compile using the 1.0 runtime:

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.0 runtime, 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


Reply via email to