The answer to this question depends very much on what appserver (vendor and version) you are using.
If it is a JEE5 compliant server (JBoss 5.x, WebLogic 10.x, WebSphere 7.x)*, then you do not need manifest classpaths to be generated at all. All jars placed in the lib directory of the EAR will be visible to both EJB and WAR classes. If it is an earlier version, the answer becomes vendor dependent as some support the JEE5 behaviour (as a vendor extension) and some don't. Unfortunately, setting Maven up to put the correct jars in a WAR's WEB-INF/lib and an EAR's lib directory has to be done by hand with explicit dependency control in the case of the EAR and controlled use of <warSourceExcludes> in the war plugin configuration. Cheers, Steve C * There's others, such as glassfish, but I'm not familiar with them. On 20/05/2010, at 6:48 PM, zm wrote: > > Hi, > > I'm having some trouble setting up a basic maven project structure. In this > case, I'm setting up an EAR project with an EJB and a WAR project inside. > > I can successfully build the project, but the problem is as follows: > > I define a defaultJavaBundleDir "lib/" on the ear pom. I want every jar > dependency to be inside that folder, except the ear modules ejb and war, > respectively. > > It all works well, but looking at the manifest, I see a problem ... the > manifest of the war module has every entry with prefixed "lib/", so the ejb > it depends on is defined in the manifest as "lib/my-ejb.jar", when in > reality it is stored on the ear root. > > I was expecting every jar to be prefixed with "lib/" except the webModule > and ejbModule entries defined in maven-ear-plugin. > > Isn't it supposed to be like that? How can I make such setup? > > Note: I'm not generating the ejb client (not using generateClient in ejb > pom), should this be a requirement? I'm new to maven+ejb setup like this, so > I need a bit of light ... > > > Thanks > -- > View this message in context: > http://old.nabble.com/Maven-EAR-%2B-EJB-...-jars-with-prefixed-%22lib-%22-except-for-EJB-tp28618592p28618592.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
