avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r898556 - in /hadoop/avro/trunk: CHANGES.txt build.sh lang/java/lib/pyAntTasks-1.3-LICENSE.txt lang/java/lib/pyAntTasks-1.3.jar lang/py/build.xml lang/py/lib/pyAntTasks-1.3-LICENSE.txt lang/py/lib/pyAntTasks-1.3.jar
Date Tue, 12 Jan 2010 22:38:29 GMT
Author: cutting
Date: Tue Jan 12 22:38:28 2010
New Revision: 898556

URL: http://svn.apache.org/viewvc?rev=898556&view=rev
Log:
AVRO-309.  Fix Python build, post-AVRO-163.

Added:
    hadoop/avro/trunk/lang/py/lib/pyAntTasks-1.3-LICENSE.txt
      - copied unchanged from r898491, hadoop/avro/trunk/lang/java/lib/pyAntTasks-1.3-LICENSE.txt
    hadoop/avro/trunk/lang/py/lib/pyAntTasks-1.3.jar
      - copied unchanged from r898491, hadoop/avro/trunk/lang/java/lib/pyAntTasks-1.3.jar
Removed:
    hadoop/avro/trunk/lang/java/lib/pyAntTasks-1.3-LICENSE.txt
    hadoop/avro/trunk/lang/java/lib/pyAntTasks-1.3.jar
Modified:
    hadoop/avro/trunk/CHANGES.txt
    hadoop/avro/trunk/build.sh
    hadoop/avro/trunk/lang/py/build.xml

Modified: hadoop/avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=898556&r1=898555&r2=898556&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Tue Jan 12 22:38:28 2010
@@ -200,6 +200,8 @@
     AVRO-282. Improve avroj build to better specify dependencies.
     (philz via cutting)
 
+    AVRO-309. Fix python build, post-AVRO-163. (cutting)
+
   OPTIMIZATIONS
 
     AVRO-172. More efficient schema processing (massie)

Modified: hadoop/avro/trunk/build.sh
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/build.sh?rev=898556&r1=898555&r2=898556&view=diff
==============================================================================
--- hadoop/avro/trunk/build.sh (original)
+++ hadoop/avro/trunk/build.sh Tue Jan 12 22:38:28 2010
@@ -11,7 +11,7 @@
     test)
 	# run lang-specific tests
 	(cd lang/java; ant test)
-	# (cd lang/py; ant test)
+	(cd lang/py; ant test)
 	# (cd lang/c; make test)
 	# (cd lang/c++; make test)
 	;;
@@ -28,7 +28,7 @@
 	# build lang-specific artifacts
 	(cd lang/java; ant dist)
 
-	# (cd lang/py; ant dist)
+	(cd lang/py; ant dist)
 
 	# (cd lang/c; make dist)
 
@@ -45,7 +45,7 @@
 
 	(cd lang/java; ant clean)
 
-	# (cd lang/py; ant clean)
+	(cd lang/py; ant clean)
 
 	# (cd lang/c; make clean)
 

Modified: hadoop/avro/trunk/lang/py/build.xml
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/py/build.xml?rev=898556&r1=898555&r2=898556&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/py/build.xml (original)
+++ hadoop/avro/trunk/lang/py/build.xml Tue Jan 12 22:38:28 2010
@@ -16,801 +16,68 @@
    limitations under the License.
 -->
 
-<project name="Avro" default="compile"
-	 xmlns:ivy="antlib:org.apache.ivy.ant">
+<project name="Avro" default="dist">
  
   <!-- Load user's default properties. -->
   <property file="${user.home}/build.properties" />
 
