You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by phillip rhodes <rh...@yahoo.com> on 2005/04/22 22:59:33 UTC
maven.test.skip help request
I am in a quandary.
My junit tests require a database to run.
My hibernate:schema-export task needs to have compiled
java class files to run
My junit tests kick off when I try to compile the java
source files....
So there isn't a database for my junit test (or rather
there is an out-of-sync one)
I would like to do the following build steps
(basically have more control over when my tests are
run)
1) compile/war application
2) do a hibernate:schema-export
3) run tests
I understand that I can set the maven.test.skip to
false, but can I set it to true/false willy nilly any
time that I want? Am I going against the maven
currents by doing it this way?
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven.test.skip help request
Posted by Erik Husby <mh...@broad.mit.edu>.
phillip rhodes wrote:
>I am in a quandary.
>
>My junit tests require a database to run.
>My hibernate:schema-export task needs to have compiled
>java class files to run
>My junit tests kick off when I try to compile the java
>source files....
>So there isn't a database for my junit test (or rather
>there is an out-of-sync one)
>
>I would like to do the following build steps
>(basically have more control over when my tests are
>run)
>1) compile/war application
>2) do a hibernate:schema-export
>3) run tests
>
>I understand that I can set the maven.test.skip to
>false, but can I set it to true/false willy nilly any
>time that I want? Am I going against the maven
>currents by doing it this way?
>Thanks!
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>
Add to your maven.xml
<postGoal name="test:prepare-filesystem">
<... jelly code to setup your database ..>
</postGoal>
This will be run after test has setup the directories but before the
unit tests are run.
--
Erik Husby
Senior Software Engineer
Broad Institute of MIT and Harvard
Rm. 2192 320 Charles St, Cambridge, MA 02141-2023
mobile: 781.354.6669, office: 617.258.9227,
email: mhusby@broad.mit.edu AIM: ErikAtBroad
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org