maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <brett.por...@gmail.com>
Subject Re: m1: changing database config for testing
Date Wed, 24 Aug 2005 01:39:24 GMT
You can set an env property in the home directory of the user doing
it, or if all you need is the username and host name, you can use
${user.name} and invoke InetAddress to get the hostname. That would
mean putting that knowledge in the build script which might not be as
useful as just setting the environment from ~/build.properties.

- Brett

On 8/24/05, Craig McDaniel <cpmcdaniel@gmail.com> wrote:
> I have integration tests that use DBUnit for testing our persistence
> layer. If a developer runs the tests, I want it to execute against a
> certain database (we'll call it "dev"). We also have a continuous
> integration build server that we also want to run these tests, but
> this time against a separate database (called "test"). As it is, we
> have potential for developers to step on each others' toes. We want to
> prevent this from causing the automated build to fail.
> 
> How can I vary the database config that is used based on where it is
> being run. I am already calling a custom maven goal for the automated
> build. I should be able to do something there, but I'm looking for
> good ideas (ie, best practice).
> 
> --
> Craig McDaniel
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message