> From: Diana Shannon [mailto:[EMAIL PROTECTED]]
> 
> On Wednesday, July 24, 2002, at 05:42  AM, Nicola Ken Barozzi wrote:
> 
> > Just a tip: if you install Cocoon jars in the WEB-INF/lib, you can
add
> > your classes in WEB-INF/classes, and just restart Tomcat to use the
new
> > classes. I do it also when developing Cocoon itself, since classes
come
> > before of the libs in the classpath. ;-)
> 
> 
> I received this helpful tip from Ivelin some time ago.
> 
> Use a build target of webapp-local to generate classes

I found that it might be slower then webapp target without jarring:

<!--
    <jar jarfile="${build.dir}/${name}.war" basedir="${build.war}"
includes="**" manifest="${build.war}/WEB-INF/Manifest.mf"/>
-->

Because webapp-local copies lots of classes, it is faster to zip'em into
cocoon.jar.



> (faster than a
> war build). Instead of restarting Cocoon, however, use Tomcat's
manager
> to install a path to the updated webapp, e.g.:

Instead of using Tomcat, I use Resin for development work:

1. Add to resin.conf:
    <web-app id='/cocoon' app-dir='/apache/cocoon/build/cocoon/webapp'/>

2. Copy Java sources and classes you are working on to
.../cocoon/webapp/WEB-INF/classes

3. Start resin

4. Start your favorite IDE, point it to WEB-INF/classes (it has java
sources too, see 2)

5. Edit Java file in IDE, save it, switch to browser, refresh, and ....
*magic*! Resin will recompile (!) Java code and restart Cocoon (!!)
automatically (!!!).

That's how I achieved the fastest edit/compile/deploy cycle.

PS I use IDEA so compilation errors are very rare. Also, you can compile
single class by using "Ctrl + Shift + F9" (IIRC).

:)


Vadim

> 
>
http://localhost:8080/manager/install?path=/cocoon&war=file:/cvs/c2-HEAD
/
> xml-cocoon2/build/cocoon/webapp
> 
> When you make a change that requires another webapp build, remove the
> webapp:
>    http://localhost:8080/manager/remove?path=/cocoon
> 
> Then perform another webapp-local build and use the manager (as above)
> to install webapp again.
> 
> A few other notes:
> - I typically disable all caching so I'm not sure if this works with
> caching enabled (i.e. without a clean work directory each time).
> - To get manager working, you need to make sure you have a manager
> context specified in server.xml
> - You need to add a <user name="manager"   password="ZZZ" roles="ZZZ"
/>
> to <tomcat-users/> in tomcat-users.xml
> 
> Does anyone else use this?
> 
> -- Diana


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to