-  <property name="Org" value="Apache"/>
-  <property name="org" value="apache"/>
-  <property name="Name" value="Avro"/>
-  <property name="name" value="avro"/>
-  <property name="version" value="1.2.0-dev"/>
-  <property name="fullname" value="${name}-${version}"/>
-  <property name="year" value="2009"/>
-
-  <property name="src.dir" value="${basedir}/src"/>  	
-  <property name="build.dir" value="${basedir}/build"/>
-  <property name="java.src.dir" value="${src.dir}/java"/>
-  <property name="c.src.dir" value="${src.dir}/c"/>
-  <property name="c.build.dir" value="${build.dir}/c/obj"/>
-  <property name="cpp.src.dir" value="${src.dir}/c++"/>
-  <property name="cpp.build.dir" value="${build.dir}/c++"/>
-  <property name="lib.dir" value="${basedir}/lib"/>
-  <property name="install.c" value="${build.dir}/c/install"/>
-  <property name="install.cpp" value="${build.dir}/c++/install"/>
-  <property name="dist.dir" value="${build.dir}/${fullname}"/>
-
-  <property name="build.classes" value="${build.dir}/classes"/>
-  <property name="build.doc" value="${build.dir}/doc"/>
-  <property name="build.javadoc" value="${build.doc}/api/java"/>
-  <property name="build.javadoc.log" value="${build.dir}/javadoc.log"/>
-  <property name="build.cdoc" value="${build.doc}/api/c"/>
-  <property name="build.cppdoc" value="${build.doc}/api/cpp"/>
-
-  <exec executable="sed" inputstring="${os.name}" outputproperty="nonspace.os">
-     <arg value="s/ /_/g"/>
-  </exec>
-  <property name="build.platform" 
-            value="${nonspace.os}-${os.arch}-${sun.arch.data.model}"/>
-
-  <property name="test.count" value="100"/>
-  <property name="test.junit.output.format" value="plain"/>
-  <property name="test.java.src.dir" value="${basedir}/src/test/java"/>
-  <property name="test.schemata.dir" value="${basedir}/src/test/schemata"/>
-  <property name="test.genavro.dir" value="${basedir}/src/test/genavro"/>
-  <property name="test.genavro.mode" value="run" />
-  <property name="test.java.build.dir" value="${build.dir}/test"/>
-  <property name="test.java.generated.build.dir" value="${test.java.build.dir}/generated"/>
-  <property name="test.java.generated.dir" value="${test.java.generated.build.dir}/src"/>
-  <property name="test.java.classes" value="${test.java.build.dir}/classes"/>
-  <property name="test.java.generated.classes" value="${test.java.generated.build.dir}/classes"/>
-  <property name="test.java.include" value="Test*"/>
-
-  <property name="javadoc.link.java"
-	    value="http://java.sun.com/javase/6/docs/api/"/>
-  <property name="javadoc.link.jackson"
-	    value="http://jackson.codehaus.org/0.9.3/javadoc/"/>
-  <property name="javadoc.link.servlet"
-	    value="http://java.sun.com/products/servlet/2.3/javadoc/"/>
-  <property name="javadoc.packages" value="org.${org}.${name}.*"/>
-
-  <property name="javac.encoding" value="ISO-8859-1"/>
-  <property name="javac.debug" value="on"/>
-  <property name="javac.optimize" value="on"/>
-  <property name="javac.deprecation" value="off"/>
-  <property name="javac.version" value="1.6"/>
-  <property name="javac.args" value=""/>
-  <property name="javac.args.warnings" value="-Xlint:unchecked"/>
-
-  <property name="ivy.version" value="2.1.0-rc1"/>
-  <property name="ivy.url"
-	    value="http://repo2.maven.org/maven2/org/apache/ivy/ivy" />
-  <property name="ivy.home" value="${user.home}/.ant" />
-  <property name="ivy.lib" value="${build.dir}/lib"/>
-  <property name="ivy.test.lib" value="${build.dir}/test/lib"/>
-
-  <!-- Eclipse properties -->
-  <property name="build.dir.eclipse" value=".eclipse"/>
-  <property name="build.dir.eclipse-main-classes" value="${build.dir.eclipse}/classes-main"/>
-  <property name="build.dir.eclipse-main-generated-classes" value="${build.dir.eclipse}/classes-main-generated"/>
-  <property name="build.dir.eclipse-test-classes" value="${build.dir.eclipse}/classes-test"/>
-
-  <!-- the normal classpath -->
-  <path id="libs">
-    <fileset dir="${ivy.lib}">
-      <include name="**/*.jar" />
-    </fileset>
-  </path>
+  <property name="share.dir" value="${basedir}/../../share"/>
+  <property name="dist.dir" value="${basedir}/../../dist"/>
 
-  <path id="java.classpath">
-    <pathelement location="${build.classes}"/>
-    <fileset dir="${lib.dir}">
-      <include name="**/*.jar" />
-      <exclude name="**/excluded/" />
-    </fileset>
-    <fileset dir="${ant.home}/lib">
-      <include name="ant.jar" />
-    </fileset>
-    <path refid="libs" />
-  </path>
+  <loadresource property="version">
+    <file file="${share.dir}/VERSION.txt"/>
+  </loadresource>
+
+  <property name="doc.dir" value="${basedir}/../../build/avro-doc-${version}"/>
 
-  <path id="test.libs">
-    <fileset dir="${ivy.test.lib}">
+  <path id="java.classpath">
+    <fileset dir="lib">
       <include name="**/*.jar" />
     </fileset>
   </path>
 
-  <path id="test.java.classpath">
-    <pathelement location="${test.java.classes}" />
-    <pathelement location="${test.java.generated.classes}" />
-    <path refid="java.classpath"/>
-    <path refid="test.libs"/>
+  <path id="test.path">
+    <pathelement location="${basedir}/src"/>
+    <pathelement location="${basedir}/test"/>
+    <pathelement location="${basedir}/lib"/>
   </path>
 
   <target name="init">
