| <?xml version="1.0"?> |
| <project name="groovyparser" default="default"> |
| |
| <!-- project generated by http://megg.sf.net --> |
| <!-- author Jeremy.Rayner@bigfoot.com --> |
| |
| <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --> |
| <!-- compile settings --> |
| <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --> |
| <property name="build.debug" value="on"/> |
| <property name="version.number" value="0.0.2"/> |
| |
| <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --> |
| <!-- directories --> |
| <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --> |
| <property name="src.dir" value="src"/> |
| <property name="generated.src.dir" value="srcgen"/> |
| <property name="build.dir" value="build"/> |
| <property name="build.classes.dir" value="${build.dir}/classes"/> |
| <property name="dist.dir" value="dist"/> |
| <property name="lib.dir" value="lib"/> |
| <property name="standalone.dir" value="standalone"/> |
| <property name="standalone.working.dir" value="temp"/> |
| |
| <!-- TODO limit exposure to groovy classic --> |
| <property name="groovy.classic.dir" value="../../../../groovy-core/target/install"/> |
| <property name="groovy.classic.lib.dir" value="${groovy.classic.dir}/embeddable"/> |
| <property name="groovy.classic.ext.lib.dir" value="${groovy.classic.dir}/lib"/> |
| |
| <!-- javadoc properties --> |
| <property name="javadoc.dir" value="doc"/> |
| <property name="javadoc.packages" value="org.*"/> |
| |
| <!-- junit properties --> |
| <property name="test.src.dir" value="test"/> |
| <property name="test.classes.dir" value="${build.dir}/test/classes"/> |
| <property name="test.reports.dir" value="reports"/> |
| |
| <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --> |
| <!-- datatypes --> |
| <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --> |
| <path id="compile.classpath"> |
| <pathelement location="${build.classes.dir}"/> |
| <fileset dir="${lib.dir}"> |
| <include name="**/*.jar" /> |
| <include name="**/*.zip" /> |
| </fileset> |
| |
| <!-- TODO limit exposure to groovy classic --> |
| <fileset dir="${groovy.classic.lib.dir}"> |
| <include name="**/*.jar" /> |
| </fileset> |
| </path> |
| |
| <path id="test.classpath"> |
| <path refid="compile.classpath"/> |
| <pathelement location="${test.classes.dir}"/> |
| <fileset dir="${groovy.classic.ext.lib.dir}"> |
| <include name="**/*.jar" /> |
| </fileset> |
| </path> |
| |
| |
| <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --> |
| <!-- targets --> |
| <!-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --> |
| <target name="default" |
| depends="dist" |
| description="default: build everything" |
| /> |
| |
| <target name="all" |
| depends="test,dist" |
| description="build and test everything" |
| /> |
| |
| <target name="clean" description="remove all built files"> |
| <delete dir="${test.reports.dir}"/> |
| <delete dir="${standalone.dir}"/> |
| <delete dir="${javadoc.dir}" /> |
| <delete dir="${generated.src.dir}" /> |
| <delete dir="${build.dir}" /> |
| <delete dir="${dist.dir}" /> |
| </target> |
| |
| <target name="dist" |
| depends="compile" |
| description="create distributables (jars etc)"> |
| <mkdir dir="${dist.dir}" /> |
| <jar jarfile="${dist.dir}/groovy-jsr-${version.number}.jar" |
| manifest="${src.dir}/manifest.txt"> |
| <fileset dir="${build.classes.dir}"/> |
| </jar> |
| </target> |
| |
| <target name="docs" depends="generate" description="generate documentation"> |
| <mkdir dir="${javadoc.dir}" /> |
| |
| <antlr target="${src.dir}/org/codehaus/groovy/antlr/groovy.g" |
| html="true" |
| outputdirectory="${javadoc.dir}"> |
| <classpath> |
| <fileset dir="${lib.dir}"> |
| <include name="**/*.jar"/> |
| </fileset> |
| </classpath> |
| </antlr> |
| <move file="doc/GroovyLexer.txt" tofile="doc/GroovyLexer.html" failonerror="No"/> |
| |
| <copy todir="${generated.src.dir}"> |
| <fileset dir="${src.dir}"/> |
| </copy> |
| |
| <javadoc sourcepath="${generated.src.dir}" |
| destdir="${javadoc.dir}" |
| packagenames="${javadoc.packages}" |
| classpathref="compile.classpath" |
| use="true" |
| windowtitle="groovyc" |
| private="true"/> |
| </target> |
| |
| <target name="test" |
| depends="test-compile" |
| description="run all test cases"> |
| <junit haltonfailure="true" fork="yes"> |
| <classpath refid="test.classpath"/> |
| <formatter type="plain" usefile="false"/> |
| <batchtest> |
| <fileset dir="${test.src.dir}"> |
| <include name="**/*Test.java" /> |
| </fileset> |
| </batchtest> |
| </junit> |
| </target> |
| |
| <target name="test-classic" |
| depends="test-compile" |
| description="run all the classic test cases"> |
| <junit haltonfailure="true" fork="yes"> |
| <classpath refid="test.classpath"/> |
| <formatter type="plain" usefile="false"/> |
| <batchtest> |
| <fileset dir="${test.src.dir}"> |
| <include name="**/AllTests.java" /> |
| </fileset> |
| </batchtest> |
| </junit> |
| </target> |
| |
| <target name="pretty-test" |
| depends="test-compile" |
| description="HTML output of test cases"> |
| <mkdir dir="${test.reports.dir}"/> |
| <junit haltonfailure="false" fork="yes"> |
| <classpath refid="test.classpath"/> |
| <formatter type="xml" usefile="true"/> |
| |
| <batchtest todir="${test.reports.dir}"> |
| <fileset dir="${test.src.dir}"> |
| <include name="**/*Test.java" /> |
| </fileset> |
| </batchtest> |
| |
| </junit> |
| |
| <junitreport todir="${test.reports.dir}"> |
| <fileset dir="${test.reports.dir}"> |
| <include name="TEST-*.xml"/> |
| </fileset> |
| <report format="frames" todir="${test.reports.dir}"/> |
| </junitreport> |
| </target> |
| |
| <target name="standalone" depends="dist" description="merge all jars together"> |
| <mkdir dir="${standalone.working.dir}"/> |
| <unzip dest="${standalone.working.dir}"> |
| <fileset dir="${lib.dir}"> |
| <include name="*.jar"/> |
| </fileset> |
| <fileset dir="${dist.dir}"> |
| <include name="*.jar"/> |
| </fileset> |
| </unzip> |
| <copy todir="${standalone.working.dir}"> |
| <fileset dir="licenses"/> |
| </copy> |
| <mkdir dir="standalone"/> |
| <jar jarfile="standalone/groovy-jsr-${version.number}.jar" |
| manifest="${src.dir}/manifest.txt"> |
| <fileset dir="${standalone.working.dir}"/> |
| </jar> |
| <delete dir="${standalone.working.dir}"/> |
| </target> |
| |
| |
| |
| <target name="generate" depends="init" description="generate sources from a grammar file"> |
| <mkdir dir="${generated.src.dir}/org/codehaus/groovy/antlr"/> |
| <antlr target="${src.dir}/org/codehaus/groovy/antlr/groovy.g" |
| outputdirectory="${generated.src.dir}/org/codehaus/groovy/antlr"> |
| <classpath> |
| <fileset dir="${lib.dir}"> |
| <include name="**/*.jar"/> |
| </fileset> |
| </classpath> |
| </antlr> |
| </target> |
| |
| <target name="compile" depends="generate" description="compile java"> |
| <mkdir dir="${build.classes.dir}" /> |
| <copy todir="${generated.src.dir}"> |
| <fileset dir="${src.dir}"/> |
| </copy> |
| <javac srcdir="${generated.src.dir}" |
| destdir="${build.classes.dir}" |
| classpathref="compile.classpath" |
| debug="${build.debug}" |
| deprecation="on"/> |
| </target> |
| |
| <target name="test-compile" depends="compile" description="compile tests"> |
| <mkdir dir="${test.classes.dir}" /> |
| <javac srcdir="${test.src.dir}" |
| destdir="${test.classes.dir}" |
| classpathref="test.classpath" |
| debug="${build.debug}" |
| deprecation="on"/> |
| </target> |
| |
| <target name="init"> |
| <tstamp /> |
| <mkdir dir="${lib.dir}"/> |
| </target> |
| |
| </project> |