jstrachan 2002/06/11 00:50:47
Modified: src/bin example-userbuild.jelly
Log:
updated the example user build file to show how we could define user (project
specific) callbacks
using Bob's Werkz library and using Jelly to define the targets using Ant-style XML.
One difference from standard Ant is that we're using Jexl for all the expressions,
so what looks like standard Ant can dynamically pull from the POM.
If required we can also use non-verbose logical branching or looping.
Revision Changes Path
1.2 +26 -21 jakarta-turbine-maven/src/bin/example-userbuild.jelly
Index: example-userbuild.jelly
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/bin/example-userbuild.jelly,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- example-userbuild.jelly 10 Jun 2002 16:01:04 -0000 1.1
+++ example-userbuild.jelly 11 Jun 2002 07:50:47 -0000 1.2
@@ -1,38 +1,43 @@
+<?xml version="1.0"?>
+
<!--
|| 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
+ || by defining the callbacks before calling maven to do all the work
+ || using the Werkz library underneath the covers
-->
+
<j:jelly
xmlns="jelly:ant"
xmlns:j="jelly:core"
- xmlns:maven="jelly:maven"
+ xmlns:maven="jelly:maven">
- <!-- initialise Maven and create the POM etc -->
- <maven:init/>
-
+ <!--
+ || Create all the callbacks using the Maven/Wertz tag library.
+ ||
+ || The body of these tags can use regular Ant expresssions
+ || as well as full Jexl expressions to pull values from the POM.
+ || Inside the body we can use all exported Maven properties, references,
+ || the POM etc.
+ -->
- <!-- 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 before I invoke maven's compile... -->
+ <maven:preAction goal="compile">
+ <copy dest="${maven.build.dir}">
+ <fileset dir="${poi.build.sourceDirectory}" includes="*.xml"/>
+ </copy>
+ </maven:preAction>
-
- <!-- do something after maven has done its bit -->
+ <!-- do something after I invoke maven's compile... -->
+ <maven:postAction goal="compile">
<delete>
- <fileset dir="${xoy}/bar" includes="*.tmp"/>
+ <fileset dir="${maven.build.dir}/foo" includes="*.tmp"/>
</delete>
- </maven:target>
+ </maven:postAction>
<!-- now call Maven to do all the work and to call whatever targets need to be
run -->
- <maven:invoke/>
+ <j:import uri="${maven.home}/build.jelly"/>
+
</j:jelly>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>