-    <mkdir dir="${build.dir}"/>
-    <mkdir dir="${build.classes}"/>
- 
-    <mkdir dir="${test.java.build.dir}"/>
-    <mkdir dir="${test.java.classes}"/>
-    <mkdir dir="${test.java.generated.classes}"/>
-
-    <mkdir dir="${ivy.lib}"/>
-    <mkdir dir="${ivy.test.lib}"/>
-    <condition property="ivy.jar.exists">
-      <available file="${lib.dir}/ivy-${ivy.version}.jar"/>
-    </condition>
-  </target>
-
-  <target name="compile" depends="compile-java,compile-c,compile-cpp"/>
-
-  <target name="javacc" depends="ivy-retrieve">
-    <mkdir dir="${build.dir}/src/org/apache/avro/genavro"/>
-    <copy tofile="${ivy.lib}/javacc.jar" file="${ivy.lib}/javacc-5.0.jar"
-        overwrite="true"/>
-    <javacc target="${src.dir}/java/org/apache/avro/genavro/genavro.jj"
-            outputdirectory="${build.dir}/src/org/apache/avro/genavro"
-            javacchome="${ivy.lib}"/>
-  </target>
-
-  <target name="compile-java" depends="javacc,schemata,ivy-retrieve">
-    <java-compiler
-       excludes="**/ipc/** **/*Requestor.java **/*Responder.java **/tool/**">
-      <src path="${build.dir}/src"/>
-      <src path="${java.src.dir}"/>
-    </java-compiler>
-    <java-avro-compiler/>
-    <java-compiler>
-      <src path="${build.dir}/src"/>
-      <src path="${java.src.dir}"/>
-    </java-compiler>
-  </target>
-
-  <target name="ivy-download" unless="ivy.jar.exists" depends="init">
-    <delete dir="${lib.dir}"
-	    includes="ivy-*.jar" excludes="ivy-${ivy.version}.jar"/>
-    <get src="${ivy.url}/${ivy.version}/ivy-${ivy.version}.jar"
-         dest="${lib.dir}/ivy-${ivy.version}.jar" usetimestamp="true"/>
-  </target>
-
-  <target name="ivy-init" depends="ivy-download" unless="ivy.initialized">
-    <taskdef resource="org/apache/ivy/ant/antlib.xml"
-             uri="antlib:org.apache.ivy.ant" classpathref="java.classpath"/>
-    <!-- ensure that ivy taskdef is only run once, otw ant will error -->
-    <property name="ivy.initialized" value="true"/>
-  </target>
-
-  <target name="ivy-retrieve" depends="init,ivy-init">
-    <ivy:retrieve type="jar" conf="default"
-		  pattern="${ivy.lib}/[artifact]-[revision].[ext]"/>
-  </target>
-
-  <target name="ivy-retrieve-test" depends="init,ivy-init">
-    <ivy:retrieve type="jar" conf="test"
-		  pattern="${ivy.test.lib}/[artifact]-[revision].[ext]"/>
-  </target>
-
-  <macrodef name="java-compiler">
-    <attribute name="dest" default="${build.classes}"/>
-    <attribute name="includes" default="**/*.java"/>
-    <attribute name="excludes" default=""/>
-    <attribute name="classpath" default="java.classpath"/>
-    <element name="src" implicit="yes"/>
-    <sequential>
-      <javac 
-	 destdir="@{dest}"
-         includes="@{includes}"
-         excludes="@{excludes}" 
-	 encoding="${javac.encoding}" 
-	 debug="${javac.debug}"
-	 optimize="${javac.optimize}"
-	 target="${javac.version}"
-	 source="${javac.version}"
-	 deprecation="${javac.deprecation}">
-	<compilerarg line="${javac.args} ${javac.args.warnings}" />
-	<classpath refid="@{classpath}"/>
-        <src />
-      </javac>
-    </sequential>
-  </macrodef>
-
-  <target name="schemata" depends="init">
-    <mkdir dir="${build.dir}/src/org/apache/avro/ipc"/>
-    <mapper id="m4toavsc" type="glob" from="*.m4" to="${build.dir}/src/*.avsc"/>
-    <apply executable="m4" dir="${src.dir}/schemata">
-      <fileset dir="${src.dir}/schemata" includes="**/*.m4"/>
-      <mapper refid="m4toavsc"/>
-      <redirector><outputmapper refid="m4toavsc"/></redirector>
-    </apply>
-  </target>
-
-  <target name="jar" depends="compile-java" description="Build jar file.">
-    <jar jarfile="${build.dir}/${fullname}.jar"
-         basedir="${build.classes}">
-      <manifest>
-        <section name="org/${org}/${name}">
-          <attribute name="Implementation-Title" value="${Name}"/>
-          <attribute name="Implementation-Version" value="${version}"/>
-          <attribute name="Implementation-Vendor" value="${Org}"/>
-        </section>
-      </manifest>
-    </jar>
-  </target>
-  
-  <target name="checkstyle-java" depends="compile-java">
-    <taskdef resource="checkstyletask.properties">
-      <classpath refid="test.java.classpath" />
-    </taskdef>
-    <checkstyle config="${java.src.dir}/checkstyle.xml"
-		classpathref="test.java.classpath">
-	<fileset dir="${java.src.dir}">
-          <include name="**/*.java"/>
-        </fileset>
-	<fileset dir="${test.java.src.dir}">
-          <include name="**/*.java"/>
-        </fileset>
-    </checkstyle>
-  </target>
-
-  <target name="compile-test-java" depends="ivy-retrieve-test,compile-java">
-    <java-avro-compiler src="${test.schemata.dir}"
-			generated="${test.java.generated.dir}"
-			dest="${test.java.generated.classes}"
-			classpath="test.java.classpath"/>
-    <java-compiler dest="${test.java.classes}"
-		   classpath="test.java.classpath">
-      <src path="${test.java.src.dir}" />
-    </java-compiler>
-    <taskdef
-       name="paranamer" 
-       classname="com.thoughtworks.paranamer.ant.ParanamerGeneratorTask">
-      <classpath refid="java.classpath" />
-    </taskdef>
-    <paranamer sourceDirectory="${test.java.generated.dir}"
-	       outputDirectory="${test.java.generated.classes}"/>
-    <paranamer sourceDirectory="${test.java.src.dir}"
-	       outputDirectory="${test.java.classes}"/>
-  </target>
-
-  <macrodef name="java-avro-compiler">
-    <attribute name="src" default="${build.dir}/src"/>
-    <attribute name="generated" default="${build.dir}/src"/>
-    <attribute name="dest" default="${build.classes}"/>
-    <attribute name="classpath" default="java.classpath"/>
-
-    <sequential>
-      <taskdef name="protocol"
-	       classname="org.apache.avro.specific.ProtocolTask">
-	<classpath refid="java.classpath" />
-      </taskdef>
-      <taskdef name="schema" classname="org.apache.avro.specific.SchemaTask">
-	<classpath refid="java.classpath" />
-      </taskdef>
-
-      <mkdir dir="@{generated}"/>
-      
-      <protocol destdir="@{generated}">
-	<fileset dir="@{src}">
-	  <include name="**/*.avpr" />
-	</fileset>
-      </protocol>
-      
-      <schema destdir="@{generated}">
-	<fileset dir="@{src}">
-	  <include name="**/*.avsc" />
-	</fileset>
-      </schema>
-
-      <java-compiler dest="@{dest}"
-		     classpath="@{classpath}">
-        <src path="@{generated}" />
-      </java-compiler>
-    </sequential>
-  </macrodef>
-
-  <target name="test" depends="test-java,test-py,test-c,test-cpp,test-interop,test-avroj,rat"/>
-
-  <target name="rat" depends="ivy-retrieve-test,package">
-    <typedef resource="org/apache/rat/anttasks/antlib.xml"
-             uri="antlib:org.apache.rat.anttasks">
-      <classpath refid="test.java.classpath"/>
-    </typedef>
-
-    <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
-		reportFile="${build.dir}/rat-report.log">
-      <fileset dir="${dist.dir}" excludesfile="${src.dir}/rat-excludes.txt"/>
-    </rat:report>
-    <condition property="rat.passed">
-      <isfileselected file="${build.dir}/rat-report.log">
-	<containsregexp expression="^0 Unknown Licenses"/>
-      </isfileselected>
-    </condition>
-    <fail unless="rat.passed">Unknown licenses: See build/rat-report.txt.</fail>
-  </target>
-
-  <macrodef name="test-runner">
-    <attribute name="files.location" />
-    <attribute name="tests.pattern" />
-    <sequential>
-      <junit showoutput="yes"
-             printsummary="withOutAndErr"
-             haltonfailure="no"
-             fork="yes" forkMode="once"
-             errorProperty="tests.failed" failureProperty="tests.failed">
-        <sysproperty key="test.count" value="${test.count}"/>
-        <sysproperty key="test.dir" value="${test.java.build.dir}"/>
-        <sysproperty key="test.validate" value="${test.validate}"/>
-        <sysproperty key="test.genavro.dir" value="${test.genavro.dir}" />
-        <sysproperty key="test.genavro.mode" value="${test.genavro.mode}" />
-        <classpath refid="test.java.classpath"/>
-        <formatter type="${test.junit.output.format}"/>
-        <batchtest todir="${test.java.build.dir}" unless="testcase">
-          <fileset dir="@{files.location}"
-		   includes="@{tests.pattern}"
-		   excludes="**/${test.java.exclude}.java" />
-        </batchtest>
-        <batchtest todir="${test.java.build.dir}" if="testcase">
-          <fileset dir="@{files.location}" includes="**/${testcase}.java"/>
-        </batchtest>
-      </junit>
-      <fail if="tests.failed">Tests Failed!</fail>
-    </sequential>
-  </macrodef>
-
-  <target name="test-java" depends="unit-test-java,checkstyle-java,javadoc"
- 	  description="Run java tests" />
-
-  <target name="unit-test-java" depends="compile-test-java"
- 	  description="Run java unit tests">
-    <test-runner files.location="${test.java.src.dir}" tests.pattern="**/${test.java.include}.java"/>
-  </target>
-
-  <path id="test.py.path">
-    <pathelement location="${basedir}/src/py"/>
-    <pathelement location="${basedir}/src/test/py"/>
-    <pathelement location="${basedir}/lib/py"/>
-  </path>
-
-  <target name="init-py" depends="init, schemata">
-    <copy todir="${basedir}/src/py/avro">
-      <fileset dir="${build.dir}/src/org/apache/avro/ipc">
+    <copy todir="${basedir}/src/avro">
+      <fileset dir="${share.dir}/schemas/org/apache/avro/ipc">
       	<include name="**/*.avsc"/>
       </fileset>
     </copy>
   </target>
 
