On 12/15/06, Graham Leggett <[EMAIL PROTECTED]> wrote:

On Thu, December 14, 2006 9:05 pm, Stephane Nicoll wrote:

> This has been tackled a dozen of times and I am not sure it has
> anything to do with the EAR plugin, at least if we follow the spec. If
> I am wrong, please let me know.
>
> The valid way to bundle shared components/libs in a EAR is to define
> the Class-Path entry of the manifest in EJB module(s) using the
> component. It's certainly not by adding them in a <java> module entry
> in the application.xml even though some application servers support
> this (JBoss namely).


This where you make the spec compliant EJB jar by using the  Class-Path
manifest entry as Stephane stated.  The "trick" that BEA and IBM looks
similar to the spec for WAR but alas we do not have anything such thing for
EAR files.

All the things that various vendors are doing is a work around.  This is
something that should be added to the JEE spec to make it cleaner in a
packaging as looking through EJB Jar files is nasty if one needs to debug.


> The EAR plugin supports the APP-INF/lib weblogic's trick by using the
> defaultJarBundleDir setting though.
>
> So I wouldn't say the EAR plugin has no dependency management features
> at all, I don't even see the point actually :) Make sure that your
> classpath entries got generated on the EJB side and it will just run
> fine.

Ok, then I'll put it this way: it has no dependency management features
that are clearly enough documented :)

If you create an ejb using the default ejb configuration, and then you add
this ejb to an ear file again with a default configuration, maven goes
through all the motions and creates what looks like a valid ear file.

But this ear file refuses to load into Jboss (the dreaded NoClassDefFound
exception).

Is there a reason why a spec compliant ejb and ear can't be created by
default by the ejb and ear plugins? I'm asking from ignorance - I don't
have in depth knowledge of the internal structure of an ear file, that
being maven's job to worry about this stuff for me.

The only mention I can find about the classpath entry is a FAQ entry at
http://maven.apache.org/plugins/maven-ejb-plugin/faq.html, but this rather
cryptic explanation doesn't indicate why you might want to do this
(although it seems clear from your explanation that it is necessary), or
why this behaviour isn't the default behaviour for the plugin.

Regards,
Graham
--



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Regards,


Garvin LeClaire
[EMAIL PROTECTED]

Reply via email to