[
https://jira.codehaus.org/browse/MEJB-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=359908#comment-359908
]
Karl-Heinz Marbaise commented on MEJB-33:
-----------------------------------------
Dennis has already outlined the reasons for which it is not possible to solve
that within maven-ejb-plugin at the moment. May be we have to think about that.
As suggest the simplest solution is having two ejb projects. Creating
clientJarExclusions does not help cause the pom is the couting factor here.
Otherwise the maven-ejb-plugin has to emit two supplemental pom files one for
server and one for the client artifact.
Some other thoughts i had during looking into the your examples:
Why does the EJB has a dependency to a webservice (apart from that the EJB does
not really contain code for a WebServices) ? It would make more sense have a
webservice which has a dependency to the EJB (Model)...
So an other path might be to define the dependencies of the webservices to the
EAR module which means they would be packaged into the EAR file and so they are
available on the path within the application server....which means you can
remove those dependencies from the ejb package...which will solve the problem
as well.
BTW: Why defining an EJB 3.1 spec but defined only 3.0 version for EJB ?
> Add support for fewer dependencies in client-jars
> -------------------------------------------------
>
> Key: MEJB-33
> URL: https://jira.codehaus.org/browse/MEJB-33
> Project: Maven EJB Plugin
> Issue Type: New Feature
> Affects Versions: 2.1
> Reporter: Karsten Tinnefeld
> Assignee: Karl-Heinz Marbaise
> Fix For: more-investigation
>
> Attachments: ejb-client-packaging-problem-2014.zip,
> ejb-client-packaging-problem.zip
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)