you are right
i want to give every developer its own local database to work on. with their own users. and continuum and tomcat are on the same machine using the same database. one will need a build database the other a life database.
how do you guy do this kind of thing changing the pom.xml all the time??


anyway you are right that dbunit is readin the pom.xml instead of the user.properties. either a bug in dbunit or an order issue.

i will take a look at the profiles.xml and the settings.xml maybe i will get my head around it...

tibi



Matt Raible wrote:
AFAIK, you have a user.properties file that's going to be specific for
each developer and won't be checked into SVN - correct?  If so, you
might try doing the same thing with a profiles.xml in the same
directory.  This allows you to override any properties with a local
file, rather than doing it in settings.xml.  My guess is that dbunit
is still reading from the properties in your pom.xml rather than
user.properties.

You could also look at using the properties-maven-plugin:

http://www.nabble.com/properties-maven-plugin-tf2455107.html

Matt

the strange thing will happen when there is a url in pom.xml properties
part and using the filter like below.
the database will be created by hybernate using the url from the
properties file added by the filter option.
but dbunit will add the test data using the url from the pom.xml file!!

is there a work around?

tibi



tibi wrote:
> what i finaly did is the following:
> added this into my pom.xml
>
>        </plugins>
>        <filters>
>            <filter>user.properties</filter>
>        </filters>
>        <resources>
>
> and check that this is already set:
>                <filtering>true</filtering>
>            </resource>
>        </resources>
>
> and in user.properties (which will not be added to source control):
>
> jdbc.url=jdbc:mysql://localhost/test?createDatabaseIfNotExist=true&amp;useUnicode=true&amp;characterEncoding=utf-8
>
> etc...
>
> works fine.
>
> it also should be possible with settings.xml in ~/.m2 but i did not
> got it working.
>
> tibi
>
>
> Matt Raible wrote:
>> You should be able to create 4 different sessionFactories in
>> src/main/resources/applicationContext-resources.xml.  If you need to
>> add additional properties for filtering, just add them to your pom.xml
>> - or hard-code them in your Spring configuration (or jdbc.properties)
>> files.
>>
>> Matt
>>
>> On 4/6/07, Nathan Anderson <[EMAIL PROTECTED]> wrote:
>>> The 1.9.x branch has a way to have system/user specific properties like
>>> database settings, but I believe it was tied closely to the way Ant
>>> works. I don't know if this functionality is in 2.0 yet, but I expect
>>> it will be if it isn't already [Matt, let me know if I should make a
>>> JIRA issue on this ;) ].
>>>
>>> Nathan
>>>
>>> tibi wrote:
>>> > mmm is everyone working allone??
>>> >
>>> > tibi
>>> >
>>> > tibi wrote:
>>> >>
>>> >> hi
>>> >> i have a project with two users, continuum and the life site.
>>> >> all four need different database settings.
>>> >> these settings are now in the pom file and i need to change them for
>>> >> each.
>>> >> is there a better way??
>>> >>
>>> >> thanks
>>> >>
>>> >> tibi
>>> >>
>>> >>
>>> ---------------------------------------------------------------------
>>> >> 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]
>>>
>>> ---------------------------------------------------------------------
>>> 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]
>
>

---------------------------------------------------------------------
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]

Reply via email to