You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2011/11/05 17:08:50 UTC
svn commit: r1197979 - in /commons/proper/configuration/trunk:
build.properties.sample build.xml
Author: oheger
Date: Sat Nov 5 16:08:50 2011
New Revision: 1197979
URL: http://svn.apache.org/viewvc?rev=1197979&view=rev
Log:
[CONFIGURATION-470] Updated Ant build to invoke JavaCC.
Added:
commons/proper/configuration/trunk/build.properties.sample
Modified:
commons/proper/configuration/trunk/build.xml
Added: commons/proper/configuration/trunk/build.properties.sample
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/build.properties.sample?rev=1197979&view=auto
==============================================================================
--- commons/proper/configuration/trunk/build.properties.sample (added)
+++ commons/proper/configuration/trunk/build.properties.sample Sat Nov 5 16:08:50 2011
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+# $Id:$
+
+# Points to the installation of JavaCC.
+javacc_home=D:\\data\\tools\\javacc-5.0
Modified: commons/proper/configuration/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/build.xml?rev=1197979&r1=1197978&r2=1197979&view=diff
==============================================================================
--- commons/proper/configuration/trunk/build.xml (original)
+++ commons/proper/configuration/trunk/build.xml Sat Nov 5 16:08:50 2011
@@ -31,6 +31,9 @@
<property name="src.test.dir" value="src/test/java"/>
<property name="test.resource.dir" value="src/test/resources"/>
<property name="maven.repo.local" value="${user.home}/.m2/repository"/>
+ <property name="src.grammar.dir" value="src/main/javacc"/>
+ <property name="src.grammar.plist.dir" value="org/apache/commons/configuration/plist"/>
+ <property name="build.javacc.dir" value="${build.dir}/generated-sources/javacc"/>
<!-- Check to see if maven.repo.local exists -->
<target name="repo.check">
@@ -112,10 +115,9 @@
<delete dir="${build.dir}"/>
</target>
- <target name="compile" depends="init,get-deps" description="Compile the code">
+ <target name="compile" depends="init,get-deps,javaccgen" description="Compile the code">
<mkdir dir="${build.classes.dir}"/>
<javac destdir="${build.classes.dir}"
- srcdir="${src.java.dir}"
encoding="iso-8859-1"
nowarn="false"
debug="true"
@@ -126,6 +128,8 @@
fork="false"
source="1.5">
<classpath refid="build.classpath"/>
+ <src path="${src.java.dir}"/>
+ <src path="${build.javacc.dir}"/>
</javac>
<mkdir dir="${build.classes.dir}/META-INF"/>
<copy todir="${build.classes.dir}/META-INF">
@@ -218,6 +222,13 @@
</junit>
</target>
+ <target name="javaccgen" description="Generate sources using JavaCC">
+ <mkdir dir="${build.javacc.dir}/${src.grammar.plist.dir}"/>
+ <javacc target="${src.grammar.dir}/PropertyListParser.jj"
+ outputdirectory="${build.javacc.dir}/${src.grammar.plist.dir}"
+ javacchome="${javacc_home}"/>
+ </target>
+
<target name="javadoc" depends="init" description="Generates the Javadoc of the application">
<javadoc packagenames="org.*"
destdir="${build.dir}/apidocs"