activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r679147 - in /activemq/sandbox/zookeeper: build.xml zookeeper-jute-compiler/src/main/javacc/rcc.jj
Date Wed, 23 Jul 2008 18:03:45 GMT
Author: chirino
Date: Wed Jul 23 11:03:44 2008
New Revision: 679147

URL: http://svn.apache.org/viewvc?rev=679147&view=rev
Log:
ok the ant build is now working again.

Modified:
    activemq/sandbox/zookeeper/build.xml
    activemq/sandbox/zookeeper/zookeeper-jute-compiler/src/main/javacc/rcc.jj

Modified: activemq/sandbox/zookeeper/build.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/zookeeper/build.xml?rev=679147&r1=679146&r2=679147&view=diff
==============================================================================
--- activemq/sandbox/zookeeper/build.xml (original)
+++ activemq/sandbox/zookeeper/build.xml Wed Jul 23 11:03:44 2008
@@ -38,7 +38,7 @@
     <property name="distribution" value="${basedir}/distribution" />
     <property name="jute_generated.dir" value="${basedir}/zookeeper-jute-compiler/target/generated-sources/javacc"
/>
     <property name="src_generated.dir" value="${basedir}/zookeeper-core/target/generated-sources/jute"
/>
-    <property name="c.src.dir" value="${src.dir}/zookeeper-c" />    
+    <property name="c.src.dir" value="${basedir}/zookeeper-c" />    
     <property name="csrc_generated.dir" value="${c.src.dir}/generated" />
     <property name="build.classes" value="${build.dir}/classes" />
     <property name="jar.name" value="zookeeper-dev.jar" />
@@ -82,12 +82,6 @@
             <format property="build.time" pattern="MM/dd/yyyy HH:mm zz" timezone="GMT"/>
             <format property="year" pattern="yyyy" timezone="GMT"/>
         </tstamp>
-        <condition property="extra.src.dir" value="${jmx.src.dir}">
-            <and>
-                <equals arg1="${target.jdk}" arg2="1.6"/>
-                <available file="${jmx.src.dir}" type="dir"/>
-            </and>
-        </condition>
         <path id="project.classpath">
             <fileset dir="${build.classes}" />
             <pathelement path="${lib.dir}/log4j-1.2.15.jar" />
@@ -104,7 +98,6 @@
                 outputdirectory="${jute_generated.dir}/org/apache/jute/compiler/generated"/>
                 
         <!-- Now compile it all -->
-        <javac srcdir="${basedir}/zookeeper-jute/src/main/java"  />
         <javac destdir="${build.classes}" target="${target.jdk}" debug="on">
           <src path="${basedir}/zookeeper-jute/src/main/java"/>
           <src path="${basedir}/zookeeper-jute-compiler/src/main/java"/>
@@ -116,6 +109,7 @@
     </target>
 
     <target name="compile_jute_uptodate">
+        <mkdir dir="${src_generated.dir}" />
         <uptodate property="juteBuild.notRequired"
                   srcfile="${jute.file}"
                   targetfile="${src_generated.dir}/.generated"/>
@@ -124,10 +118,11 @@
     <target name="compile_jute" depends="jute,compile_jute_uptodate" unless="juteBuild.notRequired">
         <mkdir dir="${src_generated.dir}" />
         <mkdir dir="${csrc_generated.dir}" />
+        
         <java classname="org.apache.jute.compiler.generated.Rcc" fork="true" dir="${src_generated.dir}">
             <arg value="-l" />
             <arg value="java" />
-            <arg value="../../../zookeeper.jute" /> 
+            <arg value="${basedir}/zookeeper.jute" /> 
             <classpath>
                 <pathelement path="${build.classes}" />
             </classpath>
@@ -136,13 +131,14 @@
         <java classname="org.apache.jute.compiler.generated.Rcc" fork="true" dir="${csrc_generated.dir}">
             <arg value="-l" />
             <arg value="c" />
-            <arg value="../../../zookeeper.jute" />
+            <arg value="${basedir}/zookeeper.jute" />
             <classpath>
                 <pathelement path="${build.classes}" />
             </classpath>
         </java>
-
+<!--
         <touch file="${src_generated.dir}/.generated"/>
