I just started a new Maven project that is designed to run a Jetty containing a war-file from a dependent project. For this you need the right plugin.
Unfortunately, this does not work for me. It starts Jetty successfully, but it contains only the default-war-war file, not the expected one.
This is an important part of my war file:
<dependencies> <dependency> <groupId>com.group</groupId> <artifactId>my-webapp</artifactId> <version>0.1.0-SNAPSHOT</version> <type>war</type> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.0.5</version> <configuration> <container> <containerId>jetty7x</containerId> <type>embedded</type> </container> <configuration> <properties> <cargo.servlet.port>7070</cargo.servlet.port> <cargo.logging>high</cargo.logging> </properties> </configuration> <deployer> <type>embedded</type> <deployables> <deployable> <groupId>com.group</groupId> <type>war</type> <artifactId>my-webapp</artifactId> <properties> <context>/path</context> </properties> </deployable> </deployables> </deployer> </configuration> </plugin> </plugins> </build>
I use the plugin by running mvn cargo: start.
No error log output.
[INFO] [cargo:start] [INFO] [beddedLocalContainer] Jetty 7.x Embedded starting... 2011-01-17 18:57:44.586:INFO::jetty-7.2.0.v20101020 2011-01-17 18:57:44.663:INFO::Extract jar:file:/tmp/cargo/conf/cargocpc.war!/ to /tmp/jetty-0.0.0.0-7070-cargocpc.war-_cargocpc-any-/webapp 2011-01-17 18:57:45.082:INFO::Started SelectChannelConnector@0.0.0.0 :7070 [INFO] [beddedLocalContainer] Jetty 7.x Embedded started on port [7070]
How can I transfer Cargo to load the specified war file?
source share