Issue Details (XML | Word | Printable)

Key: CACTUS-72
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vincent Massol
Reporter: Ryan Sonnek
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Cactus

Problem with the cactus:test-ear

Created: 17/Nov/03 11:54 PM   Updated: 17/Apr/04 03:44 PM
Return to search
Component/s: Maven Integration
Affects Version/s: None
Fix Version/s: 1.6

Time Tracking:
Not Specified

File Attachments:
  Size
Text File cactus.patch 2003-12-20 01:17 AM Vincent Massol 22 kB
Environment:
Operating System: All
Platform: All

Bugzilla Id: 24754


 Description  « Hide
the maven plugin should be extended to test ear distributions. war testing is
fine and dandy, but to test a war application that connects to EJB's an EAR file
must be used.
this is a migration issue from maven's JIRA issue tracker.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vincent Massol added a comment - 20/Dec/03 01:17 AM
Created an attachment (id=9644)
Patch from Michael Gaffney (originated from Maven, see: http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-706)

Vincent Massol added a comment - 20/Dec/03 01:19 AM
Almost finished applying it. Just need to create an ejb test application to
verify it works + update xdocs...

Vincent Massol added a comment - 20/Dec/03 08:15 PM
Done in CVS.

Sean Timm added a comment - 09/Jan/04 03:15 AM
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.

Vincent Massol added a comment - 12/Jan/04 12:49 AM
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

Archimedes Trajano added a comment - 10/Feb/04 02:59 AM
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

Archimedes Trajano added a comment - 10/Feb/04 05:05 AM
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

Archimedes Trajano added a comment - 10/Feb/04 05:17 AM
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.