Author: pete.muir(a)jboss.org
Date: 2008-11-04 14:07:19 -0500 (Tue, 04 Nov 2008)
New Revision: 9500
Added:
trunk/examples/wicket/readme.txt
Modified:
trunk/examples/wicket/build.xml
trunk/release-process.txt
Log:
JBSEAM-3621, thanks to Clint Popetz
Modified: trunk/examples/wicket/build.xml
===================================================================
--- trunk/examples/wicket/build.xml 2008-11-04 15:48:04 UTC (rev 9499)
+++ trunk/examples/wicket/build.xml 2008-11-04 19:07:19 UTC (rev 9500)
@@ -2,41 +2,101 @@
<project name="WicketBooking" default="deploy"
basedir="." xmlns:artifact="urn:maven-artifact-ant">
- <!-- Naming -->
- <property name="Name" value="Port of Seam Booking
Example to use Wicket"/>
- <property name="example.name"
value="jboss-seam-wicket-booking"/>
-
- <property name="src.java.dir" value="src/action" />
- <property name="src.web.dir" value="src/web" />
-
- <!-- Libraries to include -->
-
- <property name="seam.wicket.lib" value="yes" />
- <property name="wicket-extensions.lib" value="yes" />
- <property name="wicket-datetime.lib" value="yes" />
-
+ <!-- Naming -->
+ <property name="Name" value="Port of Seam Booking Example to use
Wicket" />
+ <property name="example.name" value="jboss-seam-wicket-booking"
/>
+
+ <property name="src.java.dir" value="src/action" />
+ <property name="src.web.dir" value="src/web" />
+
+
+ <!--If this is set to true, wicket classes are instrumented at build time by
seam's
+ WicketInstrumentationTask. The resulting classes will be placed in WEB-INF/dev if
debug=true,
+ else they'll go in WEB-INF/classes -->
+ <property name="instrumentAtBuildTime" value="true" />
+ <property name="build.web" value="build-web" />
+ <property name="build.instrumented" value="instrumented-web"
/>
+
+ <!-- Libraries to include -->
+
+ <property name="seam.wicket.lib" value="yes" />
+ <property name="seam.debug.lib" value="yes" />
+ <property name="wicket-extensions.lib" value="yes" />
+ <property name="wicket-datetime.lib" value="yes" />
+
<!-- Datasource -->
- <property name="example.ds"
value="jboss-seam-wicket-booking-ds.xml"/>
-
- <import file="../build.xml"/>
-
+ <property name="example.ds"
value="jboss-seam-wicket-booking-ds.xml" />
+
+ <import file="../build.xml" />
+
<target name="compile.web" depends="compile">
- <mkdir dir="${war.dir}/WEB-INF/wicket" />
- <javac destdir="${war.dir}/WEB-INF/wicket"
debug="${javac.debug}" deprecation="${javac.deprecation}"
nowarn="on" >
+ <mkdir dir="${build.web}" />
+ <javac destdir="${build.web}" debug="${javac.debug}"
deprecation="${javac.deprecation}" nowarn="on">
<src path="${src.web.dir}" />
- <classpath refid="build.classpath"/>
- <classpath location="${jar.dir}"/>
+ <classpath refid="build.classpath" />
+ <classpath location="${jar.dir}" />
</javac>
+ </target>
+
+ <target name="instrument" depends="compile.web"
if="instrumentAtBuildTime">
+ <taskdef name="instrumentWicket"
classname="org.jboss.seam.wicket.ioc.WicketInstrumentationTask">
+ <classpath>
+ <pathelement location="${lib.dir}/jboss-seam-wicket-ant.jar" />
+ <pathelement location="${lib.dir}/jboss-seam-wicket.jar" />
+ <pathelement location="${lib.dir}/javassist.jar" />
+ <pathelement location="${lib.dir}/jboss-seam.jar" />
+ </classpath>
+ </taskdef>
+
+ <path id="instrument.path">
+ <path refid="build.classpath" />
+ <pathelement location="${jar.dir}" />
+ <pathelement location="${build.web}" />
+ </path>
+
+ <instrumentWicket outputDirectory="${build.instrumented}">
+ <classpath refid="instrument.path" />
+ <fileset dir="${build.web}">
+ <and>
+ <filename name="**/*.class" />
+ <!-- only instrument things that have changed since last time -->
+ <modified>
+ <param name="cache.cachefile"
value="instrumentcache.properties" />
+ </modified>
+ </and>
+ </fileset>
+ </instrumentWicket>
+ </target>
+
+ <target name="copyWicketClasses" depends="compile.web"
unless="instrumentAtBuildTime">
+ <mkdir dir="${war.dir}/WEB-INF/wicket" />
<copy todir="${war.dir}/WEB-INF/wicket">
<fileset dir="${src.web.dir}">
- <include name="**/*.component.xml" />
<include name="**/*.html" />
<include name="seam.properties" />
</fileset>
+ <fileset dir="${build.web}" includes="**/*.class" />
</copy>
</target>
-
+
+ <target name="copyWicketInstrumentedClasses" depends="instrument"
if="instrumentAtBuildTime">
+ <condition property="wicketClassDestination"
value="${war.dir}/WEB-INF/dev" else="${war.dir}/WEB-INF/classes">
+ <istrue value="${debug}" />
+ </condition>
+
+ <mkdir dir="${wicketClassDestination}" />
+ <copy todir="${wicketClassDestination}">
+ <fileset dir="${src.web.dir}">
+ <include name="**/*.html" />
+ <include name="seam.properties" />
+ </fileset>
+ <fileset dir="${build.instrumented}" includes="**/*.class"
/>
+ </copy>
+ </target>
+
+
+
<!-- Examples build hook point for running targets before creating the war -->
- <target name="init.war" depends="compile.web" />
-
+ <target name="init.war"
depends="copyWicketClasses,copyWicketInstrumentedClasses" />
+
</project>
Added: trunk/examples/wicket/readme.txt
===================================================================
--- trunk/examples/wicket/readme.txt (rev 0)
+++ trunk/examples/wicket/readme.txt 2008-11-04 19:07:19 UTC (rev 9500)
@@ -0,0 +1,6 @@
+Seam Wicket Example
+===============
+This is a port of the Booking example to Wicket.
+
+By default it uses build time instrumentation, but you can use runtime
+instrumentation by specifying -DinstrumentAtBuildTime=false
\ No newline at end of file
Property changes on: trunk/examples/wicket/readme.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/release-process.txt
===================================================================
--- trunk/release-process.txt 2008-11-04 15:48:04 UTC (rev 9499)
+++ trunk/release-process.txt 2008-11-04 19:07:19 UTC (rev 9500)
@@ -231,7 +231,7 @@
- spring
- todo (tutorial)
- ui
- - wicket
+ - wicket (you should verify both buildtime instrumentation and runtime
instrumentation)
* Tomcat 6 examples
- Note: use JBoss embedded unless specified differently
- blog (tutorial)