You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Stephane Nicoll <sn...@kiala.com> on 2004/05/18 08:59:39 UTC

Building a cactified EAR without declaring a dependency

Hello list,

Because we need to build independent modules we have started building client
jars. A module X has now two jars, the ejb-jar module containing private
classes and the bean implementation and a client-jar module containing public
classes (i.e. used by other modules) and the interfaces (home, etc). To be
fully sure my client jar is correct my module Y now depends on the ejb-client
jar. The problem is when I want to cactify the ear for testing, I need also
the implementation (otherwise my tests will fail).

Is there a way to include something in cactus without declaring it as a
dependency. Or is there a way in maven to declare a dependency without adding
it to the compilation classpath?

Thanks,

Stéphane

_______________________________________ 
Stéphane Nicoll 
Software Engineer 
KIALA NV - The last mile company 
Avenue Louise/Louisalaan 149/28 (24th floor) 
B-1050 Brussels (BELGIUM) 
TEL +32 2 535 93 67 
GSM +32 477 77 26 96 
E-mail snicoll@kiala.com 
_______________________________________ 


RE: Building a cactified EAR without declaring a dependency

Posted by Vincent Massol <vm...@pivolis.com>.
Hmmm... Let's hope I understand... :-)

Cactus is about integration unit testing, which means it requires the
application to be able to execute. It seems you want to test something
for which you don’t have the implementation. This cannot work.

I think your Cactus need to be put somewhere else. It makes sense to
have them at the level of your EAR maven project instead of at the level
of the Y maven project.

-Vincent

> -----Original Message-----
> From: Stephane Nicoll [mailto:snicoll@kiala.com]
> Sent: 18 May 2004 09:52
> To: Cactus Users List
> Subject: RE: Building a cactified EAR without declaring a dependency
> 
> Let me explain more precisely ;)
> 
> I have a maven project with multiple modules, let's say X, Y and Z. X
> needs Y to work but because I want to be able to deploy them
separately,
> I created client-jars with the external view of module Y.
> 
> Basically, in my maven project for module Y, I have a dependency on
the
> client-jar of X. If I implement things and compile, I only need the
> client-jar of X because I don't care about its implemenation (I am in
> module Y). However, If I want to run tests on my modulue Y, I Do need
> the implementation (otherwise NamingException, etc).
> 
> So is there a way to declare this dependency only for cactus (i.e. I
> don't need it to compile and build Y but If i want to test it, it
should
> be in the cactifyed ear).
> 
> Hope it's more clear ;)
> 
> Thanks,
> 
> Stéphane
> 
> On Tue, 2004-05-18 at 09:47, Vincent Massol wrote:
> > Hi Stephane,
> >
> > > -----Original Message-----
> > > From: Stephane Nicoll [mailto:snicoll@kiala.com]
> > > Sent: 18 May 2004 09:00
> > > To: Cactus Users List
> > > Subject: Building a cactified EAR without declaring a dependency
> > >
> > > Hello list,
> > >
> > > Because we need to build independent modules we have started
building
> > > client
> > > jars. A module X has now two jars, the ejb-jar module containing
> > private
> > > classes and the bean implementation and a client-jar module
containing
> > > public
> > > classes (i.e. used by other modules) and the interfaces (home,
etc).
> > To be
> > > fully sure my client jar is correct my module Y now depends on the
> > ejb-
> > > client
> > > jar. The problem is when I want to cactify the ear for testing, I
need
> > > also
> > > the implementation (otherwise my tests will fail).
> >
> > Your EAR contains both X jars and Y jars, no? So it contains the
> > implementation. Obviously there's something I don't understand...
:-)
> >
> > >
> > > Is there a way to include something in cactus without declaring it
as
> > a
> > > dependency. Or is there a way in maven to declare a dependency
without
> > > adding
> > > it to the compilation classpath?
> >
> > No, but I don't see what the problem is.
> >
> > Thanks
> > -Vincent
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



RE: Building a cactified EAR without declaring a dependency

Posted by Stephane Nicoll <sn...@kiala.com>.
Let me explain more precisely ;)

I have a maven project with multiple modules, let's say X, Y and Z. X
needs Y to work but because I want to be able to deploy them separately,
I created client-jars with the external view of module Y.

Basically, in my maven project for module Y, I have a dependency on the
client-jar of X. If I implement things and compile, I only need the
client-jar of X because I don't care about its implemenation (I am in
module Y). However, If I want to run tests on my modulue Y, I Do need
the implementation (otherwise NamingException, etc).

So is there a way to declare this dependency only for cactus (i.e. I
don't need it to compile and build Y but If i want to test it, it should
be in the cactifyed ear).

Hope it's more clear ;)

Thanks,

Stéphane

On Tue, 2004-05-18 at 09:47, Vincent Massol wrote:
> Hi Stephane,
> 
> > -----Original Message-----
> > From: Stephane Nicoll [mailto:snicoll@kiala.com]
> > Sent: 18 May 2004 09:00
> > To: Cactus Users List
> > Subject: Building a cactified EAR without declaring a dependency
> > 
> > Hello list,
> > 
> > Because we need to build independent modules we have started building
> > client
> > jars. A module X has now two jars, the ejb-jar module containing
> private
> > classes and the bean implementation and a client-jar module containing
> > public
> > classes (i.e. used by other modules) and the interfaces (home, etc).
> To be
> > fully sure my client jar is correct my module Y now depends on the
> ejb-
> > client
> > jar. The problem is when I want to cactify the ear for testing, I need
> > also
> > the implementation (otherwise my tests will fail).
> 
> Your EAR contains both X jars and Y jars, no? So it contains the
> implementation. Obviously there's something I don't understand... :-)
> 
> > 
> > Is there a way to include something in cactus without declaring it as
> a
> > dependency. Or is there a way in maven to declare a dependency without
> > adding
> > it to the compilation classpath?
> 
> No, but I don't see what the problem is.
> 
> Thanks
> -Vincent
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 


RE: Building a cactified EAR without declaring a dependency

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Stephane,

> -----Original Message-----
> From: Stephane Nicoll [mailto:snicoll@kiala.com]
> Sent: 18 May 2004 09:00
> To: Cactus Users List
> Subject: Building a cactified EAR without declaring a dependency
> 
> Hello list,
> 
> Because we need to build independent modules we have started building
> client
> jars. A module X has now two jars, the ejb-jar module containing
private
> classes and the bean implementation and a client-jar module containing
> public
> classes (i.e. used by other modules) and the interfaces (home, etc).
To be
> fully sure my client jar is correct my module Y now depends on the
ejb-
> client
> jar. The problem is when I want to cactify the ear for testing, I need
> also
> the implementation (otherwise my tests will fail).

Your EAR contains both X jars and Y jars, no? So it contains the
implementation. Obviously there's something I don't understand... :-)

> 
> Is there a way to include something in cactus without declaring it as
a
> dependency. Or is there a way in maven to declare a dependency without
> adding
> it to the compilation classpath?

No, but I don't see what the problem is.

Thanks
-Vincent