views:

806

answers:

2

How can I import a maven EAR project into Eclipse 3.4, and be able to use the IDE (WTP) to deploy the ear successfully to Weblogic (9.2)?

The main issue is that the dependent jars are not being included in the ear (under APP-INF/lib) when it gets deployed through the IDE. When I build from command line, the ear is exactly how I want it.

I am using the APP-INF/lib configuration for the ear plugin, and have included the jarModule sections for all the required jars.

When editing the eclipse EAR project's Java EE components, all the jars are listed, but not in the APP-INF/lib. Only when I open a dependent jar project do those specific jars get set under that subfolder. All the 3rd party jars are showing they will end up in the wrong place.

If you need more info, just let me know. Thanks!

A: 

You might want to use maven to create the eclipse WTP projects for you. This might be helpful.

sal
A: 

The Using maven-eclipse-plugin in multi-module projects with WTP of the maven website describes how to develop Multi-module projects with Maven and Eclipse efficiently using the best of both Maven 2 and Eclipse's WTP. This covers projects that have EJB and EAR modules.

An fully working example of a multi-module projects, containing some JAR-, a WAR- and an EAR-project is even available for download if necessary.

Pascal Thivent