+      -->
     </target>
 
     <target name="ver-gen" depends="init">
@@ -161,8 +157,7 @@
     
     <target name="version-info" depends="ver-gen,svn-revision">
         <mkdir dir="${src_generated.dir}" />
-        <java classname="org.apache.zookeeper.version.util.VerGen" fork="true" 
-                dir="${src_generated.dir}">
+        <java classname="org.apache.zookeeper.version.util.VerGen" fork="true" dir="${src_generated.dir}">
             <arg value="${version}" />
             <arg value="${lastRevision}" />
             <arg value="${build.time}" />
@@ -171,35 +166,22 @@
             </classpath>
         </java>
     </target>
-    
-    <target name="build-generated" depends="compile_jute,version-info" >
-        <javac srcdir="${src_generated.dir}" destdir="${build.classes}" 
-            target="${target.jdk}" debug="on" />
-    </target>
-    
-    <target name="compile-extra" depends="compile-main" if="extra.src.dir">
-         <javac srcdir="${extra.src.dir}" destdir="${build.classes}" 
-                target="${target.jdk}" debug="on">
-            <classpath refid="project.classpath"/>
-        </javac>
-        <copy todir="${build.classes}">
-            <fileset dir="${extra.src.dir}"/>
-        </copy>
-   </target>
-    
-    <target name="compile-main" depends="build-generated">
-        <javac srcdir="${java.src.dir}" destdir="${build.classes}" 
-               target="${target.jdk}" debug="on">
-            <classpath refid="project.classpath"/>
+        
+    <target name="compile" depends="compile_jute,version-info">
+        <javac destdir="${build.classes}" target="${target.jdk}" debug="on">
+          <src path="${java.src.dir}"/>
+          <src path="${src_generated.dir}"/>
+          <src path="${jmx.src.dir}"/>
+          <classpath refid="project.classpath"/>
         </javac>
+        
         <copy todir="${build.classes}">
             <fileset dir="${java.src.dir}"/>
             <fileset dir="${src_generated.dir}"/>
+            <fileset dir="${jmx.src.dir}"/>
         </copy>
     </target>
 
-    <target name="compile" depends="compile-main,compile-extra"/>
-
     <target name="test-classpath">
       <path id="test.classpath">
         <fileset dir="${basedir}">
@@ -346,6 +328,12 @@
         <delete file="${jar.name}" />
         <delete dir="${distribution}"/>
         <delete dir="${revision.dir}"/>
+        <delete dir="${basedir}/zookeeper-c/target"/>
+        <delete dir="${basedir}/zookeeper-core/target"/>
+        <delete dir="${basedir}/zookeeper-all/target"/>
+        <delete dir="${basedir}/zookeeper-jmx/target"/>
+        <delete dir="${basedir}/zookeeper-jute/target"/>
+        <delete dir="${basedir}/zookeeper-jute-compiler/target"/>
         <delete>
             <fileset dir="${basedir}" includes="*.jar,*.tar.gz"/>
         </delete>

Modified: activemq/sandbox/zookeeper/zookeeper-jute-compiler/src/main/javacc/rcc.jj
URL: http://svn.apache.org/viewvc/activemq/sandbox/zookeeper/zookeeper-jute-compiler/src/main/javacc/rcc.jj?rev=679147&r1=679146&r2=679147&view=diff
==============================================================================
--- activemq/sandbox/zookeeper/zookeeper-jute-compiler/src/main/javacc/rcc.jj (original)
+++ activemq/sandbox/zookeeper/zookeeper-jute-compiler/src/main/javacc/rcc.jj Wed Jul 23 11:03:44
2008
@@ -62,7 +62,7 @@
         }
         for (int i=0; i<recFiles.size(); i++) {
             curFileName = (String) recFiles.get(i);
-            File file = new File(curDir, curFileName);
+            File file = new File(curFileName);
             try {
                 curFile = parseFile(file);
             } catch (FileNotFoundException e) {
@@ -83,7 +83,7 @@
     }
 
     public static JFile parseFile(File file) throws FileNotFoundException, ParseException
{
-        curDir = file.getPath();
+        curDir = file.getParent();
         curFileName = file.getName();
         FileReader reader = new FileReader(file);
         try {



Mime
View raw message