...Would it make sense to add the possibility to debug the application too? It would be a matter of adding a couple of jvmargs likeVery useful IMHO, go for it!
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/> >
This way, it would be a piece of cake to remotely debug the application. I'm just wondering whether it should be another target or a switch like "./build.sh -Dcocoon.debug run".
If you want to include it, here's what I use in another project to start the JSWAT debugger. We might not want to distribute it with Cocoon, but at least people could download it and not have to mess with settings too much, it would start with the correct paths to find everything.
<!-- classpath for jswat debugger -->
<path id="jswat.classpath">
<fileset dir="lib/jswat">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- start the jswat debugger -->
<target name="jswat" description="run the jswat debugger">
<echo>-jswat debugging--------------------------------------------------------------- ----</echo>
<echo>Attempting to start the jswat debugger for ${ant.project.name}...</echo>
<echo>Then, start "./build.sh -Dcocoon.debug run" and then "./build.sh jswat", and use "session/attach to remote" in jswat, with the port numb
er set by jvm.extra.args</echo>
<echo>WARNING: using this debugger requires running both the "run" and "jswat" targets under JDK 1.4</echo>
<echo>------------------------------------------------------------------ ------------------------------</echo>
<!-- open jswat debugger for remote debugging in project env -->
<java classname="com.bluemarsh.jswat.Main" fork="yes">
<jvmarg value="-Djava.source.path=${src}"/>
<classpath refid="jswat.classpath"/>
<classpath refid="compile.classpath"/>
<classpath refid="runtime.classpath"/>
<classpath refid="test.classpath"/>
</java>
</target>
-Bertrand