You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by Jeremy Boynes <je...@coredevelopers.net> on 2004/06/17 04:45:29 UTC
ejb-jars, cllients, deployment plans and multiple artifacts
An ejb-client jar is simply a jar file that contains all classes needed
by a client that wishes to use an EJB - this would include the interface
classes and any classes needed to compile against those interfaces (such
as parameters, exceptions). This is to allow the client jar to be
distributed to places the provider does not want to have access to the
bean's implementation.
The advantage of generating these two artifacts together is that it
would allow the developer to keep all source in one tree. It also
simplifies the generation of things like interfaces, key classes, DAOs,
value classes etc. from annotations in the implementation source.
With JSR-88 another artifact has been introduced which is a deployment
plan. This corresponds roughly to a vendor-specific deployment
descriptor but it is stored outside the ejb-jar. Thus a JSR-88 compliant
deployment tool needs to process the ejb-jar + some other metadata and
generate this separate plan; it also needs module and plan as separate
items to pass back to the deployment tool so it can have them
distributed to the running server. It doesn't seem very friendly to me
to need to have a separate project for this.
The deployment plan issue applies to any J2EE module - WARs, RARs and
EARs in addition to EJBs.
I'm new to m2-dev so this may have been discussed already, but would it
be possible to modify the POM so that it could declare that the project
would produce multiple artifacts e.g:
<project>
...
<produces>
<artifact>
<artifactId>order</artifactId>
<type>ejb</type>
</artifact>
<artifact>
<artifactId>order-client</artifactId>
<type>ejb-client</type>
</artifact>
<artifact>
<artifactId>order-plan</artifactId>
<type>deployment-plan</type>
</artifact>
</produces>
</project>
--
Jeremy