-  <target name="generate-test-data" depends="compile-test-java">
-    <mkdir dir="${test.java.build.dir}/data-files"/>
-  	 <mkdir dir="${test.java.build.dir}/blocking-data-files"/>
-    <java classname="org.apache.avro.RandomData"
-      classpathref="test.java.classpath">
-      <arg value="${basedir}/src/test/schemata/interop.avsc"/>
-      <arg value="${test.java.build.dir}/data-files/test.java.avro"/>
-      <arg value="${test.count}"/>
-    </java>
-  	 <java classname="org.apache.avro.GenerateBlockingData"
-  	      classpathref="test.java.classpath">
-  	      <arg value="${basedir}/src/test/schemata/interop.avsc"/>
-  	      <arg value="${test.java.build.dir}/blocking-data-files/test.java.blocking.avro"/>
-  	      <arg value="${test.count}"/>
-  	 </java>
-  </target>
-
-  <target name="test-py" depends="init-py" description="Run python unit tests">
-    <taskdef name="py-test" classname="org.pyant.tasks.PythonTestTask">
-      <classpath refid="java.classpath" />
-    </taskdef>
-    <py-test python="python" pythonpathref="test.py.path" >
-      <fileset dir="${basedir}/src/test/py">
+  <target name="test" depends="init" description="Run python unit tests">
+    <taskdef name="py-test" classname="org.pyant.tasks.PythonTestTask"
+	     classpathref="java.classpath"/>
+    <py-test python="python" pythonpathref="test.path" >
+      <fileset dir="${basedir}/test">
         <include name="test_*.py"/>
       </fileset>
     </py-test>
   </target>
 
