blob: 93f2860e4091591e5610f4a22c01349f1383da51 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project default="default"
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:maven="jelly:maven"
>
<!-- ==================== -->
<!-- Default Global Goals -->
<!-- ==================== -->
<goal name="default">
<attainGoal name="jar:install-snapshot"/>
</goal>
<goal name="build">
<attainGoal name="default"/>
</goal>
<goal name="rebuild">
<attainGoal name="clean"/>
<attainGoal name="build"/>
</goal>
<preGoal name="java:compile">
<attainGoal name="antlr.compile"/>
</preGoal>
<postGoal name="clean:clean">
<attainGoal name="antlr.clean"/>
</postGoal>
<goal name="clobber" prereqs="clean">
<delete>
<fileset dir="." defaultexcludes="no" includes="**/*~"/>
</delete>
</goal>
<!-- ============= -->
<!-- ANTLR support -->
<!-- ============= -->
<preGoal name="antlr.compile">
<condition property="antlr.required">
<not>
<and>
<uptodate targetfile="${jdo.antlr.src.dir}/JDOQLParser.java"
srcfile="${jdo.antlr.src.dir}/JDOQL.g" />
<uptodate targetfile="${jdo.antlr.src.dir}/Semantic.java"
srcfile="${jdo.antlr.src.dir}/Semantic.g" />
<uptodate targetfile="${jdo.antlr.src.dir}/Optimizer.java"
srcfile="${jdo.antlr.src.dir}/Optimizer.g" />
</and>
</not>
</condition>
</preGoal>
<goal name="antlr.compile">
<j:if test="${antlr.required}">
<java dir="${jdo.antlr.src.dir}" classname="antlr.Tool" fork="yes">
<arg value="JDOQL.g"/>
<classpath refid="maven.dependency.classpath"/>
</java>
<java dir="${jdo.antlr.src.dir}" classname="antlr.Tool" fork="yes">
<arg value="Semantic.g"/>
<classpath refid="maven.dependency.classpath"/>
</java>
<java dir="${jdo.antlr.src.dir}" classname="antlr.Tool" fork="yes">
<arg value="Optimizer.g"/>
<classpath refid="maven.dependency.classpath"/>
</java>
</j:if>
</goal>
<goal name="antlr.clean">
<delete>
<fileset dir="${jdo.antlr.src.dir}"
includes="JDOQLLexer.java, JDOQLParser.java, Semantic*.java,
Optimizer*.java, *TokenTypes.*"/>
</delete>
</goal>
</project>