You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tom Cunningham <cu...@mac.com> on 2006/04/27 15:44:14 UTC

Problem with maven-ear-plugin?

Hi,

I'm trying to build an ear in Maven 2 with the maven-ear-plugin.    The problem I'm seeing is that the plugin is generating two different application.xml's and the one that gets stuck into the ear doesn't seem correct.    The one that gets stuck into the ear doesn't give any entries for the ejbModules I have defined.

My project has three dependencies and each should be a module in the application.xml.    Here's what I have defined in my pom.xml :
<dependencies>
    <dependency>
      <groupId>vfa</groupId>
      <artifactId>facility-war</artifactId>
      <version>8.0</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>vfa</groupId>
      <artifactId>persistence</artifactId>
      <scope>provided</scope> 
      <version>8.0</version>
      <type>ejb</type>
    </dependency>
    <dependency>
      <groupId>vfa</groupId>
      <artifactId>facility</artifactId>
      <version>8.0</version>
      <type>ejb</type>
    </dependency>
</dependencies>	
	<build>
    	<plugins>
      	<plugin>
	<groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <configuration>
	  <modules>
	    <ejbModule>
		<groupId>vfa</groupId>
		<artifactId>facility</artifactId>
		<bundleDir>/</bundleDir>
	    </ejbModule>
	    <webModule>
		<groupId>vfa</groupId>
		<artifactId>facility-war</artifactId>
		<context-root>vfa</context-root>
	    </webModule>
	    <ejbModule>
		<groupId>vfa</groupId>
		<artifactId>persistence</artifactId>
		<bundleDir>/</bundleDir>
	    </ejbModule>
	  </modules>
        </configuration>
      	</plugin>
	</plugins>

When I run "maven install", I find an application.xml in the target directory that looks okay to me:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
        "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
        "http://java.sun.com/dtd/application_1_3.dtd">
<application>
  <display-name>facility-ear</display-name>
  <module>
    <ejb>facility-8.0.jar</ejb>
  </module>
  <module>
    <web>
      <web-uri>facility-war-8.0.war</web-uri>
      <context-root>vfa</context-root>
    </web>
  </module>
  <module>
    <ejb>persistence-8.0.jar</ejb>
  </module>
</application>

However, this isn't the application.xml that gets into the ear.    The  one going into the ear
has no ejb modules defined.

<?xml version="1.0" encoding="UTF-8"?>
<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="ht
tp://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com
/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<description>Facility Prototype</description>
<display-name>Facility Prototype</display-name>
<module>
<web>
<web-uri>facility-war-8.0.war</web-uri>
<context-root>/vfa</context-root>
</web>
</module>
</application>

Am I doing something wrong here?   Is this a bug?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org