Changeset 1641

Show
Ignore:
Timestamp:
06/19/08 17:30:15 (3 months ago)
Author:
mikey
Message:

reworked setup of a new stubbles installation
todo: test json-rpc client generation
todo: add support to create new projects

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/org/stubbles/phing/tasks/stubInitConfigTask.php

    r1380 r1641  
    5555            throw new BuildException('Error loading Stubbles configuration from ' . $this->configPath . '/php/config.php'); 
    5656        } 
    57  
    58         $this->project->setProperty('stubbles.config.path', stubConfig::getConfigPath()); 
    59         $this->project->setProperty('stubbles.cache.path', stubConfig::getCachePath()); 
    60         $this->project->setProperty('stubbles.lib.path', stubConfig::getLibPath()); 
    61         $this->project->setProperty('stubbles.src.path', stubConfig::getSourcePath()); 
    62         $this->project->setProperty('stubbles.log.path', stubConfig::getLogPath()); 
    6357    } 
    6458} 
  • trunk/src/main/resources/phing/build-stubbles.xml

    r1634 r1641  
    11<?xml version="1.0"?> 
    22<project name="Stubbles" basedir="." default="main"> 
     3  <property name="stubbles.lib.path" value="${project.basedir}/lib" /> 
     4  <property name="stubbles.projects.path" value="${project.basedir}/projects" /> 
     5  <property name="stubbles.src.path" value="${project.basedir}/src/main" /> 
    36  <property name="phing.task.dir" value="${project.basedir}/src/main/php/org/stubbles/phing/tasks" /> 
    4   <property name="processors.default.file" value="config/xml/processors.xml" /> 
    5   <property name="processors.dist.file" value="config/xml/processors-dist.xml" /> 
    6   <property name="processors.all" value="xml,page,jsonrpc" /> 
    77  <taskDef name="stubInitConfig" classname="stubInitConfigTask" classpath="${phing.task.dir}" /> 
    88  <taskDef name="stubInitClassLoader" classname="stubInitClassLoaderTask" classpath="${phing.task.dir}" /> 
    99  <taskDef name="stubGenerateJsonRpcProxies" classname="stubGenerateJsonRpcProxiesTask" classpath="${phing.task.dir}" /> 
    10   <taskDef name="stubGenerateRewriteRules" classname="stubGenerateRewriteRulesTask" classpath="${phing.task.dir}" /> 
    1110 
    12   <!-- 
    13     The main target 
    14   --> 
    1511  <target name="main" depends="prepare-folders, generate-clients" description="Executes all targets."> 
    1612  </target> 
    1713 
    18   <!-- 
    19     Setup a project from a new build 
    20   --> 
    21   <target name="setup-project" 
    22           depends="copy-dist-files, init-stubbles, cache-permission-check, prepare-folders, setup-json-rpc, 
    23                    setup-logging, setup-website, setup-processors, setup-rewrite-rules" 
    24           description="Creates a working project environment from a fresh build."> 
    25     <echo>Your project ${project.new.name} has been set up correctly</echo> 
    26     <echo>You may now adjust the configuration files in ${stubbles.config.path}/xml</echo> 
    27     <echo>If you finished adjusting configuration files, please run "phing"</echo> 
     14  <target name="setup" depends="setup-build, prepare-folders" description="Does the initial setup after installation."> 
     15    <input propertyname="single.lib" promptChar="?" defaultValue="Y">Do you want to use lib/stubbles.php? (Y/N)</input> 
     16    <if> 
     17      <equals arg1="${single.lib}" arg2="Y" casesensitive="false"/> 
     18      <then> 
     19        <delete> 
     20          <fileset dir="${stubbles.lib.path}"> 
     21            <include name="*.star"/> 
     22            <include name="stubbles-core*.php"/> 
     23            <exclude name="xjconf.star"/> 
     24          </fileset> 
     25        </delete> 
     26      </then> 
     27      <else> 
     28        <delete file="${stubbles.lib.path}/stubbles.php"/> 
     29      </else> 
     30    </if> 
     31    <echo>Your installation ${installation.name} has been set up correctly.</echo> 
     32    <echo>You may now create a new project with "phing setup-project".</echo> 
    2833  </target> 
    2934 
    30   <!-- 
    31     Setup a project from a new build 
    32   --> 
    33   <target name="copy-dist-files" description="Copies basic configuration files."> 
    34     <echo>----------------------------------</echo> 
    35     <echo>| Setting up build system        |</echo> 
    36     <echo>----------------------------------</echo> 
    37     <input propertyname="project.new.name" promptChar=":">Please enter the name of your project</input> 
     35  <target name="setup-build" description="Asks for the name of the installation."> 
     36    <input propertyname="installation.name" promptChar=":">Please enter the name of this installation</input> 
    3837    <touch file="${project.basedir}/build.properties"/> 
    39     <move file="${project.basedir}/build-dist.xml" tofile="${project.basedir}/build.xml" overwrite="false"> 
     38    <!-- We need to copy and to delete instead of moving the file because move 
     39         does not support the filterchain filter, probably a bug in Phing? /--> 
     40    <copy file="${project.basedir}/build-dist.xml" tofile="${project.basedir}/build.xml" overwrite="false"> 
    4041      <filterchain> 
    41         <expandproperties /> 
     42        <expandproperties/> 
    4243      </filterchain> 
    43     </move> 
     44    </copy> 
     45    <delete file="${project.basedir}/build-dist.xml"/> 
    4446  </target> 
    4547 
    46   <!-- Set the cache permission property --> 
     48  <target name="projectcheck" unless="stubbles.project"> 
     49    <echo message="====================================================="/> 
     50    <echo message="Version not specified. You must enter a version. In"/> 
     51    <echo message="the future you can add this to build.properties or"/> 
     52    <echo message="enter it on the command line: "/> 
     53    <echo message=" "/> 
     54    <echo message="-stubbles.project=example"/> 
     55    <echo message="====================================================="/> 
     56    <input propertyname="stubbles.project" promptChar=":">stubbles.project</input> 
     57  </target> 
     58 
     59  <target name="setup-examples" description="Sets up all examples."> 
     60    <echo>----------------------------------</echo> 
     61    <echo>| Setup examples                 |</echo> 
     62    <echo>----------------------------------</echo> 
     63    <if> 
     64      <available file="${stubbles.projects.path}/examples/build.xml"/> 
     65      <then> 
     66        <phing phingfile="${stubbles.projects.path}/examples/build.xml" inheritAll="false" target="main"> 
     67          <property name="javascript.srcpath" value="${stubbles.projects.path}/common/docroot/javascript"/> 
     68        </phing> 
     69      </then> 
     70      <else> 
     71        <echo>Project examples not available, can not setup examples.</echo> 
     72      </else> 
     73    </if> 
     74  </target> 
     75 
     76  <target name="clean-examples" description="Removes all example related stuff."> 
     77    <delete dir="${stubbles.src.path}/php/org/stubbles/examples" includeemptydirs="true" verbose="true" failonerror="true" /> 
     78    <delete dir="${stubbles.projects.path}/examples" includeemptydirs="true" verbose="true" failonerror="true"/> 
     79  </target> 
     80 
     81  <target name="clean-dist" description="Removes project dist from the build."> 
     82    <echo>----------------------------------</echo> 
     83    <echo>| Removing dist project          |</echo> 
     84    <echo>----------------------------------</echo> 
     85    <echo>After removing the dist files, you will not be able to execute "setup-project" anymore.</echo> 
     86    <input propertyname="cleanup.dist.confirm" promptChar="?" defaultValue="N">Are you sure, you want to remove project dist? (Y/N)</input> 
     87    <if> 
     88      <equals arg1="${cleanup.dist.confirm}" arg2="Y" casesensitive="false" /> 
     89      <then> 
     90        <delete dir="${stubbles.projects.path}/dist" includeemptydirs="true" verbose="true" failonerror="true"/> 
     91      </then> 
     92    </if> 
     93  </target> 
     94 
     95  <target name="init-stubbles" depends="projectcheck" description="Loads class loader."> 
     96    <echo>----------------------------------</echo> 
     97    <echo>| Loading Stubbles classloader   |</echo> 
     98    <echo>----------------------------------</echo> 
     99    <stubInitConfig configPath="${stubbles.projects.path}/${stubbles.project}/config"/> 
     100    <stubInitClassLoader/> 
     101  </target> 
     102 
     103  <target name="clear-cache" description="Removes all cache files."> 
     104    <echo>----------------------------------</echo> 
     105    <echo>| Clearing cache                 |</echo> 
     106    <echo>----------------------------------</echo> 
     107    <delete file="${stubbles.lib.path}/.cache" verbose="true"/> 
     108    <delete> 
     109      <fileset dir="${stubbles.projects.path}"> 
     110        <include name="**/cache/**"/> 
     111      </fileset> 
     112    </delete> 
     113  </target> 
     114 
    47115  <target name="cache-permission-check" unless="cache.permissions" description="Checks, whether cache permissions have been specified"> 
    48116    <echo>----------------------------------</echo> 
     
    53121  </target> 
    54122 
    55   <!-- Set the JSON-RPC properties --> 
    56   <target name="setup-json-rpc" unless="jsonrpc.clients.dir" description="Basic setup for JSON-RPC functionality"> 
    57     <input propertyname="jsonrpc.enabled" promptChar="?" defaultValue="Y">Do you want to enable JSON-RPC functionality? (Y/N)</input> 
    58     <if> 
    59       <equals arg1="${jsonrpc.enabled}" arg2="Y" casesensitive="false"/> 
    60       <then> 
    61         <echo>----------------------------------</echo> 
    62         <echo>| Setting up JSON-RPC package    |</echo> 
    63         <echo>----------------------------------</echo> 
    64         <input propertyname="jsonrpc.clients.dir" promptChar=":" defaultValue="genjs">Please supply the directory for generated clients</input> 
    65         <input propertyname="jsonrpc.clients.ns" promptChar=":" defaultValue="stubbles.json.proxy">Please supply the JavaScript namespace for the generated proxies (without '.' at the end)</input> 
    66  
    67         <append destFile="build.properties" text="jsonrpc.clients.dir=${jsonrpc.clients.dir}${line.separator}"/> 
    68         <append destFile="build.properties" text="jsonrpc.clients.ns=${jsonrpc.clients.ns}${line.separator}"/> 
    69         <copy file="${stubbles.config.path}/json-rpc-service-dist.ini" tofile="${stubbles.config.path}/json-rpc-service.ini" overwrite="true"> 
    70           <filterchain> 
    71             <expandproperties /> 
    72           </filterchain> 
    73         </copy> 
    74       </then> 
    75       <else> 
    76         <echo>JSON-RPC initialization skipped.</echo> 
    77       </else> 
    78     </if> 
    79   </target> 
    80  
    81   <!-- Set up all processors to be used --> 
    82   <target name="setup-processors" description="asks user which processors he likes to have"> 
    83     <echo>------------------------</echo> 
    84     <echo>| Setting up processors |</echo> 
    85     <echo>------------------------</echo> 
    86     <echo>Please choose which of the processors you'd like to have.</echo> 
    87     <echo>Just comma seperate them (e.g. bla,bla,bla).</echo> 
    88     <input propertyname="processors.choosen" promptChar=":" defaultValue="${processors.all}">choose processors</input> 
    89     <input propertyname="processors.default" promptChar=":" validArgs="${processors.choosen}">choose default processor</input> 
    90     <xslt file="${processors.dist.file}" tofile="${processors.default.file}" style="setup/processors.xsl" overwrite="true"> 
    91         <param name="choosenProcs" expression="${processors.choosen}" /> 
    92         <param name="defaultProc" expression="${processors.default}" /> 
    93     </xslt> 
    94   </target> 
    95  
    96   <!-- Set up rewrite rules --> 
    97   <target name="setup-rewrite-rules" description="set rewrite rules based on processor configuration"> 
    98     <echo>----------------------------</echo> 
    99     <echo>| Setting up rewrite rules |</echo> 
    100     <echo>----------------------------</echo> 
    101     <stubGenerateRewriteRules selectedProcessors="${processors.choosen}" /> 
    102   </target> 
    103  
    104   <!-- Enable logging functionality --> 
    105   <target name="setup-logging" unless="logging.enabled" description="Basic setup for logging functionality"> 
    106     <input propertyname="logging.enabled" promptChar="?" defaultValue="Y">Do you want to enable logging functionality? (Y/N)</input> 
    107     <if> 
    108       <equals arg1="${logging.enabled}" arg2="Y" casesensitive="false"/> 
    109       <then> 
    110         <echo>----------------------------------</echo> 
    111         <echo>| Setting up logging package     |</echo> 
    112         <echo>----------------------------------</echo> 
    113         <copy file="${stubbles.config.path}/xml/logging-dist.xml" tofile="${stubbles.config.path}/xml/logging.xml" overwrite="true" /> 
    114         <append destFile="build.properties" text="logging.enabled=true${line.separator}"/> 
    115       </then> 
    116       <else> 
    117         <append destFile="build.properties" text="logging.enabled=false${line.separator}"/> 
    118         <echo>Logging initialization skipped.</echo> 
    119       </else> 
    120     </if> 
    121   </target> 
    122  
    123   <!-- Enable website functionality --> 
    124   <target name="setup-website" unless="variantmanager.enabled" description="Basic setup for website functionality"> 
    125     <copy file="${stubbles.config.path}/xml/config-dist.xml" tofile="${stubbles.config.path}/xml/config.xml" overwrite="true" /> 
    126     <copy file="${stubbles.config.path}/xml/interceptors-dist.xml" tofile="${stubbles.config.path}/xml/interceptors.xml" overwrite="true" /> 
    127     <copy file="${stubbles.config.path}/xml/processors-dist.xml" tofile="${stubbles.config.path}/xml/processors.xml" overwrite="true" /> 
    128     <input propertyname="variantmanager.enabled" promptChar="?" defaultValue="Y">Do you want to enable variant manager functionality? (Y/N)</input> 
    129     <if> 
    130       <equals arg1="${variantmanager.enabled}" arg2="Y" casesensitive="false"/> 
    131       <then> 
    132         <echo>-------------------------------------</echo> 
    133         <echo>| Setting up VariantManager package |</echo> 
    134         <echo>-------------------------------------</echo> 
    135         <copy file="${stubbles.config.path}/xml/variantmanager-dist.xml" tofile="${stubbles.config.path}/xml/variantmanager.xml" overwrite="true" /> 
    136         <append destFile="build.properties" text="variantmanager.enabled=true${line.separator}"/> 
    137       </then> 
    138       <else> 
    139         <append destFile="build.properties" text="variantmanager.enabled=false${line.separator}"/> 
    140         <echo>VariantManager initialization skipped.</echo> 
    141       </else> 
    142     </if> 
    143   </target> 
    144  
    145   <!-- 
    146     Setup examples 
    147   --> 
    148   <target name="setup-examples" depends="init-stubbles" description="Sets up all examples."> 
    149     <echo>----------------------------------</echo> 
    150     <echo>| Removing dist files            |</echo> 
    151     <echo>----------------------------------</echo> 
    152     <phing phingfile="${project.basedir}/examples/build.xml" inheritAll="false" target="main"> 
    153       <property name="javascript.srcpath" value="${project.basedir}/docroot/javascript" /> 
    154     </phing> 
    155   </target> 
    156  
    157   <!-- 
    158     Cleanup dist-files 
    159   --> 
    160   <target name="clean-dist" depends="init-stubbles" description="Removes left-over dist-files from the build."> 
    161     <echo>----------------------------------</echo> 
    162     <echo>| Removing dist files            |</echo> 
    163     <echo>----------------------------------</echo> 
    164     <echo>After removing the dist files, you will not be able to execute "setup-project" anymore.</echo> 
    165     <input propertyname="cleanup.dist.confirm" promptChar="?" defaultValue="N">Are you sure, you want to cleanup all dist files? (Y/N)</input> 
    166     <if> 
    167       <equals arg1="${cleanup.dist.confirm}" arg2="Y" casesensitive="false" /> 
    168       <then> 
    169         <delete file="${project.basedir}/build-dist.xml"/> 
    170         <delete file="${project.basedir}/config/php/config-dist.php"/> 
    171         <delete> 
    172           <fileset dir="${stubbles.config.path}"> 
    173             <include name="**/*-dist.xml"/> 
    174           </fileset> 
    175         </delete> 
    176       </then> 
    177       <else> 
    178         <echo>No dist files have been deleted.</echo> 
    179       </else> 
    180     </if> 
    181   </target> 
    182  
    183   <!-- 
    184     Cleanup basic configuration options 
    185   --> 
    186   <target name="clean-config" depends="init-stubbles" description="Removes the configuration added during setup."> 
    187     <echo>----------------------------------</echo> 
    188     <echo>| Removing configuration files   |</echo> 
    189     <echo>----------------------------------</echo> 
    190     <delete file="${project.basedir}/build.properties"/> 
    191   </target> 
    192  
    193   <!-- 
    194     Loads Stubbles configuration and sets Phing properties 
    195   --> 
    196   <target name="init-stubbles-config" description="Loads necessary configuration files."> 
    197     <echo>----------------------------------</echo> 
    198     <echo>| Loading Stubbles configuration |</echo> 
    199     <echo>----------------------------------</echo> 
    200     <property file="build.properties" /> 
    201     <stubInitConfig configPath="${project.basedir}/config/"/> 
    202     <echo>Config directory : ${stubbles.config.path}</echo> 
    203     <echo>Cache directory  : ${stubbles.cache.path}</echo> 
    204     <echo>Source directory : ${stubbles.src.path}</echo> 
    205     <echo>Lib directory    : ${stubbles.lib.path}</echo> 
    206     <echo>Log directory    : ${stubbles.log.path}</echo> 
    207   </target> 
    208  
    209   <!-- 
    210     Loads Stubbles class loader 
    211   --> 
    212   <target name="init-stubbles" depends="init-stubbles-config" description="Loads class loader."> 
    213     <echo>----------------------------------</echo> 
    214     <echo>| Loading Stubbles classloader   |</echo> 
    215     <echo>----------------------------------</echo> 
    216     <stubInitClassLoader/> 
    217   </target> 
    218  
    219   <!-- 
    220    Clears all cache files 
    221   --> 
    222   <target name="clear-cache" depends="init-stubbles-config" description="Removes all cache files."> 
    223     <echo>----------------------------------</echo> 
    224     <echo>| Clearing cache                 |</echo> 
    225     <echo>----------------------------------</echo> 
    226     <delete file="${stubbles.lib.path}/.cache" verbose="true"/> 
    227     <delete> 
    228       <fileset dir="projects"> 
    229         <include name="**/cache/**" /> 
    230       </fileset> 
    231     </delete> 
    232   </target> 
    233  
    234   <!-- 
    235    Sets permissions on folders 
    236   --> 
    237   <target name="prepare-folders" depends="init-stubbles" description="Adjusts directory permissions of directories."> 
     123  <target name="prepare-folders" depends="cache-permission-check" description="Adjusts permissions of directories."> 
    238124    <echo>----------------------------------</echo> 
    239125    <echo>| Setting folder permissions     |</echo> 
    240126    <echo>----------------------------------</echo> 
    241     <chmod file="${stubbles.lib.path}" mode="${cache.permissions}"> 
     127    <chmod mode="${cache.permissions}"> 
    242128      <fileset dir="${stubbles.lib.path}"> 
    243129        <include name="**/*"/> 
    244130      </fileset> 
    245131    </chmod> 
    246     <chmod file="${stubbles.log.path}" mode="${cache.permissions}"> 
    247       <fileset dir="${stubbles.log.path}"> 
    248         <include name="**/*"/> 
    249       </fileset> 
    250     </chmod> 
    251     <chmod file="${stubbles.cache.path}" mode="${cache.permissions}"> 
    252       <fileset dir="${stubbles.cache.path}"> 
    253         <include name="**/*"/> 
     132    <chmod mode="${cache.permissions}"> 
     133      <fileset dir="${stubbles.projects.path}"> 
     134        <include name="**/log/**"/> 
     135        <include name="**/cache/**"/> 
    254136      </fileset> 
    255137    </chmod> 
    256138  </target> 
    257139 
    258   <!-- 
    259    Generates JSON-RPC clients 
    260   --> 
    261   <target name="generate-clients" description="Generates JSON-RPC clients." depends="init-stubbles"> 
     140  <target name="generate-clients" depends="init-stubbles" description="Generates JSON-RPC clients for all projects."> 
    262141    <echo>----------------------------------</echo> 
    263142    <echo>| Generating JSON-RPC proxies    |</echo> 
    264143    <echo>----------------------------------</echo> 
     144    <foreach list="${projects}" param="stubbles.project" target="generate-client-project"/> 
     145  </target> 
     146 
     147  <target name="generate-client-project" depends="projectcheck, init-stubbles" description="Generates JSON-RPC clients for a specific project."> 
    265148    <if> 
    266       <not> 
    267         <isset property="jsonrpc.project.dir"/> 
    268       </not> 
     149      <available file="${stubbles.projects.path}/${stubbles.project}/config/json-rpc-service.ini"/> 
    269150      <then> 
    270         <property name="jsonrpc.project.dir" value="${project.basedir}"/> 
    271       </then> 
    272     </if> 
    273     <if> 
    274       <isset property="jsonrpc.clients.dir"/> 
    275       <then> 
    276         <if> 
    277           <available file="${jsonrpc.project.dir}/config/json-rpc-service.ini"/> 
    278           <then> 
    279             <mkdir dir="${jsonrpc.project.dir}/docroot/${jsonrpc.clients.dir}"/> 
    280             <stubGenerateJsonRpcProxies serviceFile="${jsonrpc.project.dir}/config/json-rpc-service.ini" 
    281                                         targetFolder="$jsonrpc.project.dir}/docroot/${jsonrpc.clients.dir}" 
    282                                         javaScriptNamespace="${jsonrpc.clients.ns}"/> 
    283           </then> 
    284           <else> 
    285             <echo>No json-rpc-service.ini configuration file available.</echo> 
    286             <echo>Skipping JSON-RPC client generation.</echo> 
    287           </else> 
    288         </if> 
     151        <mkdir dir="${stubbles.projects.path}/${stubbles.project}/docroot/${jsonrpc.clients.dir}"/> 
     152        <stubGenerateJsonRpcProxies serviceFile="${stubbles.projects.path}/${stubbles.project}/config/json-rpc-service.ini" 
     153                                    targetFolder="${stubbles.projects.path}/${stubbles.project}/docroot/${jsonrpc.clients.dir}" 
     154                                    javaScriptNamespace="${jsonrpc.clients.ns}"/> 
    289155      </then> 
    290156      <else> 
    291         <echo>No directory for JSON-RPC clients specified in build.properies.</echo> 
     157        <echo>No json-rpc-service.ini configuration file available.</echo> 
    292158        <echo>Skipping JSON-RPC client generation.</echo> 
    293159      </else> 
    294160    </if> 
    295161  </target> 
    296  
    297   <!-- 
    298    Deletes all examples 
    299   --> 
    300   <target name="clean-examples" depends="init-stubbles" description="Removes all example related stuff."> 
    301     <delete dir="${stubbles.src.path}/php/org/stubbles/examples" includeemptydirs="true" verbose="true" failonerror="true" /> 
    302     <delete dir="projects/examples" includeemptydirs="true" verbose="true" failonerror="true" /> 
    303   </target> 
    304162</project> 
  • trunk/src/main/resources/phing/build.xml

    r1525 r1641  
    11<?xml version="1.0"?> 
    2 <project name="${project.new.name}" basedir="." default="main"> 
     2<project name="${installation.name}" basedir="." default="main"> 
    33 
    44  <!-- 
     
    1010  </target> 
    1111 
    12   <!-- 
    13    Clears all cache files 
    14   --> 
    1512  <target name="clear-cache" description="Removes all cache files."> 
    1613    <phing phingfile="build-stubbles.xml" target="clear-cache"/> 
    1714  </target> 
    1815 
    19   <!-- 
    20     Cleanup dist-files 
    21   --> 
    2216  <target name="clean-dist" description="Removes left-over dist-files from the build."> 
    2317    <phing phingfile="build-stubbles.xml" target="clean-dist"/> 
    2418  </target> 
    2519 
    26   <!-- 
    27     Cleanup basic configuration options 
    28   --> 
    29   <target name="clean-config" description="Removes the configuration added during setup."> 
    30     <phing phingfile="build-stubbles.xml" target="clean-config"/> 
     20  <target name="setup-examples" description="Sets up all examples."> 
     21    <phing phingfile="build-stubbles.xml" target="setup-examples"/> 
    3122  </target> 
    3223 
    33   <!-- 
    34     This target is only used once. 
    35     It can be used to copy dist config files to the correct 
    36     locations. 
    37   --> 
    38   <target name="setup-project" description="Creates a working project environment from a fresh build."> 
    39     <phing phingfile="build-stubbles.xml" target="setup-project"/> 
    40   </target> 
    41  
    42   <!-- 
    43     Deletes all examples 
    44   --> 
    4524  <target name="clean-examples" description="Removes all example related stuff."> 
    4625    <phing phingfile="build-stubbles.xml" target="clean-examples"/> 
  • trunk/src/main/resources/phing/stubbles.bat

    r686 r1641  
    11@echo off 
    22echo Stubbles setup v${version} 
    3 echo (c) 2007 Stubbles Development Team 
     3echo (c) 2007-2008 Stubbles Development Team 
    44echo. 
    55 
    6 if %1!==! goto setup-project 
    7 if %1==setup-project goto setup-project 
     6if %1!==! goto setup 
     7if %1==setup goto setup 
    88if %1==setup-examples goto execute 
    99if %1==clean-dist goto execute 
    10 if %1==clean-config goto execute 
    1110if %1==clean-examples goto execute 
    1211if %1==clear-cache goto execute 
    1312goto unknown 
    1413 
    15 :setup-project 
    16 phing -f build-stubbles.xml setup-project 
     14:setup 
     15phing -f build-stubbles.xml setup 
    1716goto end 
    1817 
  • trunk/src/main/resources/phing/stubbles.sh

    r686 r1641  
    11#!/bin/sh 
    22echo "Stubbles setup v${version}" 
    3 echo "(c) 2007 Stubbles Development Team" 
     3echo "(c) 2007-2008 Stubbles Development Team" 
    44echo "" 
    55 
    66if [ $# -eq 0 ] 
    77then 
    8   STUBCOMMAND="setup-project
     8  STUBCOMMAND="setup
    99else 
    1010  STUBCOMMAND=$1 
    1111fi 
    1212case $STUBCOMMAND in 
    13    "setup-project") phing -f build-stubbles.xml setup-project;; 
     13   "setup-project") phing -f build-stubbles.xml setup;; 
    1414   "setup-examples") phing -f build-stubbles.xml setup-examples;; 
    1515   "clean-dist") phing -f build-stubbles.xml clean-dist;; 
    16    "clean-config") phing -f build-stubbles.xml clean-config;; 
    1716   "clean-examples") phing -f build-stubbles.xml clean-examples;; 
    1817   "clear-cache") phing -f build-stubbles.xml clear-cache;;