quality@glassfish.java.net

Re: EJB development with Maven, making it easier and more fool proof.

From: Wouter van Reeven <wouter_at_van.reeven.nl>
Date: Tue, 16 Mar 2010 09:45:09 +0100

On Tue, Mar 16, 2010 at 10:34:32AM +0200, Richard Kolb wrote:
> Yes, but it is more than that. It effects JavaEE 5 as well.
> It is indeed a side effect on how Maven packages EJB's by default.
>
>
> The normal EJB packaging does not include the JAR's

Exactly my point :-) It looks like the developers of the
maven-ejb-plugin didn't expect anyone to create stand alone EJB jar
files. Then again, a jar isn't supposed to contain other jars. If you
create a single jar out of several distinct jars, the classes in the
distinct jar are extracted and packaged in the single jar. That way the
classes are available but you no longer have the separate jars. To
circumvent this issue, the ear file type was created.

So, in short, I *think* what you're trying to do is not very common. I
suppose you should create an ear with the EJB jar and the log4j jar in
it, especially when using Java EE5. And I don't think this is different
in Java EE6.


Wouter

-- 
"WHAT DO YOU GET IF YOU MULTIPLY SIX BY NINE?"
"Six by nine. Forty two. That's it. That's all there is."
"I always thought something was fundamentally wrong with the universe"
[The Hitchhiker's Guide To The Galaxy]
Skype: wvreeven
Facebook: wvreeven
Twitter: wvreeven