Creating a lenya Project in Eclipse

Instructions are specific to Eclipse 3.0.2 but should be similar in other version's. Also check out the instructions over at the Cocoon wiki

You should be ready to roll, this was my experience. If you have other issues or hints, please add them :)

Running Lenya in the Eclipse debugger

First way

ripped from http://wiki.apache.org/cocoon/LoadInEclipse

Preparation

Eclipse Setup

This will launch Jetty from within Eclipse and you'll see Jetty's output in the console of your debug perspective. Your application should run at http://localhost:8888/.

ProgramArguments

./tools/jetty/conf/main.xml

VMArguments

-Djava.endorsed.dirs=./lib/endorsed
-Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser
-Djetty.port=8888
-Dloader.jar.repositories=./tools/jetty/lib:./lib/endorsed
-Dwebapp=./build/lenya/webapp
-Dhome=.
-Dloader.main.class=org.mortbay.jetty.Server

MainClass

Loader

Classpath

Add all libs under build/lenya/webapp/WEB-INF/lib to your project classpath. This is needed to compile Lenya in Eclipse and that the VM finds all libs if Lenya/Cocoon is started by Eclipse.

Addionally add tools/loader to the classpath of your newly created program.
To start Lenya in debugger choose Run->Debug... and choose your application and press debug.

2nd way

./lenya.sh servlet-debug

Another Way (Tomcat&Eclipse)

Download and install: http://www.sysdeo.com/eclipse/tomcatplugin

configure: Window->Preferences... Tomcat, Tomcat Version, Tomcat Home, Context declaration Mode.

now you can start your tomcat from within eclipse. if you do so you can use the debugger.