[ http://jira.codehaus.org/browse/MEAR-46?page=comments#action_79412 ] Stephane Nicoll commented on MEAR-46: -------------------------------------
Hi David, Well. Let's take it the other way around. {quote} The <module><java></java></module> in an application.xml is for application clients (aka ejb clients) {quote} True but you are misunderstanding maven artifact's types and Ear module's types. At first, JavaModule was linked to the "jar" maven's artifact type and is subclassed by the EjbClientModule which is linked to the "ejb-client" maven's artifact type. Some application servers such as JBoss allows to define 3rd party libs within a <java> module element. Even if it's not in the spec, lots of users are using it as a convenience method to handle EAR dependencies. It's disabled by default. As a summary: * If you have an ejb-client, make it an ejb-client artifact (see the EJB plugin). If your dependency has type 'ejb-client' the EAR plugin will recognize it automatically and inject a <java> module element in the generated application.xml * JavaModule are the base class for any "jar" library * Regarding pure application clients (i.e. jar file with a META-INF/client-application.xml), there is a request to add extra logic in the EAR plugin so that it recognizes it out-of-the box (MEAR-40) Your patch makes no sense because the dependencies are 3rd party libs, not ejb-clients. I will add an extra test right now to show you the difference with an ejb-client. > Java modules do not work > ------------------------ > > Key: MEAR-46 > URL: http://jira.codehaus.org/browse/MEAR-46 > Project: Maven 2.x Ear Plugin > Issue Type: Bug > Affects Versions: 2.1, 2.2, 2.0 > Reporter: David Blevins > Assigned To: Stephane Nicoll > Attachments: corrected-tests.patch > > > EJB clients are specified in an application.xml via > <module><java>pathTo.jar</java></module> > However the tests that use the "javaModule" element, do not generate the > above entry as they should. In general the support for this is broken. Any > jar with a "META-INF/application-client.xml" file should be added to the > application.xml unless it is explicitly excluded via a <javaModule> entry > with the <exclude>true</exclude> tag. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira