modules/core/dbutils/pom.xml | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
New commits:
commit f594ce268fdcb8e111ccc4e125bf91640e3a6862
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed May 25 16:21:30 2011 -0400
Refactoring logic in dbreset script for use with upgrade db
The database name comes from settings.xml for hudson builds. If you want
to develop/test against a database on which you have run dbupgrade, then
you can run maven with -Dupgrade.db and it will use the rhqupgrade
database.
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 063f2ce..800cb87 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -105,21 +105,19 @@
server = project.properties['rhq.dev.ds.server-name'] ?:
'127.0.0.1'
rhqUser = project.properties['rhq.dev.ds.user-name'] ?:
'rhqadmin'
}
- // This is a bit of a temporary hack to work around
- //
https://cvs.codehaus.org/browse/GMAVEN-46 which results in
- // groovy scripts not being able to get the correct values of
- // build properties that are overridden on the command line.
- // This is being done in support of the hudson job which is
- // trying to use a database named rhqupgrade.
- else if (project.properties['upgrade.db']) {
- database = 'rhqupgrade'
- }
else {
database = project.properties['rhq.test.ds.db-name']
server = project.properties['rhq.test.ds.server-name'] ?:
'127.0.0.1'
rhqUser = project.properties['rhq.test.ds.user-name'] ?:
'rhqadmin'
}
+ // The upgrade.db property should be set for local builds when you
+ // need to test upgrade changes. Hudson builds will specify the
+ // database to use in settings.xml
+ if (project.properties['upgrade.db']) {
+ database = 'rhqupgrade'
+ }
+
adminUsername = project.properties['rhq.db.admin.username'] ?:
'postgres'
adminPassword = project.properties['rhq.db.admin.password'] ?:
'postgres'
project.properties.dbsetup = 'true'