cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r159025 - in cocoon/whiteboard/block-deployer: .classpath build.xml
Date Fri, 25 Mar 2005 14:29:39 GMT
Author: reinhard
Date: Fri Mar 25 06:29:38 2005
New Revision: 159025

URL: http://svn.apache.org/viewcvs?view=rev&rev=159025
Log:
adjust eclipse .classpath and buildsystem: new castor version, use castor to generate sources
out of XSD

Modified:
    cocoon/whiteboard/block-deployer/.classpath
    cocoon/whiteboard/block-deployer/build.xml

Modified: cocoon/whiteboard/block-deployer/.classpath
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/.classpath?view=diff&r1=159024&r2=159025
==============================================================================
--- cocoon/whiteboard/block-deployer/.classpath (original)
+++ cocoon/whiteboard/block-deployer/.classpath Fri Mar 25 06:29:38 2005
@@ -4,7 +4,6 @@
 	<classpathentry kind="src" path="src/client"/>
 	<classpathentry kind="src" path="test/junit"/>
 	<classpathentry kind="src" path="src/impl"/>
-	<classpathentry kind="lib" path="lib/castor-0.9.5.3-xml.jar"/>
 	<classpathentry kind="lib" path="tools/lib/asm-1.4.3.jar"/>
 	<classpathentry kind="lib" path="tools/lib/cglib-2.0.1.jar"/>
 	<classpathentry kind="lib" path="lib/xercesImpl-2.6.2.jar"/>
@@ -19,5 +18,9 @@
 	<classpathentry kind="lib" path="lib/geronimo-spec-j2ee-1.0-M1.jar"/>
 	<classpathentry kind="lib" path="tools/lib/jodd-fileutils-0.29.jar"/>
 	<classpathentry kind="lib" path="lib/commons-cli-1.0.jar"/>
+	<classpathentry kind="lib" path="lib/castor-0.9.6-xml.jar"/>
+	<classpathentry kind="lib" path="lib/commons-logging-1.0.4.jar"/>
+	<classpathentry kind="lib" path="build/CocoonBlockDeployer-generated-0.1dev.jar"/>
+	<classpathentry kind="lib" path="lib/jakarta-oro-2.0.8.jar"/>
 	<classpathentry kind="output" path="build/eclipse"/>
 </classpath>

Modified: cocoon/whiteboard/block-deployer/build.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/build.xml?view=diff&r1=159024&r2=159025
==============================================================================
--- cocoon/whiteboard/block-deployer/build.xml (original)
+++ cocoon/whiteboard/block-deployer/build.xml Fri Mar 25 06:29:38 2005
@@ -28,13 +28,16 @@
 		<property name="src.api.dir" value="${src.dir}/api"/>	
 		<property name="src.client.dir" value="${src.dir}/client"/>
 		<property name="src.test.junit.dir" value="./test/junit"/>
+        <property name="src.schema" value="${src.dir}/schema"/>         
 		
 		<property name="build.dir" value="build"/>
 		<property name="build.classes" value="${build.dir}/classes"/>
 		<property name="build.classes.api" value="${build.classes}/api"/>
 		<property name="build.classes.impl" value="${build.classes}/impl"/>		
 		<property name="build.classes.test" value="${build.classes}/test"/>
-		<property name="build.classes.client" value="${build.classes}/client"/>		
+		<property name="build.classes.client" value="${build.classes}/client"/>	
+        <property name="build.generated" value="${build.dir}/generated"/>
+        <property name="build.classes.generated" value="${build.classes}/generated"/>
        
 		<property name="build.test" value="${src.dir}/test"/>
 		<property name="build.test.output" value="${build.dir}/junit-output"/>
 		
@@ -50,31 +53,40 @@
 		<property name="source.vm" value="1.3"/>
 		<property name="target.vm" value="1.3"/>
   
-
+        <path id="classpath-libs">
+            <fileset dir="./lib">
+                <include name="*.jar"/>
+            </fileset>
+        </path> 
+        <path id="tools"> 
+            <path refid="classpath-libs"/>
+            <fileset dir="${tools.lib}">
+                <include name="*.jar"/>
+            </fileset>         
+        </path>   
 		
 	</target>
 	
 	<!-- ************************************************************************************************
-->
 	<!-- compiling -->
-
-	<path id="classpath-libs">
-		<fileset dir="./lib">
-			<include name="*.jar"/>
-		</fileset>
-	</path>	
-
-	<target name="compile" depends="init">
-		<!-- compile the API first to avoid circular dependencies -->
+	<target name="compile" depends="schema2java">
+        <!-- add generated classes to classpath -->         
+        <path id="classpath-generated">
+            <path refid="classpath-libs"/>
+            <dirset dir="${build.classes.generated}"/>
+        </path>   
+            
+		<!-- compile the API first to avoid circular dependencies -->      
 		<mkdir dir="${build.classes.api}"/>
 		<compiler
 			srcdir="${src.api.dir}"
 			builddestdir="${build.classes.api}"
-			classpath="classpath-libs"
+			classpath="classpath-generated"
 		/>		
 		
 		<!-- add the recently compiled API to the classpath -->
 		<path id="classpath-api">
-			<path refid="classpath-libs"/>
+			<path refid="classpath-generated"/>
 			<dirset dir="${build.classes.api}"/>
 		</path>
 		
@@ -112,7 +124,12 @@
 		           source="${source.vm}"
 		           nowarn="${compiler.nowarn}"
 		           compiler="${compiler}"
-		           classpathref="@{classpath}"/>			
+		           classpathref="@{classpath}"/>		
+            <copy todir="@{builddestdir}">
+                <fileset dir="@{srcdir}">
+                	<include name="**"/>
+                </fileset>
+            </copy>            
 		</sequential>
 	</macrodef>	
 	
@@ -128,7 +145,10 @@
 	    </jar>		
 	    <jar jarfile="${build.dir}/${project.name}-client-${project.version}.jar" index="true">
 	      <fileset dir="${build.classes.client}"/>
-	    </jar>			
+	    </jar>
+        <jar jarfile="${build.dir}/${project.name}-generated-${project.version}.jar" index="true">
+          <fileset dir="${build.classes.generated}"/>
+        </jar>          
 	</target>
 	
 	<!-- ************************************************************************************************
-->
@@ -206,7 +226,33 @@
 	<!-- doc: create all docs -->
 	
 	<!-- ************************************************************************************************
-->
-	<!-- schema2java: tasks to create beans out of schemas -->
+	<!-- task to create beans out of schemas -->
+    <target name="schema2java" depends="init">
+      
+        <taskdef name="castor" classname="org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask">
+            <classpath refid="tools"/>
+        </taskdef>   
+        <!-- create empty dirs -->
+        <mkdir dir="${build.generated}"/>
+        <mkdir dir="${build.classes.generated}"/>         
+            
+        <!-- generate the sources of the deploy schema -->
+        <castor file="${src.schema}/deploy-schema-1.0.xsd"
+                todir="${build.generated}"
+                package="org.apache.cocoon.blockdeployer.cli.deploy10"
+                warnings="false"
+                types="j2"/> 
+        <!-- generate the sources of the wiring schema -->   
+        <castor file="${src.schema}/wiring-schema-1.0.xsd"
+                todir="${build.generated}"
+                package="org.apache.cocoon.blockdeployer.wiring.wiring10"
+                warnings="false"
+                types="j2"/> 
+        <compiler
+            srcdir="${build.generated}"
+            builddestdir="${build.classes.generated}"
+            classpath="classpath-libs"/>         
+    </target>   
 	
 
 	<!-- ************************************************************************************************
-->



Mime
View raw message