Many thanks Simon,

Good to see there's a workaround !
I'll note this solution for the future, but as I wrote sooner, I got it by patching the CocoonBean with XSP-specific code remove from 2.1.4 to 2.1.5. But your solution is cleaner.


Thanks again !

--
Olivier


Simon Mieth wrote:
On Wed, 12 Jan 2005 15:47:34 +0100
Olivier Billard <[EMAIL PROTECTED]> wrote:


Thanks for the answer, Simon.
Unfortunatly, this doesn't work for me, because I'm using Windows, and

the environment vars max length isn't that long, to store


all cocoon needed jars... And your solution requires to use the

CLASSPATH env var...

But this could have helped me :)

--
Olivier


Hi Olivier,

Ant can do the job too. Here is a simple build-file.


<project name="XSPPrecompile" default="precompile" basedir="."> <property name="cocoon.home" value="build/webapp"/> <property name="cocoon.work" value="work"/>



<target name="precompile">
<java classname="org.apache.cocoon.bean.XSPPrecompileWrapper"
fork="yes">


       <!-- the commandline switches -->
       <arg line="-c ${cocoon.home} -w ${cocoon.work}"/>

<!-- add here things you need -->
<classpath>
<fileset dir="${cocoon.home}/WEB-INF/lib">
<include name="**/*.jar" />
</fileset>
<fileset dir="${cocoon.home}/WEB-INF/classes">
<include name="**/*.class" />
</fileset>
</classpath> </java>
</target>
</project>



Put this ('precompile.xml') to the cocoon-root folder of your cocoon-distribution and you can use the bundled ant from cocoon by:

java -cp tools/lib/ant.jar;tools/lib/ant-launcher.jar
       org.apache.tools.ant.Main -f precompile.xml

will generate all to the work-directory (cocoon.work-property).


Best Regards,

Simon



Reply via email to