Integrating Groovy in build scripts

From: Marius Soutier (m.soutie..tarhealthcare.info)
Date: Fri Sep 18 2009 - 08:34:15 EDT

  • Next message: Mike Schrag (JIRA): "[OS-JIRA] Created: (WOL-1084) New Model throws an NPE in Entity Modeler.app"

    Hi there,

    how do you build your Groovy-powered WebObjects apps? Since the
    wocompile tag obviously cannot compile Groovy code, I'm using the
    following code as my compile target:

                    <taskdef name="groovyc"
                                     classname="org.codehaus.groovy.ant.Groovyc">
                                    <classpath>
                                            <fileset dir="Libraries">
                                                    <include name="groovy-all-1.6.4.jar"/>
                                            </fileset>
                                    </classpath>
                    </taskdef>
                    <groovyc srcdir="Sources" destdir="bin" encoding="UTF-8">
                            <classpath>
                                    <fileset dir="Frameworks"><!-- Project frameworks -->
                                            <include name = "*.framework/Resources/Java/*.jar" />
                                    </fileset>
                                    <fileset dir="${wo.user.frameworks}">
                                            <include name = "*.framework/Resources/Java/*.jar"/>
                                    </fileset>
                                    <fileset dir="${wo.local.frameworks}">
                                            <include name = "*.framework/Resources/Java/*.jar"/>
                                    </fileset>
                                    <fileset dir="${wo.system.frameworks}">
                                            <include name = "*.framework/Resources/Java/*.jar"/>
                                    </fileset>
                                    <fileset dir="Libraries">
                                            <include name="*.jar" />
                                    </fileset>
                                    <fileset dir="${wo.extensions}">
                                            <include name="*.jar" />
                                    </fileset>
                            </classpath>
                            <javac source="1.5" target="1.5" debug="off" encoding="UTF-8" />
                    </groovyc>

    Is there a better way, especially for including the frameworks (I just
    got rid of those old ant.frameworks.something files)?

    Or do you guys have an idea if it's feasible to improve the wocompile
    tag (or even the WOLips incremental builder) to support the groovcy
    compiler?

    Thanks,
    - Marius



    This archive was generated by hypermail 2.0.0 : Fri Sep 18 2009 - 08:35:55 EDT