Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.1
-
Fix Version/s: None
-
Labels:None
-
Number of attachments :
Description
Given a scenario, where several application tiers are installed on different servers, are realized as EJB3 applications, and packaged using maven.
When configuring an ejb module, I give dependencies to all dependency jars that are used to implement the features. However, they are currently all added as dependency to the client-jar artifacts as well, so that unused libraries are deployed on client servers.
I'd like to mark dependencies as server-jar only, e.g. by an clientJarExclusions configuration element to the plugin, which takes a set of exclusion elements like the exclusions-element in a dependency. These dependencies should behave as compile-scope in the server- and provided-scope in the client-jars.
Issue Links
- is related to
-
MNG-4804
EJB dependencies are included when using the ejb-client packaging/type
-
As a partial workaround, I found I can add server-only dependencies as optional dependencies to the ejb module. Giving them as mandatory dependencies for any ear module containing the server-ear, the dependencies (and also transitive dependencies, as mentioned above) are worked out fine.
The manifest.mf however, having the classpath added (<configuration><archive> <manifest><addClasspath>true</addClasspath> </manifest></archive></configuration>) still has all server library entries referenced which are not available in client.jar packages (Which is, at least, ugly, but should not lead to trouble except when ill-naming dependency jars or depending on different dependency jar versions in different parts of the system.)