Hi Peter, > -----Original Message----- > From: Peter Bright [mailto:[EMAIL PROTECTED] > Sent: 21 October 2003 11:21 > To: Maven Users List (E-mail) > Subject: Cactus Plugin > > Hello, > > We have a multiproject project, consisting of an application (generating > an > EAR) and three modules (generating a JAR, an EJB-JAR, and a WAR). > > The desire is to use Cactus to perform in-container testing, and it > appears > that the latest version of the Maven/Cactus plugin contains goals suitable > to achieve this. > > As I understand it, the JAR and EJB projects should run the > cactus:jar-install goals, the WAR project should reference these cactified > artifacts, and the WAR project should run the cactus:test goal. > > Am I correct in thinking that this ability exists, and if so, is the above > the correct way to use it? >
Not quite. First, the jar and ejb-jar projects should install their artifacts in the local repository (using jar:install). If you want to unit test code in your war project using Cactus, simply add the cactus tests in src/test-cactus for this war project. If you want to unit test code in your ejb projects using Cactus, the Cactus plugin for Maven won't help you as it doesn't support packaging code in EARs. However Cactus supports this (the <cactus> Ant task supports this). The way to do it is simply to write a custom goal in your maven.xml. It's quite simple: there's a good example in the cactus distribution; download a Cactus 1.6dev nightly build for J2EE API 1.3 and have a look at the build.xml file in samples/ejb. We already have a todo to support ears in the Cactus plugin for Maven. It's just not done yet. Thanks -Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
