Joerg Heinicke wrote: > > Carsten Ziegeler wrote: > > Using eclipse is really very simple, you only have to invoke ant once. > > Just add a launch configuration to your project that directly starts > > jetty and uses the build/webapp directory for the webapp. > > > > Now build Cocoon once using ant, this creates the webapp directory, > > copies the samples etc; invoke the eclipse-project and eclipse-webapp > > targets. This updates your eclipse project, removes all jars from > > WEB-INF/lib and restores the cocoon.roles. > > But why removing all jars? I used it the last weeks without removing the > jars. Tomcat > (http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html) > (and also Jetty from my experience) look first at /WEB-INF/classes, > second /WEB-INF/lib/*.jar for the needed classes. This would also allow > the outside usage of the webapp. > Yes, that's try, but if you create a launch configuration for eclipse, it automatically adds all jars from your project to your classpath. So, you have all jars in the startup classpath and in WEB-INF/lib and this can cause problems as the class loaded via WEB-INF/lib is not the same as when loaded via the startup classpath. So, this is a simple but working solution for eclipse. And, as the compiled classes from eclipse are not copied to WEB-INF/classes but to the usual configured output folder, you would get into problems when the cocoon.jars are still in WEB-INF/lib.
> >>From now on you can directly compile, edit and debug in eclipse and > > simply launch the jetty launch target from within eclipse. > > You only have to invoke ant if you change something in the configuration > > or the samples but not for java code. > > PS: I tried to created the launch configuration via ant but failed :( > > I could neither run Ant inside Eclipse - the old endorsed libs problem, > somebody mentioned it already on the list, but I don't know if this > problem was solved. > I don't run ant from Eclipse (at least for cocoon); i use the cli. Carsten
