Re: samples servlet test classes

2008-09-26 Thread b . v . weert




Hi,

as far as I can see, you have to treat test and production versions
differently anyway, at least in my case, because for example the database
settings in the testcase are different than in the production case, and
some property files are different.

One way this could be solved is to allow the cactifywar tast to copy
certain property files.

regards, Bo



   
 Martin West   
 [EMAIL PROTECTED] 
 mos.com Para 
   Cactus Users List   
 24/09/2008 09:41  cactus-user@jakarta.apache.org
cc 
   
Por favor,  Asunto 
responda a Re: samples servlet test classes
   Cactus Users   
   List   
 [EMAIL PROTECTED] 
  rta.apache.org  
   
   




The better way to address this problem is add the test classes to the
cactified war as part of the cactify task. Otherwise you have to have
special processing to build test and producton versions of the
applicaton war.

On Mon, 2008-09-22 at 21:53 +0100, Martin West wrote:
 Another observation, all the test classes are in src/main/java. You
 can
 move them to the standard location, then remove the testSource and
 testClass from surefire plugin configuration and add the following
 plugin to the pom at the start of the plugins section.

--
regards
   Martin West
   07879 680096
   skype:amartinwest


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: samples servlet test classes

2008-09-26 Thread b . v . weert




Hello,

I just tried it and it works great!

As a sidenote, I also included *.xml files for the dbunit test data, so
it's not only testclasses that are copied.

Cheers,
Bo



   
 Petar Tahchiev  
 [EMAIL PROTECTED] 
 l.com   Para 
   Cactus Users List 
 24/09/2008 15:30  cactus-user@jakarta.apache.org
cc 
   
Por favor,  Asunto 
responda a Re: samples servlet test classes
   Cactus Users   
   List   
 [EMAIL PROTECTED] 
  rta.apache.org  
   
   




Hi Martni,
I just changed the Maven mojo to add the cactus test classes
to the cactified war. This way you can place your tests in
src/test/java
and Maven will compile them in target/test-classes/
And then you can call the mojo like that:
  testClasses
directorytarget/test-classes/directory
includes
  include**/**Test*.class/include
/includes
  /testClasses
to execute include all those classes under WEB-INF/classes of the
cactified war.

If you want to try it, please update the integration/maven2 module and
the samples/servlet module and recompile.


Cheers, Petar


2008/9/24 Martin West [EMAIL PROTECTED]

 The better way to address this problem is add the test classes to the
 cactified war as part of the cactify task. Otherwise you have to have
 special processing to build test and producton versions of the
 applicaton war.

 On Mon, 2008-09-22 at 21:53 +0100, Martin West wrote:
  Another observation, all the test classes are in src/main/java. You
  can
  move them to the standard location, then remove the testSource and
  testClass from surefire plugin configuration and add the following
  plugin to the pom at the start of the plugins section.
 
 --
 regards
   Martin West
   07879 680096
   skype:amartinwest


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
Regards, Petar!
Karlovo, Bulgaria.
- - - - - - - -
| Author @ Manning Publications.
| Technical Consultant @ HP
| BGJUG-Bulgarian Java User Group Leader.
| Apache Jakarta PMC member.
| Jakarta Cactus Lead Developer.
| Blogger: http://weblogs.java.net/blog/paranoiabla/
- - - - - - - -
Public PGP Key at:
https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF 55A5 1965 8550 C311 0611



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: samples servlet test classes

2008-09-26 Thread Martin West
Ive now trying a different strategy. I have an integration module which
has the test classes and does the cactus/cargo thing but refers to the
war build in the web project.

On Fri, 2008-09-26 at 13:44 +0200, [EMAIL PROTECTED] wrote:
 as far as I can see, you have to treat test and production versions
 differently anyway, at least in my case, because for example the
 database
 
-- 
regards 
   Martin West
   07879 680096
   skype:amartinwest


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: samples servlet test classes

2008-09-25 Thread Martin West
Thanks

On Wed, 2008-09-24 at 16:30 +0300, Petar Tahchiev wrote:
 If you want to try it, please update the integration/maven2 module and
 the samples/servlet module and recompile.
 
-- 
regards 
   Martin West
   07879 680096
   skype:amartinwest


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: samples servlet test classes

2008-09-24 Thread Martin West
The better way to address this problem is add the test classes to the
cactified war as part of the cactify task. Otherwise you have to have
special processing to build test and producton versions of the
applicaton war.

On Mon, 2008-09-22 at 21:53 +0100, Martin West wrote:
 Another observation, all the test classes are in src/main/java. You
 can
 move them to the standard location, then remove the testSource and
 testClass from surefire plugin configuration and add the following
 plugin to the pom at the start of the plugins section.
 
-- 
regards 
   Martin West
   07879 680096
   skype:amartinwest


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: samples servlet test classes

2008-09-24 Thread Petar Tahchiev
Hi Martni,
I just changed the Maven mojo to add the cactus test classes
to the cactified war. This way you can place your tests in
src/test/java
and Maven will compile them in target/test-classes/
And then you can call the mojo like that:
  testClasses
directorytarget/test-classes/directory
includes
  include**/**Test*.class/include
/includes
  /testClasses
to execute include all those classes under WEB-INF/classes of the
cactified war.

If you want to try it, please update the integration/maven2 module and
the samples/servlet module and recompile.


Cheers, Petar


2008/9/24 Martin West [EMAIL PROTECTED]

 The better way to address this problem is add the test classes to the
 cactified war as part of the cactify task. Otherwise you have to have
 special processing to build test and producton versions of the
 applicaton war.

 On Mon, 2008-09-22 at 21:53 +0100, Martin West wrote:
  Another observation, all the test classes are in src/main/java. You
  can
  move them to the standard location, then remove the testSource and
  testClass from surefire plugin configuration and add the following
  plugin to the pom at the start of the plugins section.
 
 --
 regards
   Martin West
   07879 680096
   skype:amartinwest


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Regards, Petar!
Karlovo, Bulgaria.
- - - - - - - -
| Author @ Manning Publications.
| Technical Consultant @ HP
| BGJUG-Bulgarian Java User Group Leader.
| Apache Jakarta PMC member.
| Jakarta Cactus Lead Developer.
| Blogger: http://weblogs.java.net/blog/paranoiabla/
- - - - - - - -
Public PGP Key at:
https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF 55A5 1965 8550 C311 0611