I am switching from the Maven plug-in to the Cargo plug-in (load-maven2-plugin), because Cargo will successfully run the WAR from Maven dependent modules. As part of the web application, we are working hard to externalize the entire configuration through JNDI. These JNDI definitions are web-specific and are therefore located in the jetty-env.xml file, which is outside the WAR. Using the Jetty plugin, we specified this file as follows:
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <configuration> <jettyEnvXml>${basedir}/target/config/jetty-env.xml</jettyEnvXml> </configuration> </plugin>
How to do this to indicate this in the Cargo plugin? Here I still have the configuration. This, of course, fails due to a missing JNDI configuration:
<plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <configuration> <container> <containerId>jetty6x</containerId> <type>embedded</type> </container> <configuration> <deployables> <deployable> <groupId>com.mycompany</groupId> <artifactId>my-war-module</artifactId> <type>war</type> <properties> <context>/</context> </properties> </deployable> </deployables> </configuration> <wait>false</wait> </configuration> <executions> ...... </executions> </plugin>
java web-applications maven-2 jetty maven-cargo
Hdave
source share