tags:

views:

25

answers:

1

Let's assume there are 2 applications. The POM hierarchy might look like this:

   parent
   --> system A
   --> system B

Both systems are supposed to be able to connect to the same database.

Each system has 2 profiles: Development (embedded DB) and Production (MySQL).

How can I use Maven to share the database connection information (user, path, driver etc.) for each profile ACROSS BOTH systems (I'm using resource filtering)?

A: 

Just store the properties for those information in the appropriate profile.

khmarbaise
do you mean in each system individually (redundancy?) or in the parent pom (I thought profiles don't inherit) ?
stephanos
Define the profile in the root pom and the set properties will be used in the derived project (of course only if you using a multimodule build).
khmarbaise
just tried it: it works :) thx!
stephanos
argh - pressed the wrong arrow - then SO said it's in "maintanance" and now I can't change the vote "unless the answer is edited"
stephanos
Just edited (just added newline). Just try to change it.
khmarbaise
hm: "You last voted on this answer 3 hours ago. Your vote is now locked in unless this answer is edited"
stephanos