ovidiu      2002/09/05 17:10:49

  Modified:    .        build.xml
  Log:
  Added new targets:
  
  - compile-samples: compiles the Java classes in the
  src/webapp/samples/ directory. Currently these are the business logic
  classes for the control flow layer. These files are compiled in
  WEB-INF/classes/ and have a namespace that starts with 'samples' and
  follows the same directory structure found in the samples directory.
  
  - package-samples: creates a cocoon-samples.jar file with above
  mentioned Java classes.
  
  The 'prepare-webapp-libs' target now depends on 'package-samples'
  introduced above. It also copies the cocoon-samples.jar in the WEB-INF/lib.
  
  The 'webapp-local' target depends on 'compile-samples'.
  
  The 'prj.el' target now depends on 'webapp-local' instead of
  'prepare-webapp-libs'. It also puts WEB-INF/classes in the classpath.
  
  The 'dist-bin' target copies cocoon-samples.jar in WEB-INF/lib.
  
  The 'anteater.tests' target doesn't depend on anything now, to speed
  up running the Anteater tests.
  
  Revision  Changes    Path
  1.262     +41 -5     xml-cocoon2/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/build.xml,v
  retrieving revision 1.261
  retrieving revision 1.262
  diff -u -r1.261 -r1.262
  --- build.xml 3 Sep 2002 22:20:40 -0000       1.261
  +++ build.xml 6 Sep 2002 00:10:49 -0000       1.262
  @@ -972,6 +972,25 @@
     </target>
   
     <!-- =================================================================== -->
  +  <!-- Compiles the Java files in the src/samples/ directory               -->
  +  <!-- =================================================================== -->
  +  <target name="compile-samples"  depends="init">
  +    <property name="build.dest.samples" value="${build.dest}/samples"/>
  +
  +    <mkdir dir="${build.dest.samples}"/>
  +
  +    <javac srcdir="${webapp.dir}/samples"
  +        destdir="${build.dest}"
  +        excludes="chaperon/**"
  +        debug="${debug}"
  +           optimize="${optimize}"
  +           deprecation="${deprecation}"
  +           target="${target.vm}">
  +      <classpath refid="classpath"/>
  +    </javac>
  +  </target>
  +
  +  <!-- =================================================================== -->
     <!-- Creates the jar file                                                -->
     <!-- =================================================================== -->
     <target name="all" depends="compile" description="Default target (calls the 
'package' target)"/>
  @@ -993,6 +1012,17 @@
     </target>
   
     <!-- =================================================================== -->
  +  <!-- Creates the samples jar file                                        -->
  +  <!-- =================================================================== -->
  +  <target name="package-samples" depends="compile-samples">
  +    <jar jarfile="${build.dir}/${name}-samples.jar">
  +      <fileset dir="${build.dest}">
  +        <include name="samples/**"/>
  +      </fileset>
  +    </jar>
  +  </target>
  +
  +  <!-- =================================================================== -->
     <!-- Target called by Gump                                                -->
     <!-- =================================================================== -->
     <target name="gump" depends="docs, javadocs, test, package" description="[admin] 
Target called by Gump"/>
  @@ -1288,8 +1318,10 @@
       </copy>    
     </target>
   
  -  <target name="prepare-webapp-libs" depends="package, copy-webapp-libs" 
if="include.webapp.libs">
  +  <target name="prepare-webapp-libs" depends="package, package-samples, 
copy-webapp-libs" if="include.webapp.libs">
       <copy file="${build.dir}/${name}.jar" 
tofile="${build.war}/WEB-INF/lib/${name}-${version}.jar"/>
  +    <copy file="${build.dir}/${name}-samples.jar"
  +       todir="${build.war}/WEB-INF/lib/"/>
     </target>
   
     <!-- =================================================================== -->
  @@ -1367,7 +1399,7 @@
     <!-- =================================================================== -->
     <!-- Creates a local webapp directly useable as a servlet context        -->
     <!-- =================================================================== -->
  -  <target name="webapp-local" depends="prepare-webapp, prepare-webapp-scratchpad, 
copy-webapp-libs, copy-scratchpad-libs"
  +  <target name="webapp-local" depends="prepare-webapp, prepare-webapp-scratchpad, 
copy-webapp-libs, copy-scratchpad-libs, compile-samples"
         description="Builds a local webapp directory usable as servlet context for 
quicker turn around">
       <copy todir="${build.war}/WEB-INF/classes">
         <fileset dir="${build.dest}"/>
  @@ -1566,12 +1598,13 @@
     <!-- =================================================================== -->
     <!-- Generate the Emacs JDE project file                                 -->
     <!-- =================================================================== -->
  -  <target name="prj.el" depends="init, prepare-webapp-libs"
  +  <target name="prj.el" depends="init, webapp-local"
             description="Generate the Emacs project file">
       <path id="jar.files">
         <fileset dir="${build.war}/WEB-INF/lib">
           <include name="*.jar"/>
         </fileset>
  +      <pathelement path="${build.context}/WEB-INF/classes"/>
       </path>
       <property name="jar.files" refid="jar.files"/>
       <copy file="${emacs.dir}/prj.el.in" tofile="prj.el" filtering="yes">
  @@ -1759,7 +1792,10 @@
         </fileset>
       </copy>
   
  -    <copy file="${build.dir}/${name}.jar" 
tofile="${dist.bin}/webapp/WEB-INF/lib/${name}-${version}.jar"/>
  +    <copy file="${build.dir}/${name}.jar"
  +       tofile="${dist.bin}/webapp/WEB-INF/lib/${name}-${version}.jar"/>
  +    <copy file="${build.dir}/${name}-samples.jar"
  +       tofile="${dist.bin}/webapp/WEB-INF/lib/"/>
   
       <copy todir="${dist.bin}/docs">
         <fileset dir="${build.docs}"/>
  @@ -1947,7 +1983,7 @@
     <!-- =================================================================== -->
     <!-- Anteater tests                                                      -->
     <!-- =================================================================== -->
  -  <target name="anteater.tests" depends="prepare-webapp-libs"
  +  <target name="anteater.tests"
             description="Runs the Anteater functional tests">
       <property name="host" value="localhost"/>
       <property name="port" value="8080"/>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to