-  <target name="test-interop" depends="test-interop-java,test-interop-c"
-   description="Run multiple languages interoperability tests">
-  </target>
-
-  <target name="test-interop-java"
-    depends="test-interop-data-java,test-interop-rpc-java"
-   description="Run java interoperability tests">
-  </target>
-
-  <target name="test-interop-c"
-    depends="test-interop-data-c"
-   description="Run C interoperability tests">
-  </target>
-
-  <target name="test-interop-data-java" depends="generate-test-data"
-    description="Run java data file interoperability tests">
-    <test-runner files.location="${test.java.classes}" tests.pattern="**/TestDataFile$InteropTest.class"
/>
-  </target>
-
-  <target name="start-rpc-daemons" depends="compile-test-java"
-    description="Start the daemons for rpc interoperability tests">
-    <delete dir="${test.java.build.dir}/server-ports"/>
-    <mkdir dir="${test.java.build.dir}/server-ports"/>
-    <!-- Start the servers. As servers block the ant main thread, these need 
-    to be created in parallel threads--> 
-    <parallel>
-      <daemons>
-        <java classname="org.apache.avro.TestProtocolSpecific$InteropTest">
-          <classpath refid="test.java.classpath"/>
-          <sysproperty key="test.dir" value="${test.java.build.dir}"/>
-        </java>
-      </daemons>
-
-      <!-- Give some time to start -->
-      <sequential>
-        <sleep seconds="2"/>
-      </sequential>
-    </parallel>
-  </target>
-
-  <target name="test-interop-rpc-java" depends="start-rpc-daemons"
-    description="Run java rpc interoperability tests">
-    <test-runner files.location="${test.java.classes}" tests.pattern="**/TestProtocolSpecific$InteropTest.class"
/>
-  </target>
-
-  <target name="avroj" depends="compile-java" description="Build standalone avroj jar
file">
-    <jar jarfile="${build.dir}/avroj-${version}.jar">
-      <manifest>
-        <attribute name="Main-Class" value="org.apache.avro.tool.Main"/>
-        <attribute name="Implementation-Title" value="${Name}"/>
-        <attribute name="Implementation-Version" value="${version}"/>
-        <attribute name="Implementation-Vendor" value="${Org}"/>
-      </manifest>
-      <fileset dir="${build.classes}" />
-      <zipgroupfileset dir="${ivy.lib}" includes="*.jar"/>
-    </jar>
-    <chmod file="${build.dir}/avroj-${version}.jar" perm="ugo+x"/>
-  </target>
-
-  <target name="test-avroj" depends="avroj,compile-test-java"
-   description="Tests avroj commands">
-    <exec executable="${basedir}/src/test/bin/test_avroj.sh"
-          failonerror="true">
-      <env key="AVROJ" value="${build.dir}/avroj-${version}.jar"/>
-      <env key="TMPDIR" value="${test.java.build.dir}/avroj"/>
-    </exec>
-  </target>
-
-  <target name="pydoc" description="Generate python api docs">
-    <taskdef name="py-doc" classname="org.pyant.tasks.PythonDocTask">
-      <classpath refid="java.classpath" />
-    </taskdef>
-    <mkdir dir="${build.doc}/api/py"/>
-    <py-doc python="python" pythonpathref="test.py.path" defaultexcludes="true"
-       destdir="${build.doc}/api/py">
-      <fileset dir="${basedir}/src/py">
-        <include name="**/*"/>
-      </fileset>
+  <target name="doc" description="Generate python api docs">
+    <taskdef name="py-doc" classname="org.pyant.tasks.PythonDocTask"
+	     classpathref="java.classpath"/>
+    <mkdir dir="${doc.dir}/api/py"/>
+    <py-doc python="python" pythonpathref="test.path" defaultexcludes="true"
+       destdir="${doc.dir}/api/py">
+      <fileset dir="${basedir}/src"/>
     </py-doc>
   </target>
 
