Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6
    • Component/s: Maven Integration
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      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.

        Activity

        Hide
        Vincent Massol added a comment -

        Created an attachment (id=9644)
        Patch from Michael Gaffney (originated from Maven, see: http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-706)

        Show
        Vincent Massol added a comment - Created an attachment (id=9644) Patch from Michael Gaffney (originated from Maven, see: http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-706 )
        Hide
        Vincent Massol added a comment -

        Almost finished applying it. Just need to create an ejb test application to
        verify it works + update xdocs...

        Show
        Vincent Massol added a comment - Almost finished applying it. Just need to create an ejb test application to verify it works + update xdocs...
        Hide
        Vincent Massol added a comment -

        Done in CVS.

        Show
        Vincent Massol added a comment - Done in CVS.
        Hide
        Sean Timm added a comment -

        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.

        Show
        Sean Timm added a comment - 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.
        Hide
        Vincent Massol added a comment -

        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

        Show
        Vincent Massol added a comment - 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
        Hide
        Archimedes Trajano added a comment -

        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

        Show
        Archimedes Trajano added a comment - 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
        Hide
        Archimedes Trajano added a comment -

        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

        Show
        Archimedes Trajano added a comment - 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
        Hide
        Archimedes Trajano added a comment -

        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.

        Show
        Archimedes Trajano added a comment - 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.

          People

          • Assignee:
            Vincent Massol
            Reporter:
            Ryan Sonnek
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development