I'm have a couple of projects that generate EAR files. These EARs are
not dependent on eachother and this works just fine.

However, now I want to include an EJB client jar from EAR 1 in EAR 2.
I can't find the right recipe to make this work.

I have this:

Project 1: Generates a project1.ear and an project1-ejb-1.0-client.jar
as artifacts.

Project 2: Tries to include project1-ejb-1.0-client.jar in the following manner:

<project>
  <groupId>project2</groupId>
  <artifactId>project2-ear</artifactId>
  <packaging>ear</packaging>

  <dependencies>
    <dependency>
       <groupId>project1</groupId>
       <artifactId>project1-ejb</artifactId>
       <version>1.0-SNAPSHOT</version>
       <type>ejb-client</type>
    </dependency>
  </dependencies>

 <build>
   <finalName>project2-${project.version}</finalName>
   <plugins>
     <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-ear-plugin</artifactId>
       <configuration>
         <displayName>Project2</displayName>
         <description>Project2</description>
         <version>5</version>
           <modules>
             <webModule>
                <groupId>project2</groupId>
                <artifactId>project2-war</artifactId>
                <contextRoot>/foo</contextRoot>
             </webModule>
             <javaModule>
                <groupId>project1</groupId>
                <artifactId>project1-ejb</artifactId>
                <includeInApplicationXml>true</includeInApplicationXml>
             </javaModule>
           </modules>
       </configuration>
     </plugin>
   </plugins>
 </build>

</project>

The error I'm getting is:

[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Artifact[project1:project1-ejb:jar] is not a dependency of the project.

Is this a shortcoming of the maven-ear-plugin maybe? In that it does
not recognize ejb-client as a module type?

S.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to