You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Erik Ruisma <fe...@gmail.com> on 2007/04/13 14:19:41 UTC

[M2][maven-ejb-plugin] dependencies for generated client

Hey all,

I do not completely agree with some of the principles used in this
[maven-ejb-plugin] plugin when generating the client-jar for the EJB.
Currently when you tell Maven to create a client jar, it uses the same
dependencies as defined for the EJB. I think this is fundamentally wrong.
Clients for a service (EJB) should have as few dependencies as possible. If
inside the implementation of the EJB one uses Spring, or Hibernate, or
commons-logging, clients should not be aware of that.

I think that typically the dependencies on the client are a subset of those
of the service. Client dependencies should be kept minimal.
So imagine an ideal solution:
- while generating the client, Maven inspects the signature of the services
offered by the EJB and adds all classes/libraries needed (I think some ant
task did this using the BCEL lib).
- additional classes/libs can be explicitly added.

Would it be possible to implement this?

Another option is to let the developer decide which libs/classes must be
added as dependency for the client jar.
Both options seem (to me) more usable than the current solution. But maybe
I'm seeing things too simple....?
I'm looking forward to have some reactions on this.

Currently we're having a problem where a project uses several client-ejb
jar. All transitive dependencies are package with the project. The project
now contains more than 100MB, due to all transitive dependencies. What are
the options to solve this? Create a client jar file separately with the
maven-jar-plugin ?