EAR projects are not correctly referenced in .component 
--------------------------------------------------------

                 Key: MECLIPSE-450
                 URL: http://jira.codehaus.org/browse/MECLIPSE-450
             Project: Maven 2.x Eclipse Plugin
          Issue Type: Bug
         Environment: Eclipse 3.3, Wtp 2.0, Jboss 4.2, Linux
            Reporter: Gabriele Contini
            Priority: Critical


There is a problem generating wtp 2.0 configuration for multi-module j2ee 
applications using ejb 3.0.
Here is my project structure.

{noformat}
myapp
   |--ear
   |   |-- .settings
   |   |        |--- org.eclipse.wst.common.component
   |   |
   |   |-- pom.xml
   |--ejb
   |   |-- pom.xml
   |
   |....
{noformat}



here is a snippet from: myapp/ejb/pom.xml

{code:xml} 
   <project>
        <artifactId>myapp-ejb</artifactId>
        <packaging>ejb</packaging>
        ...
{code} 

here is a snippet from: myapp/ear/pom.xml
{code:xml} 
<dependency>
        <groupId>${pom.groupId}</groupId>
        <artifactId>myapp-ejb</artifactId>
        <version>${pom.version}</version>
        <type>ejb</type>
</dependency>
{code}
and here is a snippet from the generated org.eclipse.wst.common.component file 
in the ear project.
{code:xml} 
<dependent-module archiveName="myapp-ejb.ejb" deploy-path="/" 
handle="module:/resource/myapp-ejb/myapp-ejb">
      <dependent-object>EjbModule_9473961</dependent-object>
      <dependency-type>uses</dependency-type>
</dependent-module>
{code}

Thus inside the ear generated by eclipse i can find an artifact: myapp-ejb.ejb
Whereas the generated application.xml the module is referenced with .jar 
extension:
{code:xml} 
<application ...>
  ---
  <module id="EjbModule_32867124">
    <ejb>myapp-ejb.jar</ejb>
  </module>
{code}
I tried to override the application.xml with a custom one, but it seems that 
jboss doesn't like at all the extension ".ejb" for ejb 3.0 jars.
To make it work i modified by hand the generated 
org.eclipse.wst.common.component file in the ear project like this:

{code:xml} 
<dependent-module archiveName="unirepo-core.jar" deploy-path="/" 
handle="module:/resource/unirepo-core/unirepo-core">
      <dependent-object>EjbModule_12684337</dependent-object>
      <dependency-type>uses</dependency-type>
</dependent-module>
{code} 

At the moment this file must be modified by hand every time i generate the 
eclipse configuration.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to