This is the directory structure of my project

seam-glassfish
 |-- ear
 |    |-- pom.xml
 |-- ejb
 |    |-- src
 |    |-- pom.xml
 |-- war
 |    |-- src
 |    |-- pom.xml
 |-- pom.xml

This is the parent pom.xml:

<modelVersion>4.0.0</modelVersion>
<groupId>home</groupId>
<artifactId>seam-glassfish</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>seam-glassfish</name>
<modules>
    <module>ejb</module>
    <module>war</module>
    <module>ear</module>
</modules>
<!-- nothing special about other parts -->

This is my ejb/pom.xml:

<modelVersion>4.0.0</modelVersion>
<artifactId>seam-glassfish-ejb</artifactId>
<packaging>ejb</packaging>
<name>seam-glassfish-ejb</name>
<parent>
    <groupId>home</groupId>
    <artifactId>seam-glassfish</artifactId>
    <version>1.0-SNAPSHOT</version>
</parent>
<!-- nothing special about other parts -->

This is my war/pom.xml:

<modelVersion>4.0.0</modelVersion>
<artifactId>seam-glassfish-war</artifactId>
<packaging>war</packaging>
<name>seam-glassfish-war</name>
<parent>
    <groupId>home</groupId>
    <artifactId>seam-glassfish</artifactId>
    <version>1.0-SNAPSHOT</version>
</parent>
<dependencies>
    <dependency>
        <groupId>home</groupId>
        <artifactId>seam-glassfish-ejb</artifactId>
        <version>1.0-SNAPSHOT</version>
    </dependency>

This is my ear/pom.xml:

<modelVersion>4.0.0</modelVersion>
<artifactId>seam-glassfish-ear</artifactId>
<packaging>ear</packaging>
<name>seam-glassfish-ear</name>

<parent>
    <groupId>home</groupId>
    <artifactId>seam-glassfish</artifactId>
    <version>1.0-SNAPSHOT</version>
</parent>

<dependencies>
    <dependency>
        <groupId>home</groupId>
        <artifactId>seam-glassfish-ejb</artifactId>
        <version>1.0-SNAPSHOT</version>
        <type>ejb</type>
    </dependency>
    <dependency>
        <groupId>home</groupId>
        <artifactId>seam-glassfish-war</artifactId>
        <version>1.0-SNAPSHOT</version>
        <type>war</type>
    </dependency>
</dependencies>

I have some questions here:

1. How to tell the maven-ear-plugin to use my application.xml? And where in the 
ear directory should I place my own application.xml?

2. Because of the dependency on the ejb, I have to run mvn install in the ejb 
directory before I can run mvn compiler:compile in the war directory. Is there 
any way (like target dependencies in ant) to tell maven to compile / install 
all modules needed before the mvn compiler:compile is executed?

3. In my application.xml, beside the ejb and war modules, I need to add one 
more module like this:

<module><ejb>jboss-seam-2.1.1.GA.jar</ejb></module>

The jboss seam jar file can be found with a <dependency>. What should I do to 
tell maven to include that file into the root of the ear file it creates when I 
run mvn ear:ear in the ear directory?

4. If I don't want to create the seam-glassfish-ear-1.0-SNAPSHOT.ear file, but 
a seam-glassfish-ear-1.0-SNAPSHOT_ear directory in which the ejb module is 
unpacked in the seam-glassfish-ejb-1.0-SNAPSHOT_jar directory, the war module 
is unpacked in the seam-glassfish-war-1.0-SNAPSHOT_war directory and the jboss 
seam library above is unpacked in the jboss-seam-2.1.1.GA_jar directory, what 
should I do?

I read the http://maven.apache.org/plugins/maven-ear-plugin/ but found no shine 
to my questions (maybe there are, but not apparent to a maven newbie like me).

Thank you.



      

Reply via email to