Changeset 632

Show
Ignore:
Timestamp:
04/26/07 11:38:33 (2 years ago)
Author:
mikey
Message:

added targets for deleting all examples, for setup of logging functionality, copy javascript files from docroot to example directory if json-rpc enabled, allowed small y as correct answer

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/resources/phing/build-stubbles.xml

    r592 r632  
    1414  --> 
    1515  <target name="setup-project" 
    16           depends="copy-dist-files, init-stubbles, cache-permission-check, setup-json-rpc
     16          depends="copy-dist-files, init-stubbles, cache-permission-check, setup-json-rpc, setup-logging
    1717          description="Creates a working project environment from a fresh build."> 
    1818  </target> 
     
    4343    <input propertyname="jsonrpc.enabled" promptChar="?">Do you want to enable JSON-RPC functionality? (Y/N)</input> 
    4444    <if> 
    45       <equals arg1="${jsonrpc.enabled}" arg2="Y"/> 
     45      <or> 
     46        <equals arg1="${jsonrpc.enabled}" arg2="Y"/> 
     47        <equals arg1="${jsonrpc.enabled}" arg2="y"/> 
     48      </or> 
    4649      <then> 
    4750        <echo>----------------------------------</echo> 
     
    5255 
    5356        <append destFile="build.properties" text="jsonrpc.clients.dir=${jsonrpc.clients.dir}${line.separator}"/> 
    54         <move file="${stubbles.config.path}/xml/json-rpc-service-dist.xml" tofile="${stubbles.config.path}/xml/json-rpc-service.xml" overwrite="true"> 
     57        <copy file="${stubbles.config.path}/xml/json-rpc-service-dist.xml" tofile="${stubbles.config.path}/xml/json-rpc-service.xml" overwrite="true"> 
    5558          <filterchain> 
    5659            <expandproperties /> 
    5760          </filterchain> 
    58         </move> 
     61        </copy> 
     62        <copy  todir="${project.basedir}/examples/javascript"> 
     63          <fileset dir="${project.basedir}/docroot/javascript"> 
     64            <include name="**/*.js"/> 
     65          </fileset> 
     66        </copy> 
    5967      </then> 
    6068      <else> 
    6169        <echo>JSON-RPC initialization skipped.</echo> 
     70      </else> 
     71    </if> 
     72  </target> 
     73   
     74  <!-- Enable logging functionality --> 
     75  <target name="setup-logging" description="Basic setup for logging functionality"> 
     76    <input propertyname="logging.enabled" promptChar="?">Do you want to enable logging functionality? (Y/N)</input> 
     77    <if> 
     78      <or> 
     79        <equals arg1="${logging.enabled}" arg2="Y"/> 
     80        <equals arg1="${logging.enabled}" arg2="y"/> 
     81      </or> 
     82      <then> 
     83        <echo>----------------------------------</echo> 
     84        <echo>| Setting up logging package     |</echo> 
     85        <echo>----------------------------------</echo> 
     86        <copy file="${stubbles.config.path}/xml/logging-dist.xml" tofile="${stubbles.config.path}/xml/logging.xml" overwrite="true" /> 
     87        <append destFile="build.properties" text="logging.enabled=true${line.separator}"/> 
     88      </then> 
     89      <else> 
     90        <append destFile="build.properties" text="logging.enabled=false${line.separator}"/> 
     91        <echo>Logging initialization skipped.</echo> 
    6292      </else> 
    6393    </if> 
     
    74104    <input propertyname="cleanup.dist.confirm" promptChar="?">Are you sure, you want to cleanup all dist files? (Y/N)</input> 
    75105    <if> 
    76       <equals arg1="${cleanup.dist.confirm}" arg2="Y"/> 
     106      <or> 
     107        <equals arg1="${cleanup.dist.confirm}" arg2="Y"/> 
     108        <equals arg1="${cleanup.dist.confirm}" arg2="y"/> 
     109      </or> 
    77110      <then> 
    78111        <delete file="${project.basedir}/build-dist.xml"/> 
     
    175208  </target> 
    176209 
     210  <!-- 
     211   Deletes all examples 
     212  --> 
     213  <target name="clean-examples" depends="init-stubbles" description="Removes all example related stuff."> 
     214    <delete dir="${stubbles.src.path}/php/net/stubbles" includeemptydirs="true" verbose="true" failonerror="true" /> 
     215    <delete dir="${project.basedir}/examples" includeemptydirs="true" verbose="true" failonerror="true" /> 
     216  </target> 
    177217</project> 
  • trunk/src/main/resources/phing/build.xml

    r592 r632  
    4040  </target> 
    4141 
     42  <!-- 
     43    Deletes all examples 
     44  --> 
     45  <target name="clean-examples" description="Removes all example related stuff."> 
     46    <phing phingfile="build-stubbles.xml" target="clean-examples"/> 
     47  </target> 
    4248</project>