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

Attachment: pgpqa8E2V9Nlr.pgp
Description: Digitale Signatur von OpenPGP

Reply via email to