|
Almost finished applying it. Just need to create an ejb test application to
verify it works + update xdocs... The way that the EAR testing works is far too presumptuous. It calls the
ejb:ejb task assuming that an EJB needs to be built. In my EAR project, any EJBs have already been built via their own build file, and the EAR project just compiles them all together into the EAR. The EAR testing should be modified to use the ear:ear task just like cactifywar does for WAR files. Hi Sean,
AFAIK, the way EAR testing is implemented is exactly the same as for WARs (except that the EJB is packaged in an EAR). The cactus:test-war goal calls war:war and the cactus:test-ear calls ejb:ejb. In latest versions of Maven, I think you have the ability to replace a goal by your own by redefining it in your maven.xml file for example (not sure though). It it worked, that would do the trick. That said, for now, I've added 2 properties: cactus.build.goal.war = war:war cactus.build.goal.ejb = ejb:ejb Thus you can override these properties in your project and point them to any of your own goal if you wish. Thanks -Vincent Not sure if I am the only one getting this, but there seems to be a bug in the
current development (and CVS build) with the cactus:test-ear target where the value of "cactus.ear" is empty causing an access is denied problem. ejb:ejb: [echo] Building ejb cactustest-1.0 [jar] Building jar: C:\Projects\cactustest\target\cactustest-1.0.jar [ear] error while reading original manifest: Access is denied [ear] Building ear: C:\Projects\cactustest BUILD FAILED File...... file:/C:/Documents and Settings/trajano/.maven/plugins/cactus-maven- 1 .6dev/ Element... ant:ear Line...... 882 Column.... 53 Problem creating ear: C:\Projects\cactustest (Access is denied) (and the archive is probably corrupt but I could not delete it) Total time: 9 seconds Finished at: Mon Feb 09 13:56:23 EST 2004 Also if I hard code it into the project.properties (which shouldn't be the case) I get the following: ejb:ejb: [echo] Building ejb cactustest-1.0 [ear] Building ear: C:\Projects\cactustest\target\cactustest-cactus.ear BUILD FAILED File...... file:/C:/Documents and Settings/trajano/.maven/plugins/cactus-maven- 1 .6dev/ Element... cactus Line...... 935 Column.... 53 Could not find cactified web module in the EAR Total time: 8 seconds Finished at: Mon Feb 09 13:58:12 EST 2004 Got cactus:test-ear to work by adding the following (which should've been
calculated) into the project.properties cactus.war.dir=target/ cactus.war=target/cactustest-cactus.war cactus.war.name=cactustest-cactus.war found out the reason why. the maven-cactus-plugin is still installed. I hope
its removed in future releases or make the new one we downloaded take priority somehow. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Patch from Michael Gaffney (originated from Maven, see: http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-706)