-  <target name="doc" depends="forrestdoc,javadoc,pydoc,cdoc,cppdoc" description="Generate
docs">
-  </target>
-
-  <target name="forrestdoc" depends="init,forrest.check" description="Generate forrest-based
documentation. To use, specify -Dforrest.home=&lt;base of Apache Forrest installation&gt;
on the command line." if="forrest.home">
-    <echo  file="${build.dir}/avro.ent" append="false">
-      &lt;!ENTITY AvroVersion "${version}"&gt;
-    </echo>
-    <exec executable="${forrest.home}/bin/forrest" failonerror="true">
-      <env key="JAVA_HOME" value="${java5.home}"/>
-      <arg value="-Dproject.content-dir=src/doc"/>
-      <arg value="-Dproject.site=doc"/>
-    </exec>
-  </target>
-
-  <target name="forrest.check" unless="forrest.home" depends="java5.check">
-    <fail message="'forrest.home' is not defined. Please pass -Dforrest.home=&lt;base
of Apache Forrest installation&gt; to Ant on the command-line." />
-  </target>
-
-  <target name="java5.check" unless="java5.home">
-    <fail message="'java5.home' is not defined.  Forrest requires Java 5.  Please pass
-Djava5.home=&lt;base of Java 5 distribution&gt; to Ant on the command-line." />
-  </target>
-
-  <target name="javadoc" depends="compile-java" description="Generate javadoc">
-    <mkdir dir="${build.javadoc}"/>
-    <record name="${build.javadoc.log}" action="start"/>
-    <javadoc
-      overview="${java.src.dir}/overview.html"
-      packagenames="org.${org}.${name}.*"
-      destdir="${build.javadoc}"
-      author="true"
-      version="true"
-      use="true"
-      windowtitle="${Name} ${version} API"
-      doctitle="${Name} ${version} API"
-      bottom="Copyright &amp;copy; ${year} The ${Org} Software Foundation"
-      >
-        <packageset dir="${java.src.dir}"/>
-	
-        <link href="${javadoc.link.java}"/>
-        <link href="${javadoc.link.jackson}"/>
-        <link href="${javadoc.link.servlet}"/>
-
-        <classpath >
-          <path refid="java.classpath" />
-        </classpath>
-
-    </javadoc>
-    <record name="${build.javadoc.log}" action="stop"/>
-    <condition property="javadoc.warnings">
-      <isfileselected file="${build.javadoc.log}">
-	<contains text=": warning - "/>
-      </isfileselected>
-    </condition>
-    <fail if="javadoc.warnings">Javadoc warnings!</fail>
-  </target>
-
-  <target name="package" depends="jar, avroj, doc, package-c, package-cpp"
-	  description="Build distribution">
-    <mkdir dir="${dist.dir}"/>
-    <mkdir dir="${dist.dir}/lib"/>
-    <mkdir dir="${dist.dir}/doc"/>
-
-    <copy todir="${dist.dir}/lib" includeEmptyDirs="false">
-      <fileset dir="lib" excludes="ivy-*.jar"/>
-      <fileset dir="${ivy.lib}"/>
-    </copy>
-
-    <copy todir="${dist.dir}/c" includeEmptyDirs="false">
-      <fileset dir="${install.c}"/>
-    </copy>
-
-    <copy todir="${dist.dir}/c++" includeEmptyDirs="false">
-      <fileset dir="${install.cpp}"/>
-    </copy>
-
-    <copy todir="${dist.dir}"> 
-      <fileset file="${build.dir}/${fullname}.jar"/>
-    </copy>
-
-    <checksum file="${dist.dir}/${fullname}.jar" algorithm="md5"/>
-    <checksum file="${dist.dir}/${fullname}.jar" algorithm="sha1"/>
-
-    <ivy:makepom ivyfile="${basedir}/ivy.xml"
-		 pomfile="${dist.dir}/${fullname}.pom">
-      <mapping conf="default" scope="compile"/>
-      <mapping conf="test" scope="test"/>
-    </ivy:makepom>
-
-    <checksum file="${dist.dir}/${fullname}.pom" algorithm="md5"/>
-    <checksum file="${dist.dir}/${fullname}.pom" algorithm="sha1"/>
-
-    <copy todir="${dist.dir}/doc">
-      <fileset dir="${build.doc}"/>
-    </copy>
-
-    <copy todir="${dist.dir}">
-      <fileset dir=".">
-        <include name="*.txt" />
-      </fileset>
-    </copy>
-
-    <copy todir="${dist.dir}/src" includeEmptyDirs="true">
-      <fileset dir="src"/>
-    </copy>
-
-    <copy todir="${dist.dir}/">
-      <fileset file="build.xml"/>
-      <fileset file="ivy.xml"/>
-    </copy>
-  </target>
-
-  <macrodef name="macro_tar" description="Worker Macro for tar">
-    <attribute name="param.destfile"/>
-    <element name="param.listofitems"/>
-    <sequential>
-      <tar compression="gzip" longfile="gnu"
-      destfile="@{param.destfile}">
-      <param.listofitems/>
-      </tar>
-    </sequential>
-  </macrodef>
-
-  <target name="tar" depends="package" description="Make release tarball">
-    <macro_tar param.destfile="${build.dir}/${fullname}.tar.gz">
-      <param.listofitems>
-        <tarfileset dir="${build.dir}" mode="664">
-          <include name="${fullname}/**" />
-        </tarfileset>
-      </param.listofitems>
-    </macro_tar>
-    <checksum file="${build.dir}/${fullname}.tar.gz" algorithm="md5"/>
-    <checksum file="${build.dir}/${fullname}.tar.gz" algorithm="sha1"/>
+  <target name="dist" depends="doc" description="Build distribution">
   </target>
 
   <target name="clean" description="Delete build files, and their directories">
