qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kp...@apache.org
Subject svn commit: r491879 - in /incubator/qpid/trunk/qpid/java/common: pom.xml protocol-version.xml
Date Tue, 02 Jan 2007 18:19:59 GMT
Author: kpvdr
Date: Tue Jan  2 10:19:58 2007
New Revision: 491879

URL: http://svn.apache.org/viewvc?view=rev&rev=491879
Log:
Added automatic build of generator; added dependency check on source XML files that prevents
generation if not needed

Modified:
    incubator/qpid/trunk/qpid/java/common/pom.xml
    incubator/qpid/trunk/qpid/java/common/protocol-version.xml

Modified: incubator/qpid/trunk/qpid/java/common/pom.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/pom.xml?view=diff&rev=491879&r1=491878&r2=491879
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/pom.xml (original)
+++ incubator/qpid/trunk/qpid/java/common/pom.xml Tue Jan  2 10:19:58 2007
@@ -39,6 +39,7 @@
         <generated.path>${project.build.directory}/generated-sources/xsl</generated.path>
         <generated.package>org/apache/qpid/framing</generated.package>
         <generated.dir>${generated.path}/${generated.package}</generated.dir>
+        <generated.timestamp>${generated.dir}/timestamp</generated.timestamp>
         <specs.dir>${topDirectoryLocation}/../specs</specs.dir>
         <cluster.asl>${basedir}/src/main/xsl/cluster.asl</cluster.asl>
     </properties>
@@ -57,6 +58,9 @@
                                 <ant antfile="protocol-version.xml">
 									<property name="gentools.home" value="${gentools.home}"/>
                                     <property name="generated.dir" value="${generated.dir}"/>
+                                    <property name="generated.timestamp" value="${generated.timestamp}"/>
+                                    <property name="xml.spec.dir" value="${specs.dir}"/>
+                                    <property name="xml.spec.deps" value="amqp.0-8.xml
cluster.0-8.xml"/>
                                     <property name="xml.spec.list" value="${specs.dir}/amqp.0-8.xml
${specs.dir}/cluster.0-8.xml"/>
                                 </ant>
                             </tasks>

Modified: incubator/qpid/trunk/qpid/java/common/protocol-version.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/protocol-version.xml?view=diff&rev=491879&r1=491878&r2=491879
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/protocol-version.xml (original)
+++ incubator/qpid/trunk/qpid/java/common/protocol-version.xml Tue Jan  2 10:19:58 2007
@@ -19,14 +19,23 @@
  -
  -->
 <project name="Qpid Common Protocol Versions" default="generate">
-
-  <target name="generate">
+  	
+  <target name="generate" depends="compile_generator,check_generate_deps" unless="generation.notRequired">
     <mkdir dir="${generated.dir}"/>
-    <exec dir="${gentools.home}/src" executable="pwd" />
-    <echo>XML files to be processed: ${xml.spec.list}</echo>
     <java classname="org.apache.qpid.gentools.Main" fork="true" dir="${gentools.home}/src">
-    	<arg line="-j -o ${generated.dir} -t ${gentools.home}/templ.java ${xml.spec.list}"/>
+    	<arg line="-j -o ${generated.dir} -t ${gentools.home}/templ.java ${xml.spec.list}"
/>
     </java>
+    <touch file="${generated.timestamp}" />
+  </target>
+
+  <target name="check_generate_deps">
+	<uptodate property="generation.notRequired" targetfile="${generated.timestamp}">
+  	  <srcfiles dir="${xml.spec.dir}" includes="${xml.spec.deps}" />
+	</uptodate>
+  </target>
+  
+  <target name="compile_generator">
+  	<ant dir="${gentools.home}" />
   </target>
 
   <target name="precompile" depends="generate"/>



Mime
View raw message