On Tue, Apr 26, 2011 at 1:51 AM, Ate Douma <[email protected]> wrote: > > On 04/25/2011 10:17 PM, Sander van der Waal wrote: > >> What kind-of works is using embedded Jetty in the configuration of the >> cargo > > plugin. >> > > I strongly suggest not using Embedded Jetty (or other container) from > within Eclipse or through Maven. The problem with an (in-process) embedded > container is that it will be exposed to the current process classpath, which > can cause all kinds of unexpected/undesired side-effects. Which also are not > reproducible in a "standalone" java process. We've actually been bitten by > that, ressulting in very tricky things like masking problems which only then > surface when running standalone...
That's a good point. Although I knew you can get nasty classpath problems in a setup like this I've never come across those myself. Which makes one a bit lazy, I guess.. ;) > > > To get this going replace the<container> in the cargo-maven2-plugin >> configuration of >> the rave-portal/pom.xml with: >> >> <container> >> <containerId>jetty7x</containerId> >> <type>embedded</type> >> </container> >> >> Also, the shindig war needs to matched to context '/' instead of '/ROOT'. >> > Ah. I think that defining context '/' will also lead to deploying it to a > ROOT.war to Tomcat so we simply change that. > > >> Gotchas: >> - I tried Jetty 6 first but got into a lot of trouble with JSP/JSTL/el-api >> misconfiguration, >> because there are jstl and el-api libs prebundled in the shindig war >> that >> need to be matched. >> - Using the config above I can set breakpoints in the Java code and change >> stuff there >> which will be hot-deployed, however changes in JSPs were not picked up, >> don't know >> why yet. >> > That only works when you use the (embedded) maven-jetty-plugin, which hooks > up filescanner thread to monitor the (maven) resources folders by itself for > changes. So that is an embedded jetty plugin only feature and won't work > with Cargo. > If you run mvn cargo:start from the command line, you get the exact same > (remote) debugging capabilities with the Tomcat container, but also without > support for resource (JSPs) changes being picked up (see my easlier longish > reply to Ross). Thanks Ate, good to know. Sander
