jstrachan    2002/06/10 09:01:04

  Added:       src/bin  example-userbuild.jelly
  Log:
  Added an experimental, brain storming way in which users could define Ant-like XML 
files for overriding Maven targets.
  
  So this is an alternative to the call-back idea. Notice that there's no pair of 
properties to set for each pre/post condition. 
  Just a simple bit of XML then use regular Ant tasks.
  
  I'd certainly prefer to do plugins this way. It would also avoid having to cut and 
paste all the various Maven targets into a build file.
  If I don't need callbacks I wouldn't need this at all.
  
  Or maybe this stuff could be put in the project.xml?
  
  Revision  Changes    Path
  1.1                  jakarta-turbine-maven/src/bin/example-userbuild.jelly
  
  Index: example-userbuild.jelly
  ===================================================================
  <!--
    || An example user build file
    || which demonstrates an alternative way to work with callbacks
    || by actually defining the plugins before calling <maven> to do all the work
    -->
  <j:jelly
    xmlns="jelly:ant"
    xmlns:j="jelly:core"
    xmlns:maven="jelly:maven"
  
    <!-- initialise Maven and create the POM etc -->
    <maven:init/>
    
  
    <!-- override certain targets to invoke 'callbacks' -->  
    
    <maven:target name="compile">
    
      <!-- do something before I invoke maven's compile... -->
      <copy>
          <fileset dir="${foo}/bar" includes="*.xml"/>
      <copy>
                
  
        <!-- invoke the body of the <compile> tag that Maven defines -->    
      <maven:invokeBody>
  
      
      <!-- do something after maven has done its bit -->
      <delete>
          <fileset dir="${xoy}/bar" includes="*.tmp"/>
      </delete>
    </maven:target>             
  
  
    <!-- now call Maven to do all the work and to call whatever targets need to be run 
-->      
    <maven:invoke/>
  </j:jelly>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to