You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Markus Karg <ka...@quipsy.de> on 2012/06/25 08:27:21 UTC
AW: How to correctly make an EJB module dependend of the interface JAR of a RAR?
Any other opinions? Any solutions? I cannot believe that an EAR must not only contain the RAR but also a duplicate (!) of the RA' public interface.
-----Ursprüngliche Nachricht-----
Von: Markus KARG [mailto:markus@headcrashing.eu]
Gesendet: Dienstag, 19. Juni 2012 22:26
An: Markus Karg
Betreff: FW: How to correctly make an EJB module dependend of the interface JAR of a RAR?
> -----Original Message-----
> From: Stephen Coy [mailto:steve@resolvesw.com]
> Sent: Donnerstag, 23. Februar 2012 03:13
> To: Maven Users List
> Subject: Re: How to correctly make an EJB module dependend of the
> interface JAR of a RAR?
>
> I suspect that you will have deployment issues if the EJB module does
> not have visibility of the interface classes.
>
> You should perhaps be placing this jar in the EAR/lib directory
> (assuming a JEE5+ compliant container) and sharing it between the RAR
> and EJB jar.
>
>
> On 22/02/2012, at 5:13 AM, Markus Karg wrote:
>
> > I have set up a typical EAR scenario, where a EJB module and a RAR
> > module are packaged into a EAR module (using the respective package
> > types of ear, ejb and rar). To be able to compile the EJB module, I
> > have to make it dependend of the interface JAR (which is later
> > packed into the RAR) with compile scope. But, this leads to the fact
> > that
> the
> > EAR later contains not only the EJB and the RAR, but also the
> interface JAR.
> > As the interface JAR already is contained in the RAR, this is
> redundant.
> > What is "The Maven Way" to prevent this redundance, so the EAR will
> > not contain the additional interface JAR?
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: How to correctly make an EJB module dependend of the interface JAR of a RAR?
Posted by Markus KARG <ma...@headcrashing.eu>.
I understand your concerns, but as a Jave EE server very well knows what a RAR is good for and how it is structured, it should be able to provide the interface JAR without the need for physical duplication. In the end, to make this clear to the server, this is the sole reason for the complexity of RAR packaging.
> -----Original Message-----
> From: Laird Nelson [mailto:ljnelson@gmail.com]
> Sent: Montag, 25. Juni 2012 15:49
> To: Maven Users List
> Subject: Re: How to correctly make an EJB module dependend of the
> interface JAR of a RAR?
>
> On Mon, Jun 25, 2012 at 2:27 AM, Markus Karg <ka...@quipsy.de> wrote:
>
> > Any other opinions? Any solutions? I cannot believe that an EAR must
> > not only contain the RAR but also a duplicate (!) of the RA' public
> interface.
>
>
> Recall that a .rar can be deployed as a standalone module, consumable
> by other modules (including .ears) on the application server. A .rar's
> public interface could therefore be required both by the .rar itself
> (to provide an appropriate connection factory, etc.), and by the
> callers in some .ear somewhere that use it. That is, I believe, the
> rationale for the interface duplication.
>
> For my resource adapters, I have three small Maven projects:
> * The public API project. This is basically interfaces only. It
> depends on nothing.
> * A "jca" project. This is the logic of the resource adapter. It
> depends solely on the public API and the JCA classes (provided scope).
> * A "rar" project. This is packaging only and depends on the other
> two.
>
> In my .ear file (for application-scoped .rars, which is what you're
> talking about, which makes deployment with GlassFish very difficult,
> incidentally, but that's a side issue), I include the public API
> project as a runtime dependency (it ends up in the lib directory) and
> the rar project as a <type>rar</type> runtime dependency (it ends up at
> the root level).
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to correctly make an EJB module dependend of the interface
JAR of a RAR?
Posted by Laird Nelson <lj...@gmail.com>.
On Mon, Jun 25, 2012 at 2:27 AM, Markus Karg <ka...@quipsy.de> wrote:
> Any other opinions? Any solutions? I cannot believe that an EAR must not
> only contain the RAR but also a duplicate (!) of the RA' public interface.
Recall that a .rar can be deployed as a standalone module, consumable by
other modules (including .ears) on the application server. A .rar's public
interface could therefore be required both by the .rar itself (to provide
an appropriate connection factory, etc.), and by the callers in some .ear
somewhere that use it. That is, I believe, the rationale for the interface
duplication.
For my resource adapters, I have three small Maven projects:
* The public API project. This is basically interfaces only. It depends
on nothing.
* A "jca" project. This is the logic of the resource adapter. It depends
solely on the public API and the JCA classes (provided scope).
* A "rar" project. This is packaging only and depends on the other two.
In my .ear file (for application-scoped .rars, which is what you're talking
about, which makes deployment with GlassFish very difficult, incidentally,
but that's a side issue), I include the public API project as a runtime
dependency (it ends up in the lib directory) and the rar project as a
<type>rar</type> runtime dependency (it ends up at the root level).
Best,
Laird
--
http://about.me/lairdnelson