> 1. If I want to use slf4j in all modules, should I declare it in the
> <dependencyManagement> of the parent pom.xml and in each
> module pom.xml I declare it in <dependency> without its version?

Sure.

> Then when the .ear file is generated (mvn ear:ear doesn't work in
> my case yet), where are all the slf4j .jars stored?

Potentially in numerous places. You probably want to read and apply:
http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html

> In `lib' directory because of <defaultLibBundleDir>lib
> </defaultLibBundleDir> or somewhere else?

Once you get your EAR working, you can just unzip the ear and check the
contents.

> 2. When I run mvn ear:generate-application-xml in the parent project,
> maven said it could not resolve dependencies for project home:ear-
> only1:ear:0.1-snapshot. How can I tell maven to do whatever needed
> with the web and ejb modules first and use the result to generate the
> application.xml file?

You should run "mvn install" in the parent project dir at least once to get
the jars and wars into your local cache, then it should work.

Wayne

Reply via email to