We pushed a very minimal example project to a public github repo located
here:

https://github.com/kr1schan/mavenToy

The project consists of an ear, two war modules, one ejb module and one
plain jar artifact.
Both war modules depend on the ejbmodule as well as on the jar artifact.
SkinnyWar is enabled and configured in all conscience.

After 'mvn clean package', the resulting ear shows correct handling of the
jar dependency.
The ejb dependency remains in both war files.

Can you please point us our error?

Thanks a lot,
Clemens von Musil

P.S: There is a branch called 'ejb-skinny-wars' showing the workaround I
described in my latest post.

2016-11-16 10:39 GMT+01:00 Martin Hoeller <mar...@xss.co.at>:

> On 16 Nov 2016, Clemens von Musil wrote:
>
> > This is true for jar dependencies.
> >
> > But if the war file depends on an artifact with type ejb
> > (<type>ejb</type>), the skinnywar-option ignores this dependency and let
> it
> > remain in war/lib.
>
> This is not true in general, it works for me!
> Did you declare the dependency correct with <type>ejb</type> in *all*
> places (WAR and EAR, and maybe a parent POM)) where you reference it?
>
> > And if there are two war files WAR1 and WAR2 depending on the same
> artifact
> > with type ejb, the ear isn't deployable as the beans within the
> > ejb-artifact resist in WAR1/lib _and_ WAR2/lib. The container tries to
> > deploy beans from both loations and struggles as it cannot deploy the
> same
> > bean twice.
>
> This is a logical result from the above problem.
>
> > We found a workaound. We define all dependencies without the type-tag to
> > keep the skinnywar-option working. To avoid malicious packaging inside
> the
> > EAR, we define all these dependencies as jarmodules with explicit deploy
> > path and entry in the application.xml. Such a definition looks like
> >
> > <jarModule>
> >     <groupId>groupid</groupId>
> >     <artifactId>artifactid</artifactId>
> >     <includeInApplicationXml>true</includeInApplicationXml>
> >     <bundleDir>/</bundleDir>
> > </jarModule>
> >
> > Ugly but working.
>
> This shouldn't be necessary. I really think you have a configuration bug
> and missed the <type>ejb</type> in some places.
>
> - martin
>



-- 

Clemens von Musil - mu...@sipgate.de
Telefon: +49 (0)211-63 55 56-85
Telefax: +49 (0)211-63 55 55-22

sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391

www.sipgate.de - www.sipgate.at - www.sipgate.co.uk

Reply via email to