See responses inline.

On Sun, Mar 15, 2009 at 12:24 PM, Thai Dang Vu <[email protected]> wrote:

> This is the directory structure of my project
>
>
[...]


>
> 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?


The default directory for ear sources is src/main/application. If you put
your application.xml file in src/main/application/META-INF/application.xml,
Maven will pick it up automatically. Most users let maven generates it for
you. The ear plugin does that by default.



>
>
> 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?


Well, you invoke mvn package at the root level and it will do that for you.


>
>
> 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?


Make it a dependency :) If you need something, it needs to be a dependency.
You miss the <type>ejb</type> in the jboss-seam dep.


>
>
> 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?


Read the doc a bit more. To explode the modules, there's an option for that
http://maven.apache.org/plugins/maven-ear-plugin/examples/unpacking-a-module.html

For the EAR itself there's a feature request (
http://jira.codehaus.org/browse/MEAR-51) but you can have a direct solution
with the dependency plugin (unpack goal)


>
>
> 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).


Question 1,2,3 are not maven ear plugin's question but Maven questions. You
better have to read more tutorial on Maven itself first

HTH,

S.


>
> Thank you.
>
>
>
>




-- 
Large Systems Suck: This rule is 100% transitive. If you build one, you
suck" -- S.Yegge

Reply via email to