Hi Alexandre, Any reason why you're not using the existing Maven2 plugin for Cargo? :-)
It does support deploying EJB files to JBoss :-) Please join us on the Cargo list if you want to discuss that or suggest ideas of improvement! Thanks -Vincent > -----Original Message----- > From: Alexandre Russel [mailto:[EMAIL PROTECTED] > Sent: vendredi 27 janvier 2006 09:29 > To: Maven Users List > Subject: Re: EJB Unit tests with Maven 2 > > hi, > as far as I know the discussion still goes on on how to set up the test > in maven2: > http://docs.codehaus.org/display/MAVEN/best+practices+-+testing+strategies > > waiting for it to finish, I am using a very cheap hack to test my ejb(I > plan to write a real cactus/cargo plugin for maven2 but want to be sure > how to set up the directories structure first): > > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <version>2.0</version> > </plugin> > <plugin> > <artifactId>maven-antrun-plugin</artifactId> > <version>1.0</version> > <executions> > <execution> > <id>loadJar</id> > <phase>test-compile</phase> > <configuration> > <tasks> > <!-- Creating and deploying the ejb-jar --> > <echo message="${basedir}/${project.build.Directory}"/> > <echo message="${project.name}"/> > <mkdir dir="${project.build.Directory}/tmp" /> > <jar jarfile="target/tmp/vega.jar" basedir="target/classes"/> > <copy toDir="${testServer}" file="target/tmp/vega.jar"/> > <sleep seconds="6"/> > <!-- Creating and deploying the cactus-web-jar --> > <war destFile="target/tmp/vega.war" > webxml="src/test/resources/web.xml"> > <classes dir="target/test-classes" /> > <classes file="src/test/resources/cactus.properties" /> > </war> > <copy > toDir="/usr/local/jboss-4.0.2/server/default/deploy" > file="target/tmp/vega.war" /> > <sleep seconds="4"/> > </tasks> > </configuration> > <goals> > <goal>run</goal> > </goals> > </execution> > <execution> > <id>unloadJar</id> > <phase>test</phase> > <configuration> > <tasks> > <delete dir="target/tmp" /> > <!-- <delete > file="/usr/local/jboss-4.0.2/server/default/deploy/vega.jar"/> --> > <!-- <delete > file="/usr/local/jboss-4.0.2/server/default/deploy/vega.war"/> --> > </tasks> > </configuration> > <goals> > <goal>run</goal> > </goals> > </execution> > </executions> > </plugin> > > >Hi Alan, > > > >Thanks for your reply. I think this discussion applies to Maven 1 since > >Cactus is mentioned. I'm reasonably sure there is no Cactus plugin for > Maven > >2 as yet. > > > >The whole area is indeed a bit of smoke and mirrors, looks like nobody > >develops EJBs with Maven 2 (?!). > > > >Anyway, I think Maven 2 is a bit fresh and I am currently in a process of > >downgrading to Maven 1 to see what happens. At least I should be able to > run > >Cactus cases. > > > >The whole process would do just fine with a bit of howto (not that I am > >volunteering, but who knows :-)) > > > >Regards, > > > >Maciej > > > > > > > > > >>-----Original Message----- > >>From: Allan Ramirez [mailto:[EMAIL PROTECTED] > >>Sent: Friday, 27 January 2006 4:06 PM > >>To: Maven Users List > >>Subject: Re: EJB Unit tests with Maven 2 > >> > >>Hi there, > >> > >>Try this link > >>http://www.nabble.com/what-phase-for-ejb-unit-test-- > t878443.html#a2276847 > >>It might help :) > >> > >>-allan > >> > >>Maciej Mastalarczuk wrote: > >> > >> > >> > >>>Hi Everybody, > >>> > >>> > >>> > >>>I am a recent convert from Ant to Maven and as suggested on Maven's > >>> > >>> > >>website > >> > >> > >>>I started from using Maven 2. Does anybody have any good pattern for > >>>unit-testing EJBs? > >>> > >>> > >>> > >>>Sorry if this is a FAQ, but I really could not find any answer > anywhere. > >>>Tried to use Cargo to do the deployments from within JUnit, but it does > >>> > >>> > >>not > >> > >> > >>>seem to support JBoss 3 (???). I am also aware that I could use ant > >>> > >>> > >>scripts > >>>from within Maven, but it kinda defeats the purpose of using Maven in > the > >> > >> > >>>first place, doesn't it? > >>> > >>> > >>> > >>>Thanks in advance and regards > >>> > >>> > >>> > >>>Maciej > >>> > >>> > >>> > >>> > >>> > >>> > >>>----------------------------------------------------------------------- > - > >>> > >>>No virus found in this incoming message. > >>>Checked by AVG Free Edition. > >>>Version: 7.1.375 / Virus Database: 267.14.23/242 - Release Date: > >>> > >>> > >>1/26/2006 > >> > >> > >>> > >>> > > > > > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]