-    <delete dir="${build.dir}"/>
     <delete>
       <fileset dir="src" includes="**/*.pyc" />
-      <fileset dir="${basedir}/src/py/avro" includes="**/*.avsc"/>
+      <fileset dir="${basedir}/src/avro" includes="**/*.avsc"/>
     </delete>
   </target>
 
-  <!-- C Targets -->
-  <target name="cdoc" depends="configure-c">
-    <mkdir dir="${build.cdoc}"/>
-    <exec dir="${c.build.dir}" executable="make" failonerror="true">
-      <env key="C_DOCS_OUTPUT" value="${build.cdoc}" />
-      <arg line="docs" />
-    </exec>
-  </target>
-
-  <target name="autoreconf-c-check">
-    <uptodate targetfile="${c.src.dir}/configure"
-	      srcfile="${c.src.dir}/configure.in"
-	      property="autoreconf-c-not-needed"/>
-  </target>
-
-  <target name="autoreconf-c" depends="autoreconf-c-check"
-	  unless="autoreconf-c-not-needed">
-    <exec dir="${c.src.dir}" executable="autoreconf" failonerror="true">
-      <arg line="-f -i"/>
-    </exec>
-  </target>
-
-  <target name="configure-c-check">
-    <uptodate targetfile="${c.build.dir}/Makefile"
-	      srcfile="${c.src.dir}/configure"
-	      property="configure-c-not-needed"/>
-  </target>
-
-  <target name="configure-c" depends="autoreconf-c, configure-c-check"
-	  unless="configure-c-not-needed">
-    <mkdir dir="${c.build.dir}" />
-    <exec dir="${c.build.dir}" executable="sh" failonerror="true">
-      <arg line="${c.src.dir}/configure --prefix=${install.c}/${build.platform}"/>
-    </exec>
-  </target>
-
-  <target name="compile-c" depends="init, configure-c">
-    <exec dir="${c.build.dir}" executable="make" failonerror="true"/>
-  </target>
-
-  <target name="test-c" depends="compile-c">
-    <exec dir="${c.build.dir}" executable="make" failonerror="true">
-      <arg value="check"/>
-    </exec>
-  </target>
-
-  <target name="test-interop-data-c" depends="generate-test-data,configure-c"
-    description="Run C data file interoperability tests">
-    <exec dir="${c.build.dir}" executable="make" failonerror="true">
-       <arg value="test_avro_interop"/>
-    </exec>
-    <exec dir="${c.build.dir}" executable="./test_avro_interop" failonerror="true">
-       <env key="srcdir" value="${c.src.dir}" />
-    </exec>
-  </target>
-
-  <target name="package-c" depends="compile-c">
-    <chmod file="${c.src.dir}/config/install-sh" perm="ugo+x"/>
-    <exec dir="${c.build.dir}" executable="make" failonerror="true">
-      <arg value="install"/>
-    </exec>
-  </target>
-
-  <target name="c-makefile-check">
-    <available file="${c.build.dir}/Makefile" property="c-makefile-present"/>
-  </target>
-  <!-- End C Targets -->
-
-  <!-- C++ Targets -->
-  <target name="cppdoc" depends="configure-cpp">
-    <mkdir dir="${build.cppdoc}"/>
-    <exec dir="${cpp.build.dir}" executable="make" failonerror="true">
-      <env key="CPP_DOC_DIR" value="${build.cppdoc}" />
-      <arg line="doc" />
-    </exec>
-  </target>
-
-  <target name="configure-cpp-check">
-    <uptodate targetfile="${cpp.build.dir}/Makefile"
-	      srcfile="${cpp.src.dir}/configure"
-	      property="configure-cpp-not-needed"/>
-  </target>
-
-  <target name="configure-cpp" depends="configure-cpp-check"
-	  unless="configure-cpp-not-needed">
-    <mkdir dir="${cpp.build.dir}" />
-    <exec dir="${cpp.build.dir}" executable="sh" failonerror="true">
-      <arg line="${cpp.src.dir}/configure --prefix=${install.cpp}/${build.platform}"/>
-    </exec>
-  </target>
-
-  <target name="compile-cpp" depends="configure-cpp">
-    <exec dir="${cpp.build.dir}" executable="make" failonerror="true"/>
-  </target>
-
-  <target name="test-cpp" depends="compile-cpp">
-    <exec dir="${cpp.build.dir}" executable="make" failonerror="true">
-      <arg value="check"/>
-    </exec>
-  </target>
-
-  <target name="package-cpp" depends="compile-cpp">
-    <exec dir="${cpp.build.dir}" executable="make" failonerror="true">
-      <arg value="install"/>
-    </exec>
-  </target>
-
-  <target name="cpp-makefile-check">
-    <available file="${cpp.build.dir}/Makefile" property="cpp-makefile-present"/>
-  </target>
-  <!-- End C++ Targets -->
-
-  <!-- Begin Eclipse targets -->
-  <property name="ant-eclipse.dir" value="${build.dir}/ant-eclipse"/>
-  <property name="ant-eclipse.lib.dir" value="${ant-eclipse.dir}/lib"/>
-
-  <available file="${ant-eclipse.lib.dir}/ant-eclipse-1.0-jvm1.2.jar"
-        property="ant-eclipse.jar.exists"/>
-
-  <path id="ant-eclipse.classpath">
-    <fileset dir="${ant-eclipse.lib.dir}">
-      <include name="**/*.jar" />
-    </fileset>
-  </path>
-
-  <target name="ant-eclipse-retrieve" unless="ant-eclipse.jar.exists"
-          depends="ivy-init"
-          description="Retrieves the ant-eclipse binary.">
-    <mkdir dir="${ant-eclipse.lib.dir}"/>
-    <ivy:settings id="ivy.ant-eclipse.settings"
-        file="${basedir}/ivysettings-ant-eclipse.xml" />
-    <ivy:retrieve conf="eclipse"
-        settingsRef="ivy.ant-eclipse.settings"
-		pattern="${build.dir}/[module]-[revision].[ext]"/>
-
-    <untar src="${build.dir}/ant-eclipse-1.0.bz2"
-           dest="${ant-eclipse.dir}" compression="bzip2">
-      <patternset>
-        <include name="lib/ant-eclipse-1.0-jvm1.2.jar"/>
-      </patternset>
-    </untar>
-    <delete file="${build.dir}/ant-eclipse-1.0.bz2" />
-  </target>
-
-  <target name="eclipse" 
-          depends="compile-test-java,ant-eclipse-retrieve"
-          description="Create eclipse project files">
-    <taskdef name="eclipse"
-             classname="prantl.ant.eclipse.EclipseTask"
-             classpathref="ant-eclipse.classpath" />
-    <eclipse updatealways="true">
-      <project name="${ant.project.name}" />
-      <classpath>
-        <!-- Use Eclipse to compile Avro runtime -->
-        <source path="${java.src.dir}"
-                output="${build.dir.eclipse-main-classes}" />
-        <source path="${test.java.src.dir}"
-                output="${build.dir.eclipse-test-classes}" />
-        <!-- Even though these are generated, Eclipse can compile these -->
-        <source path="${build.dir}/src"
-                output="${build.dir.eclipse-main-generated-classes}" />
-        <output path="${build.dir.eclipse-main-classes}" />
-        <!-- Tests require that the generated code has paranamer applied to it,
-             so we use the ant build for that. -->
-        <library path="${test.java.generated.classes}" source="${test.java.generated.dir}"/>
-        <library pathref="libs" exported="true" />
-        <library pathref="test.libs" exported="false" />
-       </classpath>
-    </eclipse>
-  </target>
-
-  <target name="clean-eclipse" description="Clean eclipse files">
-    <delete file=".classpath" />
-    <delete file=".eclipse" />
-    <delete file=".project" />
-    <delete dir=".settings" />
-    <delete dir="${ant-eclipse.lib.dir}" />
-    <delete dir="${build.dir.eclipse}" />
-  </target>
-  <!-- End Eclipse targets -->
-
 </project>



Mime
View raw message