[
https://jira.jboss.org/jira/browse/JBSEAM-3505?page=com.atlassian.jira.pl...
]
Clint Popetz commented on JBSEAM-3505:
--------------------------------------
I've implemented this, patch attached.
The patch does the following:
* move runtime-classloading-specific stuff from JavassistInstrumentor into
WicketClassLoader
* make JavassistInstrumentor usable from outside classes by making its constructor take a
Javassist classpool, and make instrumentClass return the CtClass it creates, and be
public.
* Make WicketClassLoader use that interface.
* Create a new WicketInstrumentationTask class that also uses this interface. This is an
ant task (see below for example usage.)
* Rather than havingthe classloader call WickeComponent.create, since that won't work
for the case that the instrumentation is not done by the classloader, have
JavassistInstrumentor create a <clinit> to do that.
* Make WicketFilterInstantiator not know about JavassistInstrumentor. It just knows about
WicketClassLoader.
* build the wicket ant task into lib/jboss-seam-wicket-ant.jar
Example usage of the task would be:
<target name="instrumentweb">
<taskdef name="instrumentWicket"
classname="org.jboss.seam.wicket.ioc.WicketInstrumentationTask">
<classpath>
<pathelement location="lib/jboss-seam-wicket-ant.jar"/>
<pathelement location="lib/jboss-seam.jar"/>
<pathelement location="lib/jboss-seam-wicket.jar"/>
<pathelement location="lib/javassist.jar"/>
</classpath>
</taskdef>
<path id="web.classpath">
<path refid="build.classpath"/>
<pathelement location="classes/web" />
</path>
<instrumentWicket outputDirectory="${war.dir}/WEB-INF/classes">
<classpath refid="web.classpath"/>
<fileset dir="classes/web"/>
</instrumentWicket>
</target>
Note that there are two nested elements for this task:
(1) a classpath
(2) a set of classes to instrument
and one attribute (where to put the output classes.)
Support instrumentation of wicket classes at build time
-------------------------------------------------------
Key: JBSEAM-3505
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3505
Project: Seam
Issue Type: Feature Request
Components: Wicket
Reporter: Pete Muir
Attachments: seam-wicket-ant-task.diff
Currently instrumentation is done through a custom classloader. If it was done at build
time, the classes could be deployed to WEB-INF/classes
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira