nicolaken    02/03/07 07:49:55

  Modified:    .        build.xml
  Log:
  Made "installscratchpadwar" target copy samples from scratchpad and made install*war 
targets depend on init target.
  
  Revision  Changes    Path
  1.179     +35 -8     xml-cocoon2/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/build.xml,v
  retrieving revision 1.178
  retrieving revision 1.179
  diff -u -r1.178 -r1.179
  --- build.xml 7 Mar 2002 13:00:26 -0000       1.178
  +++ build.xml 7 Mar 2002 15:49:55 -0000       1.179
  @@ -196,10 +196,11 @@
       <property name="packages"     value="org.apache.*"/>
       <property name="context.dir"  value="${src.dir}/documentation"/>
   
  -    <property name="scratchpad.dir"  value="${src.dir}/scratchpad"/>
  -    <property name="scratchpad.src"  value="${scratchpad.dir}/src"/>
  -    <property name="scratchpad.lib"  value="${scratchpad.dir}/lib"/>
  -    <property name="scratchpad.name" value="cocoon-scratchpad"/>
  +    <property name="scratchpad.dir"     value="${src.dir}/scratchpad"/>
  +    <property name="scratchpad.src"     value="${scratchpad.dir}/src"/>
  +    <property name="scratchpad.lib"     value="${scratchpad.dir}/lib"/>
  +    <property name="scratchpad.webapp"  value="${scratchpad.dir}/webapp"/>
  +    <property name="scratchpad.name"    value="cocoon-scratchpad"/>
   
       <property name="build.root"     value="./build"/>
       <property name="build.dir"      value="${build.root}/${name}"/>
  @@ -270,7 +271,8 @@
     <!-- =================================================================== -->
     <!-- Installs Cocoon war file in a specified directory                   -->
     <!-- =================================================================== -->
  -  <target name="installwar" description="* Installs the war package in a specified 
directory">
  +  <target name="installwar" depends="init"
  +          description="* Installs the war package in a specified directory">
       <taskdef name="user-input" classname="UserInputTask"
                classpath="./tools/anttasks"/>
       <property name="include.webapp.libs" value="true"/>
  @@ -283,17 +285,42 @@
     <!-- =================================================================== -->
     <!-- Installs Cocoon war with scratchpad stuff in a specified directory  -->
     <!-- =================================================================== -->
  -  <target name="installscratchpadwar" description="* Installs the war package in a 
specified directory">
  +  <target name="installscratchpadwar" depends="init"
  +          description="* Installs the war package in a specified directory">
       <echo message=" This contains SCRATCHPAD BUILDS. It is not guaranteed to 
work."/>
       <echo message=" You have been warned. "/>
     
  +    <!-- Ask the user for the destination path for the war -->
       <taskdef name="user-input" classname="UserInputTask"
           classpath="./tools/anttasks"/>
           
  -    <property name="include.webapp.libs" value="true"/>
  -    <property name="include.scratchpad.libs" value="true"/>    
       <property name="install.war" value=""/>
       <user-input name="install.war">Please select an installation 
directory</user-input>
  +    
  +    <!-- copy scratchpad webapp samples -->
  +    <!-- NKB:FIXME Doing it here instead of in the webapp target to maintain 
original
  +                   behaviour of that target. Should be done there in the future 
IMHO. -->
  +    <mkdir dir="${build.war}"/>   
  +    <copy todir="${build.war}" filtering="on">
  +      <fileset dir="${scratchpad.webapp}">
  +        <exclude name="**/*.gif"/>
  +        <exclude name="**/*.jpg"/>
  +        <exclude name="**/*.png"/>
  +     </fileset>
  +    </copy>
  +    <copy todir="${build.war}" filtering="off">
  +      <fileset dir="${scratchpad.webapp}">
  +        <include name="**/*.gif"/>
  +        <include name="**/*.jpg"/>
  +        <include name="**/*.png"/>
  +     </fileset>
  +    </copy>
  +        
  +    <!-- tell the install target to include all libs in dist -->
  +    <property name="include.webapp.libs" value="true"/>
  +    <property name="include.scratchpad.libs" value="true"/>    
  +        
  +    <!-- call install target -->
       <antcall target="install"/>
     </target>
     
  
  
  

----------------------------------------------------------------------
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