--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--build.xml generated by maven from project.xml version 1.0-RC-01
+ on date December 29 2006, time 0256-->
+<project default="jar" name="groovy" basedir=".">
+ <!--Load local and user build preferences-->
+ <property file="build.properties"></property>
+ <property file="${user.home}/build.properties"></property>
+ <!--Build properties-->
+ <property name="defaulttargetdir" value="${basedir}/target"></property>
+ <property name="libdir" value="${user.home}/.maven/repository"></property>
+ <property name="classesdir" value="${basedir}/target/classes"></property>
+ <property name="testclassesdir" value="${basedir}/target/test-classes"></property>
+ <property name="testreportdir" value="${basedir}/target/test-reports"></property>
+ <property name="distdir" value="${basedir}/dist"></property>
+ <property name="javadocdir" value="${basedir}/dist/docs/api"></property>
+ <property name="final.name" value="groovy-1.0-RC-01"></property>
+ <property name="proxy.host" value=""></property>
+ <property name="proxy.port" value=""></property>
+ <property name="proxy.username" value=""></property>
+ <property name="proxy.password" value=""></property>
+ <path id="build.classpath">
+ <fileset dir="${libdir}" includes="**/*.jar"/>
+ </path>
+ <target name="init" description="o Initializes some properties">
+ <mkdir dir="${libdir}"></mkdir>
+ <!--Test if user defined a proxy-->
+ <condition property="useProxy">
+ <and>
+ <isset property="proxy.host"></isset>
+ <not>
+ <equals trim="true" arg2="" arg1="${proxy.host}"></equals>
+ </not>
+ </and>
+ </condition>
+ </target>
+ <target name="compile" description="o Compile the code" depends="">
+ <mkdir dir="${classesdir}"></mkdir>
+ <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
+ <src>
+ <pathelement location="${basedir}/src/main"></pathelement>
+ </src>
+ <classpath refid="build.classpath"></classpath>
+ </javac>
+ <copy todir="${classesdir}">
+ <fileset dir="${basedir}/src/main">
+ <include name="**/*.properties"></include>
+ <include name="**/*.xml"></include>
+ </fileset>
+ </copy>
+ </target>
+ <target name="jar" description="o Create the jar" depends="compile,test">
+ <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}"></jar>
+ </target>
+ <target name="clean" description="o Clean up the generated directories">
+ <delete dir="${defaulttargetdir}"></delete>
+ <delete dir="${distdir}"></delete>
+ </target>
+ <target name="dist" description="o Create a distribution" depends="jar, javadoc">
+ <mkdir dir="dist"></mkdir>
+ <copy todir="dist">
+ <fileset dir="${defaulttargetdir}" includes="*.jar"></fileset>
+ <fileset dir="${basedir}" includes="LICENSE*, README*"></fileset>
+ </copy>
+ </target>
+ <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
+ <fail message="There were test failures."></fail>
+ </target>
+ <target name="internal-test" if="test" depends="junit-present,compile-tests">
+ <mkdir dir="${testreportdir}"></mkdir>
+ <junit dir="${basedir}" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
+ <sysproperty key="basedir" value="."></sysproperty>
+ <formatter type="xml"></formatter>
+ <formatter usefile="false" type="plain"></formatter>
+ <classpath>
+ <path refid="build.classpath"></path>
+ <pathelement path="${testclassesdir}"></pathelement>
+ <pathelement path="${classesdir}"></pathelement>
+ </classpath>
+ <batchtest todir="${testreportdir}">
+ <fileset dir="${basedir}/src/test">
+ <include name="**/Uber*.*"></include>
+ <exclude name="**/SignedJarTest.*"></exclude>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+ <target name="junit-present" unless="test" depends="init">
+ <echo>================================= WARNING ================================</echo>
+ <echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
+ <echo>==========================================================================</echo>
+ </target>
+ <target name="compile-tests" if="test" depends="junit-present,compile">
+ <mkdir dir="${testclassesdir}"></mkdir>
+ <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
+ <src>
+ <pathelement location="${basedir}/src/test"></pathelement>
+ </src>
+ <classpath>
+ <path refid="build.classpath"></path>
+ <pathelement path="${classesdir}"></pathelement>
+ </classpath>
+ </javac>
+ <copy todir="${testclassesdir}">
+ <fileset dir="${basedir}/src/test">
+ <include name="**/*.properties"></include>
+ <include name="**/*.xml"></include>
+ <include name="**/*.xsd"></include>
+ </fileset>
+ </copy>
+ <copy todir="${testclassesdir}">
+ <fileset dir="${basedir}/src/test">
+ <include name="**/*.*"></include>
+ <include name="**/groovy*"></include>
+ </fileset>
+ </copy>
+ </target>
+ <target name="javadoc" description="o Generate javadoc" depends="">
+ <mkdir dir="${javadocdir}"></mkdir>
+ <tstamp>
+ <format pattern="2003-yyyy" property="year"></format>
+ </tstamp>
+ <property name="copyright" value="Copyright &copy; The Codehaus. All Rights Reserved."></property>
+ <property name="title" value="groovy 1.0-RC-01 API"></property>
+ <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="${basedir}/src/main" packagenames=".*">
+ <classpath>
+ <path refid="build.classpath"></path>
+ </classpath>
+ </javadoc>
+ </target>
+</project>
--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/groovy/groovy-1.0_rc01.ebuild,v 1.1 2006/12/29 17:37:16 nichoj Exp $
+
+inherit versionator java-pkg-2 java-ant-2
+
+MY_PV=${PV/_rc/-RC-}
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Groovy is a high-level dynamic language for the JVM"
+HOMEPAGE="http://groovy.codehaus.org/"
+SRC_URI="http://dist.codehaus.org/groovy/distributions/${MY_P/JSR/jsr}-src.tar.gz"
+LICENSE="codehaus-groovy"
+SLOT="1"
+KEYWORDS="~amd64 ~x86"
+IUSE="source"
+
+COMMON_DEPS="
+ =dev-java/asm-2.2*
+ >=dev-java/antlr-2.7.5
+ >=dev-java/xerces-2.7
+ >=dev-java/ant-core-1.6.5
+ >=dev-java/xstream-1.1.1
+ >=dev-java/junit-3.8.1
+ dev-java/qdox
+ >=dev-java/commons-cli-1.0
+ >=dev-java/bsf-2.3.0_rc1
+ >=dev-java/mockobjects-0.09
+ ~dev-java/servletapi-2.4
+ dev-java/sun-jmx"
+RDEPEND=">=virtual/jre-1.4
+ ${COMMON_DEPS}"
+# FIXME doesn't compile with 1.6 due to JDBC api change
+DEPEND="|| ( =virtual/jdk-1.4* =virtual/jdk-1.5* )
+ ${COMMON_DEPS}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+# epatch ${FILESDIR}/${PN}-1.0.06-compiler-exit-code.patch
+
+ mkdir -p ${S}/target/lib
+
+ cd ${S}/target/lib
+ java-pkg_jar-from commons-cli-1
+ java-pkg_jar-from xerces-2
+ java-pkg_jar-from ant-core ant.jar
+ java-pkg_jar-from antlr
+ java-pkg_jar-from asm-2.2
+ java-pkg_jar-from qdox-1.6
+ java-pkg_jar-from xstream
+ java-pkg_jar-from mockobjects
+ java-pkg_jar-from junit
+ java-pkg_jar-from servletapi-2.4
+ java-pkg_jar-from bsf-2.3
+ java-pkg_jar-from sun-jmx
+
+ cd ${S}
+
+ # We use ant NOT maven. This build.xml is generated using 'maven ant', and
+ # then the following tweaks:
+ # - change build.classpath to use <fileset dir="${libdir}" includes="**/*.jar"/>
+ # instead of using each individual jar
+ # - remove get-deps from the depends of all targets. you should be able to
+ # define -Dnoget=true, but that doesn't really work
+ # - remove all the get-* targets (otherwise, the file is a bit oversized to
+ # be in files/
+ cp ${FILESDIR}/build.xml-${PV} ${S}/build.xml || die "Failed to update build.xml"
+
+ cd src/main
+ # This won't compile without an incestuous relationship with radeox.
+ rm -rf org/codehaus/groovy/wiki
+}
+
+src_compile() {
+ eant -Dnoget=true jar
+
+ # need to compile .groovy files to .class files
+ cd src/main
+ java -classpath ../../target/${MY_P}.jar:$(java-pkg_getjars commons-cli-1,asm-2.2,antlr,junit,qdox-1.6) \
+ org.codehaus.groovy.tools.FileSystemCompiler \
+ $(find -name *.groovy) || die "Failed to invoke groovyc"
+
+ # add the now compiled .class files to our jar
+ jar uf ../../target/${MY_P}.jar $(find -name *.class) || die "Failed to backpatch Console*.class"
+}
+
+src_install() {
+ java-pkg_newjar target/${MY_P}.jar
+ java-pkg_dolauncher "grok" --main org.codehaus.groovy.tools.Grok
+ java-pkg_dolauncher "groovyc" --main org.codehaus.groovy.tools.FileSystemCompiler
+ java-pkg_dolauncher "groovy" --main groovy.ui.GroovyMain
+ java-pkg_dolauncher "groovysh" --main groovy.ui.InteractiveShell
+ java-pkg_dolauncher "groovyConsole" --main groovy.ui.Console
+}