modules/core/dbutils/pom.xml
| 1081 ++++------
modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
| 172 +
modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallatonTest.java
| 172 -
3 files changed, 676 insertions(+), 749 deletions(-)
New commits:
commit 911a6035859f0ddd62c5defad3d843d54fb01e8a
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Aug 1 18:50:28 2011 -0500
Correct the class file name.
diff --git
a/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
b/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
new file mode 100644
index 0000000..956e25e
--- /dev/null
+++
b/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
@@ -0,0 +1,172 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.installer;
+
+import org.rhq.core.db.DbUtil;
+import org.rhq.core.db.setup.DBSetup;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URL;
+import java.sql.Connection;
+import java.sql.Statement;
+import java.util.Properties;
+
+/**
+ * The tests in this class exercise the dbsetup/dbupgrade code that is run in the
installer. The tests currently only
+ * run against postgresql. Support needs to be added for oracle. The tests do not do any
post-install/upgrade
+ * verification at the time of this writing. They just simply exercise the
dbsetup/dbupgrade scripts to ensure that
+ * they do not contain any errors.
+ *
+ * @author John Sanda
+ */
+public class DBInstallationTest {
+
+ private final String LOG_DIRECTORY = System.getProperty("java.io.tmpdir",
"rhq/installer-test");
+ private final String TEST_DB =
System.getProperty("rhq.test.ds.db-name","rhq_installer_test_db");
+ private final String USERNAME = System.getProperty("rhq.test.ds.user-name",
"rhqadmin");
+ private final String PASSWORD = System.getProperty("rhq.test.ds.password",
"rhqadmin");
+ private final String SERVER = System.getProperty("rhq.test.ds.server-name",
"127.0.0.1");
+ private final String DB_URL =
System.getProperty("rhq.test.ds.connection-url", "jdbc:postgresql://"
+ SERVER + ":5432/"+TEST_DB);
+ private final String ADMIN_USERNAME =
System.getProperty("rhq.db.admin.username", "postgres");
+ private final String ADMIN_PASSWORD =
System.getProperty("rhq.db.admin.password", "postgres");
+
+ private ServerInformation installer;
+
+ @BeforeMethod
+ public void prepareForInstallation() throws Exception {
+ initLogDirectory();
+ recreateTestDatabase();
+
+ installer = new ServerInformation();
+ installer.setLogDirectory(new File(LOG_DIRECTORY));
+ }
+
+ @Test
+ public void overwriteJON230Schema() throws Exception {
+ installSchemaAndData("2.3.0");
+ installer.createNewDatabaseSchema(getInstallProperties());
+ }
+
+ @Test
+ public void upgradeJON230Schema() throws Exception {
+ installSchemaAndData("2.3.0");
+ installer.upgradeExistingDatabaseSchema(getInstallProperties());
+ }
+
+ @Test
+ public void overwriteJON231Schema() throws Exception {
+ installSchemaAndData("2.3.1");
+ installer.createNewDatabaseSchema(getInstallProperties());
+ }
+
+ @Test
+ public void upgradeJON231Schema() throws Exception {
+ installSchemaAndData("2.3.1");
+ installer.upgradeExistingDatabaseSchema(getInstallProperties());
+ }
+
+ @Test
+ public void overwriteJON240Schema() throws Exception {
+ installSchemaAndData("2.4.0");
+ installer.createNewDatabaseSchema(getInstallProperties());
+ }
+
+ @Test
+ public void upgradeJON240Schema() throws Exception {
+ installSchemaAndData("2.4.0");
+ installer.upgradeExistingDatabaseSchema(getInstallProperties());
+ }
+
+ private void initLogDirectory() {
+ File logDir = new File(LOG_DIRECTORY);
+ if (logDir.exists()) {
+ logDir.delete();
+ }
+ logDir.mkdirs();
+ }
+
+ private void recreateTestDatabase() throws Exception {
+ Connection connection = null;
+ Statement dropDB = null;
+ Statement createDB = null;
+
+ try {
+ connection =
DbUtil.getConnection(DB_URL.replace(TEST_DB,"postgres"), ADMIN_USERNAME,
ADMIN_PASSWORD);
+
+ dropDB = connection.createStatement();
+ dropDB.execute("drop database if exists " + TEST_DB);
+
+ createDB = connection.createStatement();
+ createDB.execute("create database " + TEST_DB + " with owner
" + USERNAME);
+ } finally {
+ if (connection != null) {
+ connection.close();
+ }
+ if (dropDB != null) {
+ dropDB.close();
+ }
+ if (createDB != null) {
+ createDB.close();
+ }
+ }
+ }
+
+ private void installSchemaAndData(String jonVersion) throws Exception {
+ DBSetup dbsetup = new DBSetup(DB_URL, USERNAME, PASSWORD);
+ dbsetup.setup(getSchemaFile(jonVersion).getAbsolutePath());
+ dbsetup.setup(getDataFile(jonVersion).getAbsolutePath());
+ }
+
+ private File getSchemaFile(String version) throws Exception {
+ URL url = getClass().getResource("db-schema-combined-" + version +
".xml");
+
+ if (url == null) {
+ throw new RuntimeException("Failed to find schema file for version
" + version);
+ }
+
+ return new File(url.toURI().getPath());
+ }
+
+ private File getDataFile(String version) throws Exception {
+ URL url = getClass().getResource("db-data-combined-" + version +
".xml");
+
+ if (url == null) {
+ throw new RuntimeException("Failed to find data file for version "
+ version);
+ }
+
+ return new File(url.toURI().getPath());
+ }
+
+ private Properties getInstallProperties() {
+ Properties dbProperties = new Properties();
+ dbProperties.put(ServerProperties.PROP_DATABASE_CONNECTION_URL, DB_URL);
+ dbProperties.put(ServerProperties.PROP_DATABASE_USERNAME, USERNAME);
+ dbProperties.put(ServerProperties.PROP_DATABASE_PASSWORD, PASSWORD);
+ dbProperties.put(ServerProperties.PROP_EMAIL_FROM_ADDRESS,
"rhqadmin(a)localhost.com");
+ return dbProperties;
+ }
+}
diff --git
a/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallatonTest.java
b/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallatonTest.java
deleted file mode 100644
index 579bebf..0000000
---
a/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallatonTest.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-package org.rhq.enterprise.installer;
-
-import org.rhq.core.db.DbUtil;
-import org.rhq.core.db.setup.DBSetup;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URL;
-import java.sql.Connection;
-import java.sql.Statement;
-import java.util.Properties;
-
-/**
- * The tests in this class exercise the dbsetup/dbupgrade code that is run in the
installer. The tests currently only
- * run against postgresql. Support needs to be added for oracle. The tests do not do any
post-install/upgrade
- * verification at the time of this writing. They just simply exercise the
dbsetup/dbupgrade scripts to ensure that
- * they do not contain any errors.
- *
- * @author John Sanda
- */
-public class DBInstallatonTest {
-
- private final String LOG_DIRECTORY = System.getProperty("java.io.tmpdir",
"rhq/installer-test");
- private final String TEST_DB =
System.getProperty("rhq.test.ds.db-name","rhq_installer_test_db");
- private final String USERNAME = System.getProperty("rhq.test.ds.user-name",
"rhqadmin");
- private final String PASSWORD = System.getProperty("rhq.test.ds.password",
"rhqadmin");
- private final String SERVER = System.getProperty("rhq.test.ds.server-name",
"127.0.0.1");
- private final String DB_URL =
System.getProperty("rhq.test.ds.connection-url", "jdbc:postgresql://"
+ SERVER + ":5432/"+TEST_DB);
- private final String ADMIN_USERNAME =
System.getProperty("rhq.db.admin.username", "postgres");
- private final String ADMIN_PASSWORD =
System.getProperty("rhq.db.admin.password", "postgres");
-
- private ServerInformation installer;
-
- @BeforeMethod
- public void prepareForInstallation() throws Exception {
- initLogDirectory();
- recreateTestDatabase();
-
- installer = new ServerInformation();
- installer.setLogDirectory(new File(LOG_DIRECTORY));
- }
-
- @Test
- public void overwriteJON230Schema() throws Exception {
- installSchemaAndData("2.3.0");
- installer.createNewDatabaseSchema(getInstallProperties());
- }
-
- @Test
- public void upgradeJON230Schema() throws Exception {
- installSchemaAndData("2.3.0");
- installer.upgradeExistingDatabaseSchema(getInstallProperties());
- }
-
- @Test
- public void overwriteJON231Schema() throws Exception {
- installSchemaAndData("2.3.1");
- installer.createNewDatabaseSchema(getInstallProperties());
- }
-
- @Test
- public void upgradeJON231Schema() throws Exception {
- installSchemaAndData("2.3.1");
- installer.upgradeExistingDatabaseSchema(getInstallProperties());
- }
-
- @Test
- public void overwriteJON240Schema() throws Exception {
- installSchemaAndData("2.4.0");
- installer.createNewDatabaseSchema(getInstallProperties());
- }
-
- @Test
- public void upgradeJON240Schema() throws Exception {
- installSchemaAndData("2.4.0");
- installer.upgradeExistingDatabaseSchema(getInstallProperties());
- }
-
- private void initLogDirectory() {
- File logDir = new File(LOG_DIRECTORY);
- if (logDir.exists()) {
- logDir.delete();
- }
- logDir.mkdirs();
- }
-
- private void recreateTestDatabase() throws Exception {
- Connection connection = null;
- Statement dropDB = null;
- Statement createDB = null;
-
- try {
- connection =
DbUtil.getConnection(DB_URL.replace(TEST_DB,"postgres"), ADMIN_USERNAME,
ADMIN_PASSWORD);
-
- dropDB = connection.createStatement();
- dropDB.execute("drop database if exists " + TEST_DB);
-
- createDB = connection.createStatement();
- createDB.execute("create database " + TEST_DB + " with owner
" + USERNAME);
- } finally {
- if (connection != null) {
- connection.close();
- }
- if (dropDB != null) {
- dropDB.close();
- }
- if (createDB != null) {
- createDB.close();
- }
- }
- }
-
- private void installSchemaAndData(String jonVersion) throws Exception {
- DBSetup dbsetup = new DBSetup(DB_URL, USERNAME, PASSWORD);
- dbsetup.setup(getSchemaFile(jonVersion).getAbsolutePath());
- dbsetup.setup(getDataFile(jonVersion).getAbsolutePath());
- }
-
- private File getSchemaFile(String version) throws Exception {
- URL url = getClass().getResource("db-schema-combined-" + version +
".xml");
-
- if (url == null) {
- throw new RuntimeException("Failed to find schema file for version
" + version);
- }
-
- return new File(url.toURI().getPath());
- }
-
- private File getDataFile(String version) throws Exception {
- URL url = getClass().getResource("db-data-combined-" + version +
".xml");
-
- if (url == null) {
- throw new RuntimeException("Failed to find data file for version "
+ version);
- }
-
- return new File(url.toURI().getPath());
- }
-
- private Properties getInstallProperties() {
- Properties dbProperties = new Properties();
- dbProperties.put(ServerProperties.PROP_DATABASE_CONNECTION_URL, DB_URL);
- dbProperties.put(ServerProperties.PROP_DATABASE_USERNAME, USERNAME);
- dbProperties.put(ServerProperties.PROP_DATABASE_PASSWORD, PASSWORD);
- dbProperties.put(ServerProperties.PROP_EMAIL_FROM_ADDRESS,
"rhqadmin(a)localhost.com");
- return dbProperties;
- }
-}
commit 83aaa00ffc0af1b6817e6a11366c189bb89a6ecc
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Aug 1 17:07:07 2011 -0500
Adding driver class to the property list.
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index d2f7e16..318afde 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -22,6 +22,7 @@
<rhq.ds.connection-url>${rhq.test.ds.connection-url}</rhq.ds.connection-url>
<rhq.ds.user-name>${rhq.test.ds.user-name}</rhq.ds.user-name>
<rhq.ds.password>${rhq.test.ds.password}></rhq.ds.password>
+
<rhq.ds.driver-class>${rhq.test.ds.driver-class}</rhq.ds.driver-class>
</properties>
<dependencies>
<!-- 3rd Party Deps -->
@@ -165,6 +166,7 @@
<rhq.ds.connection-url>${rhq.dev.ds.connection-url}</rhq.ds.connection-url>
<rhq.ds.user-name>${rhq.dev.ds.user-name}</rhq.ds.user-name>
<rhq.ds.password>${rhq.dev.ds.password}></rhq.ds.password>
+
<rhq.ds.driver-class>${rhq.dev.ds.driver-class}</rhq.ds.driver-class>
</properties>
</profile>
commit e53fbd175f6b181f9e09580e4c067e923e92996e
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Aug 1 16:33:35 2011 -0500
Move conditional properties to maven profiles. This reduces code duplication and makes
the pom smaller and more manageable.
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index b47e499..d2f7e16 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -17,6 +17,11 @@
<properties>
<scm.module.path>modules/core/dbutils/</scm.module.path>
<db.schema.version>2.111</db.schema.version>
+
<rhq.ds.type-mapping>${rhq.test.ds.type-mapping}</rhq.ds.type-mapping>
+ <rhq.ds.db-name>${rhq.test.ds.db-name}</rhq.ds.db-name>
+
<rhq.ds.connection-url>${rhq.test.ds.connection-url}</rhq.ds.connection-url>
+ <rhq.ds.user-name>${rhq.test.ds.user-name}</rhq.ds.user-name>
+ <rhq.ds.password>${rhq.test.ds.password}></rhq.ds.password>
</properties>
<dependencies>
<!-- 3rd Party Deps -->
@@ -146,6 +151,24 @@
<profiles>
<profile>
+ <id>db.dev</id>
+ <activation>
+ <property>
+ <name>db</name>
+ <value>dev</value>
+ </property>
+ </activation>
+
+ <properties>
+
<rhq.ds.type-mapping>${rhq.dev.ds.type-mapping}</rhq.ds.type-mapping>
+ <rhq.ds.db-name>${rhq.dev.ds.db-name}</rhq.ds.db-name>
+
<rhq.ds.connection-url>${rhq.dev.ds.connection-url}</rhq.ds.connection-url>
+ <rhq.ds.user-name>${rhq.dev.ds.user-name}</rhq.ds.user-name>
+
<rhq.ds.password>${rhq.dev.ds.password}></rhq.ds.password>
+ </properties>
+ </profile>
+
+ <profile>
<id>latest</id>
<activation>
<property>
@@ -180,18 +203,6 @@
<phase>test</phase>
<configuration>
<tasks>
- <condition
property="rhq.ds.type-mapping" value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.connection-url" value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.user-name" value="${rhq.dev.ds.user-name}"
else="${rhq.test.ds.user-name}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.password" value="${rhq.dev.ds.password}"
else="${rhq.test.ds.password}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
<ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml">
<property
name="settings.localRepository" value="${settings.localRepository}"
/>
<property name="ojdbc5.version"
value="${ojdbc5.version}" />
@@ -223,18 +234,6 @@
<configuration>
<tasks>
<property
name="settings.localRepository"
location="${user.home}/.m2/repository}" />
- <condition
property="rhq.ds.type-mapping" value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.connection-url" value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.user-name" value="${rhq.dev.ds.user-name}"
else="${rhq.test.ds.user-name}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.password" value="${rhq.dev.ds.password}"
else="${rhq.test.ds.password}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
<ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml"
target="dbsetup-combine">
<property
name="settings.localRepository" value="${settings.localRepository}"
/>
<property name="ojdbc5.version"
value="${ojdbc5.version}" />
@@ -264,21 +263,6 @@
<configuration>
<tasks>
<property
name="settings.localRepository"
location="${user.home}/.m2/repository}" />
- <condition
property="rhq.ds.type-mapping" value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.connection-url" value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.user-name" value="${rhq.dev.ds.user-name}"
else="${rhq.test.ds.user-name}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.password" value="${rhq.dev.ds.password}"
else="${rhq.test.ds.password}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.driver-class" value="${rhq.dev.ds.driver-class}"
else="${rhq.test.ds.driver-class}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
<ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml"
target="dbsetup-check-schema">
<property
name="settings.localRepository" value="${settings.localRepository}"
/>
<property name="ojdbc5.version"
value="${ojdbc5.version}" />
@@ -326,18 +310,6 @@
<configuration>
<tasks>
<property
name="settings.localRepository"
location="${user.home}/.m2/repository}" />
- <condition
property="rhq.ds.type-mapping" value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.connection-url" value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.user-name" value="${rhq.dev.ds.user-name}"
else="${rhq.test.ds.user-name}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
- <condition
property="rhq.ds.password" value="${rhq.dev.ds.password}"
else="${rhq.test.ds.password}">
- <equals arg1="${db}"
arg2="dev" />
- </condition>
<ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml"
target="create-release-schema">
<property
name="settings.localRepository" value="${settings.localRepository}"
/>
<property name="ojdbc5.version"
value="${ojdbc5.version}" />
commit 5fabd79e13498fc1fcbcb53b890d4968df87d3d6
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Aug 1 15:50:19 2011 -0500
Complete format of the pom file to make it easier to read.
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 6907de0..b47e499 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -1,180 +1,160 @@
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.rhq</groupId>
- <artifactId>rhq-core-dbutils</artifactId>
- <packaging>jar</packaging>
-
- <name>RHQ Database Utilities</name>
- <description>Database schema setup, upgrade and other
utilities</description>
-
- <scm>
-
<
connection>scm:git:ssh://git.fedorahosted.org/git/rhq.git/modules/core...
-
<
developerConnection>scm:git:ssh://git.fedorahosted.org/git/rhq.git/mod...
- </scm>
-
- <properties>
- <scm.module.path>modules/core/dbutils/</scm.module.path>
- <db.schema.version>2.111</db.schema.version>
- </properties>
-
- <dependencies>
-
- <!-- 3rd Party Deps -->
-
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.6.5</version>
- </dependency>
-
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.1</version>
- </dependency>
-
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant-launcher</artifactId>
- <version>1.6.5</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>i18nlog</groupId>
- <artifactId>i18nlog</artifactId>
- <version>${i18nlog.version}</version>
- </dependency>
-
- <dependency>
- <groupId>postgresql</groupId>
- <artifactId>postgresql</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <!-- NOTE: The version is defined in the root POM's dependencyManagement
section. -->
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>net.sourceforge.jtds</groupId>
- <artifactId>jtds</artifactId>
- <!-- NOTE: The version is defined in the root POM's dependencyManagement
section. -->
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.2</version>
- <dependencies>
- <dependency>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-core-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-core-dbutils</artifactId>
+ <packaging>jar</packaging>
+ <name>RHQ Database Utilities</name>
+ <description>Database schema setup, upgrade and other
utilities</description>
+ <scm>
+
<
connection>scm:git:ssh://git.fedorahosted.org/git/rhq.git/modules/core...
+
<
developerConnection>scm:git:ssh://git.fedorahosted.org/git/rhq.git/mod...
+ </scm>
+ <properties>
+ <scm.module.path>modules/core/dbutils/</scm.module.path>
+ <db.schema.version>2.111</db.schema.version>
+ </properties>
+ <dependencies>
+ <!-- 3rd Party Deps -->
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ <version>1.6.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>i18nlog</groupId>
+ <artifactId>i18nlog</artifactId>
+ <version>${i18nlog.version}</version>
+ </dependency>
+ <dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
- <version>${postgresql.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>org.rhq.core.db.reset.DBReset</mainClass>
- <systemProperties>
- <systemProperty>
- <key>rhq.ds.type-mapping</key>
- <value>${rhq.ds.type-mapping}</value>
- </systemProperty>
- <systemProperty>
- <key>rhq.ds.server-name</key>
- <value>${rhq.ds.server-name}</value>
- </systemProperty>
- <systemProperty>
- <key>rhq.ds.db-name</key>
- <value>${rhq.ds.db-name}</value>
- </systemProperty>
- <systemProperty>
- <key>rhq.ds.connection-url</key>
- <value>${rhq.ds.connection-url}</value>
- </systemProperty>
- <systemProperty>
- <key>rhq.db.admin.username</key>
- <value>${rhq.db.admin.username}</value>
- </systemProperty>
- <systemProperty>
- <key>rhq.db.admin.password</key>
- <value>${rhq.db.admin.password}</value>
- </systemProperty>
- <systemProperty>
- <key>rhq.ds.user-name</key>
- <value>${rhq.ds.user-name}</value>
- </systemProperty>
- <systemProperty>
- <key>rhq.ds.password</key>
- <value>${rhq.ds.password}</value>
- </systemProperty>
- </systemProperties>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <property>
- <name>DatabaseTest.nofail</name>
- <value>${DatabaseTest.nofail}</value>
- </property>
- <property>
- <name>AntDatabaseTest.test-resources</name>
- <value>${basedir}/src/test/resources</value>
- </property>
- </systemProperties>
- <!-- The below is required for tests to run against Oracle. -->
- <additionalClasspathElements>
-
<additionalClasspathElement>${settings.localRepository}/com/oracle/ojdbc5/${ojdbc5.version}/ojdbc5-${ojdbc5.version}.jar</additionalClasspathElement>
- </additionalClasspathElements>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>latest</id>
- <activation>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <!-- NOTE: The version is defined in the root POM's
dependencyManagement section. -->
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.jtds</groupId>
+ <artifactId>jtds</artifactId>
+ <!-- NOTE: The version is defined in the root POM's
dependencyManagement section. -->
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.2</version>
+ <dependencies>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>${postgresql.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+
<mainClass>org.rhq.core.db.reset.DBReset</mainClass>
+ <systemProperties>
+ <systemProperty>
+ <key>rhq.ds.type-mapping</key>
+ <value>${rhq.ds.type-mapping}</value>
+ </systemProperty>
+ <systemProperty>
+ <key>rhq.ds.server-name</key>
+ <value>${rhq.ds.server-name}</value>
+ </systemProperty>
+ <systemProperty>
+ <key>rhq.ds.db-name</key>
+ <value>${rhq.ds.db-name}</value>
+ </systemProperty>
+ <systemProperty>
+ <key>rhq.ds.connection-url</key>
+ <value>${rhq.ds.connection-url}</value>
+ </systemProperty>
+ <systemProperty>
+ <key>rhq.db.admin.username</key>
+ <value>${rhq.db.admin.username}</value>
+ </systemProperty>
+ <systemProperty>
+ <key>rhq.db.admin.password</key>
+ <value>${rhq.db.admin.password}</value>
+ </systemProperty>
+ <systemProperty>
+ <key>rhq.ds.user-name</key>
+ <value>${rhq.ds.user-name}</value>
+ </systemProperty>
+ <systemProperty>
+ <key>rhq.ds.password</key>
+ <value>${rhq.ds.password}</value>
+ </systemProperty>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>DatabaseTest.nofail</name>
+ <value>${DatabaseTest.nofail}</value>
+ </property>
+ <property>
+ <name>AntDatabaseTest.test-resources</name>
+ <value>${basedir}/src/test/resources</value>
+ </property>
+ </systemProperties>
+ <!-- The below is required for tests to run against Oracle.
-->
+ <additionalClasspathElements>
+
<additionalClasspathElement>${settings.localRepository}/com/oracle/ojdbc5/${ojdbc5.version}/ojdbc5-${ojdbc5.version}.jar</additionalClasspathElement>
+ </additionalClasspathElements>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>latest</id>
+ <activation>
<property>
<name>!jon.release</name>
</property>
</activation>
-
<build>
<plugins>
- <plugin>
+ <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
@@ -183,7 +163,6 @@
<tasks>
<!-- generate the I18N resource bundles
-->
<taskdef name="i18n"
classpathref="maven.runtime.classpath"
classname="mazz.i18n.ant.I18NAntTask" />
-
<i18n
outputdir="${project.build.outputDirectory}" defaultlocale="en"
verbose="false" append="false" verify="true">
<classpath
refid="maven.runtime.classpath" />
<classfileset
dir="${project.build.outputDirectory}">
@@ -196,396 +175,365 @@
<goal>run</goal>
</goals>
</execution>
-
<execution>
<id>dbsetup-worker</id>
<phase>test</phase>
<configuration>
- <tasks>
- <condition property="rhq.ds.type-mapping"
value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
- <equals arg1="${db}" arg2="dev"
/>
- </condition>
- <condition property="rhq.ds.connection-url"
value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
- <equals arg1="${db}" arg2="dev" />
- </condition>
- <condition property="rhq.ds.user-name"
value="${rhq.dev.ds.user-name}" else="${rhq.test.ds.user-name}">
- <equals arg1="${db}" arg2="dev" />
- </condition>
- <condition property="rhq.ds.password"
value="${rhq.dev.ds.password}" else="${rhq.test.ds.password}">
- <equals arg1="${db}" arg2="dev" />
- </condition>
-
- <ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml">
- <property name="settings.localRepository"
value="${settings.localRepository}" />
- <property name="ojdbc5.version"
value="${ojdbc5.version}" />
- <property name="postgresql.version"
value="${postgresql.version}" />
- <property name="h2.version"
value="${h2.version}" />
- <property name="jtds.version"
value="${jtds.version}" />
- <property name="task.classpath.property"
refid="maven.test.classpath" />
- <property name="rhq.ds.type-mapping"
value="${rhq.ds.type-mapping}" />
- <property name="rhq.ds.db-name"
value="${rhq.ds.db-name}" />
- <property name="rhq.ds.connection-url"
value="${rhq.ds.connection-url}" />
- <property name="rhq.ds.user-name"
value="${rhq.ds.user-name}" />
- <property name="rhq.ds.password"
value="${rhq.ds.password}" />
- <property name="project.version"
value="${project.version}" />
- <property name="db.schema.version"
value="${db.schema.version}" />
- <property name="dbsetup"
value="${dbsetup}" />
- <property name="dbsetup-uninstall"
value="${dbsetup-uninstall}" />
- <property name="dbsetup-upgrade"
value="${dbsetup-upgrade}" />
- <property name="dbsetup-export"
value="${dbsetup-export}" />
- </ant>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- <execution>
- <id>generate-dbsetup-dbupgrade-xml-files</id>
- <phase>process-classes</phase>
- <configuration>
- <tasks>
- <property name="settings.localRepository"
location="${user.home}/.m2/repository}" />
-
- <condition property="rhq.ds.type-mapping"
value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
- <equals arg1="${db}" arg2="dev" />
- </condition>
-
- <condition property="rhq.ds.connection-url"
value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
- <equals arg1="${db}" arg2="dev" />
- </condition>
-
- <condition property="rhq.ds.user-name"
value="${rhq.dev.ds.user-name}" else="${rhq.test.ds.user-name}">
- <equals arg1="${db}" arg2="dev" />
- </condition>
-
- <condition property="rhq.ds.password"
value="${rhq.dev.ds.password}" else="${rhq.test.ds.password}">
- <equals arg1="${db}" arg2="dev" />
- </condition>
-
- <ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml"
target="dbsetup-combine">
- <property name="settings.localRepository"
value="${settings.localRepository}" />
- <property name="ojdbc5.version"
value="${ojdbc5.version}" />
- <property name="postgresql.version"
value="${postgresql.version}" />
- <property name="h2.version"
value="${h2.version}" />
- <property name="jtds.version"
value="${jtds.version}" />
- <property name="task.classpath.property"
refid="maven.test.classpath" />
- <property name="rhq.ds.type-mapping"
value="${rhq.ds.type-mapping}" />
- <property name="rhq.ds.db-name"
value="${rhq.ds.db-name}" />
- <property name="rhq.ds.connection-url"
value="${rhq.ds.connection-url}" />
- <property name="rhq.ds.user-name"
value="${rhq.ds.user-name}" />
- <property name="rhq.ds.password"
value="${rhq.ds.password}" />
- <property name="project.version"
value="${project.version}" />
- <property name="db.schema.version"
value="${db.schema.version}" />
- </ant>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- <execution>
- <!--
- This execution will abort the build if the database schema is not up to
date.
- If you want the build to continue, regardless of your currently
installed schema,
- then pass -Ddbsetup-do-not-check-schema to the mvn command line.
- -->
- <id>test-db-schema-version</id>
- <phase>test</phase>
- <configuration>
- <tasks>
- <property name="settings.localRepository"
location="${user.home}/.m2/repository}" />
-
- <condition property="rhq.ds.type-mapping"
value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
- <equals arg1="${db}" arg2="dev"
/>
- </condition>
-
- <condition property="rhq.ds.connection-url"
value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
- <equals arg1="${db}" arg2="dev"
/>
- </condition>
+ <tasks>
+ <condition
property="rhq.ds.type-mapping" value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.connection-url" value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.user-name" value="${rhq.dev.ds.user-name}"
else="${rhq.test.ds.user-name}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.password" value="${rhq.dev.ds.password}"
else="${rhq.test.ds.password}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml">
+ <property
name="settings.localRepository" value="${settings.localRepository}"
/>
+ <property name="ojdbc5.version"
value="${ojdbc5.version}" />
+ <property
name="postgresql.version" value="${postgresql.version}" />
+ <property name="h2.version"
value="${h2.version}" />
+ <property name="jtds.version"
value="${jtds.version}" />
+ <property
name="task.classpath.property" refid="maven.test.classpath" />
+ <property
name="rhq.ds.type-mapping" value="${rhq.ds.type-mapping}" />
+ <property name="rhq.ds.db-name"
value="${rhq.ds.db-name}" />
+ <property
name="rhq.ds.connection-url" value="${rhq.ds.connection-url}" />
+ <property
name="rhq.ds.user-name" value="${rhq.ds.user-name}" />
+ <property name="rhq.ds.password"
value="${rhq.ds.password}" />
+ <property name="project.version"
value="${project.version}" />
+ <property
name="db.schema.version" value="${db.schema.version}" />
+ <property name="dbsetup"
value="${dbsetup}" />
+ <property
name="dbsetup-uninstall" value="${dbsetup-uninstall}" />
+ <property name="dbsetup-upgrade"
value="${dbsetup-upgrade}" />
+ <property name="dbsetup-export"
value="${dbsetup-export}" />
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+
<id>generate-dbsetup-dbupgrade-xml-files</id>
+ <phase>process-classes</phase>
+ <configuration>
+ <tasks>
+ <property
name="settings.localRepository"
location="${user.home}/.m2/repository}" />
+ <condition
property="rhq.ds.type-mapping" value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.connection-url" value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.user-name" value="${rhq.dev.ds.user-name}"
else="${rhq.test.ds.user-name}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.password" value="${rhq.dev.ds.password}"
else="${rhq.test.ds.password}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml"
target="dbsetup-combine">
+ <property
name="settings.localRepository" value="${settings.localRepository}"
/>
+ <property name="ojdbc5.version"
value="${ojdbc5.version}" />
+ <property
name="postgresql.version" value="${postgresql.version}" />
+ <property name="h2.version"
value="${h2.version}" />
+ <property name="jtds.version"
value="${jtds.version}" />
+ <property
name="task.classpath.property" refid="maven.test.classpath" />
+ <property
name="rhq.ds.type-mapping" value="${rhq.ds.type-mapping}" />
+ <property name="rhq.ds.db-name"
value="${rhq.ds.db-name}" />
+ <property
name="rhq.ds.connection-url" value="${rhq.ds.connection-url}" />
+ <property
name="rhq.ds.user-name" value="${rhq.ds.user-name}" />
+ <property name="rhq.ds.password"
value="${rhq.ds.password}" />
+ <property name="project.version"
value="${project.version}" />
+ <property
name="db.schema.version" value="${db.schema.version}" />
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <!-- This execution will abort the build if the
database schema is not up to date. If you want the build to continue, regardless of your
currently installed
+ schema, then pass -Ddbsetup-do-not-check-schema to
the mvn command line. -->
+ <id>test-db-schema-version</id>
+ <phase>test</phase>
+ <configuration>
+ <tasks>
+ <property
name="settings.localRepository"
location="${user.home}/.m2/repository}" />
+ <condition
property="rhq.ds.type-mapping" value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.connection-url" value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.user-name" value="${rhq.dev.ds.user-name}"
else="${rhq.test.ds.user-name}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.password" value="${rhq.dev.ds.password}"
else="${rhq.test.ds.password}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.driver-class" value="${rhq.dev.ds.driver-class}"
else="${rhq.test.ds.driver-class}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml"
target="dbsetup-check-schema">
+ <property
name="settings.localRepository" value="${settings.localRepository}"
/>
+ <property name="ojdbc5.version"
value="${ojdbc5.version}" />
+ <property
name="postgresql.version" value="${postgresql.version}" />
+ <property name="h2.version"
value="${h2.version}" />
+ <property name="jtds.version"
value="${jtds.version}" />
+ <property
name="task.classpath.property" refid="maven.test.classpath" />
+ <property name="rhq.ds.db-name"
value="${rhq.ds.db-name}" />
+ <property
name="rhq.ds.type-mapping" value="${rhq.ds.type-mapping}" />
+ <property
name="rhq.ds.connection-url" value="${rhq.ds.connection-url}" />
+ <property
name="rhq.ds.user-name" value="${rhq.ds.user-name}" />
+ <property name="rhq.ds.password"
value="${rhq.ds.password}" />
+ <property name="project.version"
value="${project.version}" />
+ <property
name="db.schema.version" value="${db.schema.version}" />
+ <property
name="rhq.ds.driver-class" value="${rhq.ds.driver-class}" />
+ <property
name="dbsetup-do-not-check-schema"
value="${dbsetup-do-not-check-schema}" />
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
- <condition property="rhq.ds.user-name"
value="${rhq.dev.ds.user-name}" else="${rhq.test.ds.user-name}">
- <equals arg1="${db}" arg2="dev"
/>
- </condition>
-
- <condition property="rhq.ds.password"
value="${rhq.dev.ds.password}" else="${rhq.test.ds.password}">
- <equals arg1="${db}" arg2="dev"
/>
- </condition>
-
- <condition property="rhq.ds.driver-class"
value="${rhq.dev.ds.driver-class}"
else="${rhq.test.ds.driver-class}">
- <equals arg1="${db}" arg2="dev"
/>
- </condition>
-
- <ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml"
target="dbsetup-check-schema">
- <property name="settings.localRepository"
value="${settings.localRepository}" />
- <property name="ojdbc5.version"
value="${ojdbc5.version}" />
- <property name="postgresql.version"
value="${postgresql.version}" />
- <property name="h2.version"
value="${h2.version}" />
- <property name="jtds.version"
value="${jtds.version}" />
- <property name="task.classpath.property"
refid="maven.test.classpath" />
- <property name="rhq.ds.db-name"
value="${rhq.ds.db-name}" />
- <property name="rhq.ds.type-mapping"
value="${rhq.ds.type-mapping}" />
- <property name="rhq.ds.connection-url"
value="${rhq.ds.connection-url}" />
- <property name="rhq.ds.user-name"
value="${rhq.ds.user-name}" />
- <property name="rhq.ds.password"
value="${rhq.ds.password}" />
- <property name="project.version"
value="${project.version}" />
- <property name="db.schema.version"
value="${db.schema.version}" />
- <property name="rhq.ds.driver-class"
value="${rhq.ds.driver-class}" />
- <property name="dbsetup-do-not-check-schema"
value="${dbsetup-do-not-check-schema}" />
- </ant>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>jon.release</id>
- <activation>
- <property>
- <name>jon.release</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-schema</id>
- <phase>test</phase>
- <configuration>
- <tasks>
- <property name="settings.localRepository"
location="${user.home}/.m2/repository}" />
-
- <condition property="rhq.ds.type-mapping"
value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
- <equals arg1="${db}" arg2="dev"
/>
- </condition>
-
- <condition property="rhq.ds.connection-url"
value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
- <equals arg1="${db}" arg2="dev"
/>
- </condition>
-
- <condition property="rhq.ds.user-name"
value="${rhq.dev.ds.user-name}" else="${rhq.test.ds.user-name}">
- <equals arg1="${db}" arg2="dev"
/>
- </condition>
-
- <condition property="rhq.ds.password"
value="${rhq.dev.ds.password}" else="${rhq.test.ds.password}">
- <equals arg1="${db}" arg2="dev"
/>
- </condition>
-
- <ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml"
target="create-release-schema">
- <property name="settings.localRepository"
value="${settings.localRepository}" />
- <property name="ojdbc5.version"
value="${ojdbc5.version}" />
- <property name="postgresql.version"
value="${postgresql.version}" />
- <property name="h2.version"
value="${h2.version}" />
- <property name="jtds.version"
value="${jtds.version}" />
- <property name="task.classpath.property"
refid="maven.test.classpath" />
- <property name="rhq.ds.type-mapping"
value="${rhq.ds.type-mapping}" />
- <property name="rhq.ds.db-name"
value="${rhq.ds.db-name}" />
- <property name="rhq.ds.connection-url"
value="${rhq.ds.connection-url}" />
- <property name="rhq.ds.user-name"
value="${rhq.ds.user-name}" />
- <property name="rhq.ds.password"
value="${rhq.ds.password}" />
- <property name="project.version"
value="${project.version}" />
- <property name="db.schema.version"
value="${db.schema.version}" />
- <property name="jon.release"
value="${jon.release}" />
- </ant>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>dev</id>
-
- <properties>
- <rhq.rootDir>../../..</rhq.rootDir>
-
<rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
-
<rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/lib</rhq.deploymentDir>
- </properties>
-
- <build>
- <plugins>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
- <executions>
-
- <execution>
- <id>deploy</id>
- <phase>compile</phase>
- <configuration>
- <tasks>
- <mkdir dir="${rhq.deploymentDir}" />
- <property name="deployment.file"
location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
- <echo>*** Updating ${deployment.file}...</echo>
- <jar destfile="${deployment.file}"
basedir="${project.build.outputDirectory}" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- <execution>
- <id>undeploy</id>
- <phase>clean</phase>
- <configuration>
- <tasks>
- <property name="deployment.file"
location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
- <echo>*** Deleting ${deployment.file}...</echo>
- <delete file="${deployment.file}" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- </executions>
- </plugin>
-
- </plugins>
- </build>
- </profile>
- <profile>
- <id>cobertura</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.cobertura</groupId>
- <artifactId>cobertura</artifactId>
- <version>${cobertura.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>cobertura-instrument</id>
- <phase>process-test-classes</phase>
- <configuration>
- <tasks>
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/cobertura/backup" />
- <!-- backup all classes so that we can instrument the original
classes-->
- <copy toDir="target/cobertura/backup"
verbose="true" overwrite="true">
- <fileset dir="target/classes">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- create a properties file and save there location of cobertura
data file-->
- <touch file="target/classes/cobertura.properties" />
- <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- instrument all classes in target/classes directory -->
- <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
- <fileset dir="${project.build.directory}/classes">
- <include name="**/*.class" />
- </fileset>
- </cobertura-instrument>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>cobertura-report</id>
- <phase>prepare-package</phase>
- <configuration>
- <tasks>
- <taskdef classpathref="maven.plugin.classpath"
resource="tasks.properties" />
- <!-- prepare directory structure for cobertura-->
- <mkdir dir="target/cobertura" />
- <mkdir dir="target/site/cobertura" />
- <!-- restore classes from backup folder to classes folder -->
- <copy toDir="target/classes" verbose="true"
overwrite="true">
- <fileset dir="target/cobertura/backup">
- <include name="**/*.class" />
- </fileset>
- </copy>
- <!-- delete backup folder-->
- <delete dir="target/cobertura/backup" />
- <!-- create a code coverage report -->
- <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
- <fileset dir="${basedir}/src/main/java">
- <include name="**/*.java" />
- </fileset>
- </cobertura-report>
- <!-- delete cobertura.properties file -->
- <delete file="target/classes/cobertura.properties"
/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>ojdbc-driver</id>
- <dependencies>
- <dependency>
- <groupId>com.oracle</groupId>
- <artifactId>ojdbc5</artifactId>
- <version>${ojdbc5.version}</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.2</version>
- <dependencies>
- <dependency>
- <groupId>com.oracle</groupId>
- <artifactId>ojdbc5</artifactId>
- <version>${ojdbc5.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
- </profile>
+ <profile>
+ <id>jon.release</id>
+ <activation>
+ <property>
+ <name>jon.release</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-schema</id>
+ <phase>test</phase>
+ <configuration>
+ <tasks>
+ <property
name="settings.localRepository"
location="${user.home}/.m2/repository}" />
+ <condition
property="rhq.ds.type-mapping" value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.connection-url" value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.user-name" value="${rhq.dev.ds.user-name}"
else="${rhq.test.ds.user-name}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <condition
property="rhq.ds.password" value="${rhq.dev.ds.password}"
else="${rhq.test.ds.password}">
+ <equals arg1="${db}"
arg2="dev" />
+ </condition>
+ <ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml"
target="create-release-schema">
+ <property
name="settings.localRepository" value="${settings.localRepository}"
/>
+ <property name="ojdbc5.version"
value="${ojdbc5.version}" />
+ <property
name="postgresql.version" value="${postgresql.version}" />
+ <property name="h2.version"
value="${h2.version}" />
+ <property name="jtds.version"
value="${jtds.version}" />
+ <property
name="task.classpath.property" refid="maven.test.classpath" />
+ <property
name="rhq.ds.type-mapping" value="${rhq.ds.type-mapping}" />
+ <property name="rhq.ds.db-name"
value="${rhq.ds.db-name}" />
+ <property
name="rhq.ds.connection-url" value="${rhq.ds.connection-url}" />
+ <property
name="rhq.ds.user-name" value="${rhq.ds.user-name}" />
+ <property name="rhq.ds.password"
value="${rhq.ds.password}" />
+ <property name="project.version"
value="${project.version}" />
+ <property
name="db.schema.version" value="${db.schema.version}" />
+ <property name="jon.release"
value="${jon.release}" />
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>dev</id>
+ <properties>
+ <rhq.rootDir>../../..</rhq.rootDir>
+
<rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
+
<rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/lib</rhq.deploymentDir>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <id>deploy</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${rhq.deploymentDir}"
/>
+ <property name="deployment.file"
location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating
${deployment.file}...</echo>
+ <jar destfile="${deployment.file}"
basedir="${project.build.outputDirectory}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>undeploy</id>
+ <phase>clean</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file"
location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Deleting
${deployment.file}...</echo>
+ <delete file="${deployment.file}"
/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>cobertura</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.cobertura</groupId>
+ <artifactId>cobertura</artifactId>
+ <version>${cobertura.version}</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>cobertura-instrument</id>
+ <phase>process-test-classes</phase>
+ <configuration>
+ <tasks>
+ <!-- prepare directory structure for cobertura
-->
+ <mkdir dir="target/cobertura" />
+ <mkdir dir="target/cobertura/backup"
/>
+ <!-- backup all classes so that we can
instrument the original classes -->
+ <copy
toDir="target/cobertura/backup" verbose="true"
overwrite="true">
+ <fileset
dir="target/classes">
+ <include name="**/*.class"
/>
+ </fileset>
+ </copy>
+ <!-- create a properties file and save there
location of cobertura data file -->
+ <touch
file="target/classes/cobertura.properties" />
+ <echo
file="target/classes/cobertura.properties">net.sourceforge.cobertura.datafile=${project.build.directory}/cobertura/cobertura.ser</echo>
+ <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
+ <!-- instrument all classes in target/classes
directory -->
+ <cobertura-instrument
datafile="${project.build.directory}/cobertura/cobertura.ser"
todir="${project.build.directory}/classes">
+ <fileset
dir="${project.build.directory}/classes">
+ <include name="**/*.class"
/>
+ </fileset>
+ </cobertura-instrument>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>cobertura-report</id>
+ <phase>prepare-package</phase>
+ <configuration>
+ <tasks>
+ <taskdef
classpathref="maven.plugin.classpath" resource="tasks.properties"
/>
+ <!-- prepare directory structure for cobertura
-->
+ <mkdir dir="target/cobertura" />
+ <mkdir dir="target/site/cobertura"
/>
+ <!-- restore classes from backup folder to
classes folder -->
+ <copy toDir="target/classes"
verbose="true" overwrite="true">
+ <fileset
dir="target/cobertura/backup">
+ <include name="**/*.class"
/>
+ </fileset>
+ </copy>
+ <!-- delete backup folder -->
+ <delete
dir="target/cobertura/backup" />
+ <!-- create a code coverage report -->
+ <cobertura-report format="html"
datafile="${project.build.directory}/cobertura/cobertura.ser"
destdir="${project.build.directory}/site/cobertura">
+ <fileset
dir="${basedir}/src/main/java">
+ <include name="**/*.java"
/>
+ </fileset>
+ </cobertura-report>
+ <!-- delete cobertura.properties file -->
+ <delete
file="target/classes/cobertura.properties" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>ojdbc-driver</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc5</artifactId>
+ <version>${ojdbc5.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.2</version>
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc5</artifactId>
+ <version>${ojdbc5.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
-
- <pluginRepositories>
- <pluginRepository>
- <id>codehaus-snapshots</id>
- <name>codehaus snapshots</name>
- <url>http://snapshots.repository.codehaus.org</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
-
-</project>
-
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>codehaus-snapshots</id>
+ <name>codehaus snapshots</name>
+ <url>http://snapshots.repository.codehaus.org</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+</project>
\ No newline at end of file
commit f74c6545ec40b20691d4557d85da06e2ab9b4f89
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Aug 1 15:44:22 2011 -0500
Stray changes from one more file reverted properly.
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 996ae31..6907de0 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -35,13 +35,12 @@
<version>1.6.5</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
-
<dependency>
<groupId>ant</groupId>
<artifactId>ant-launcher</artifactId>
@@ -167,48 +166,54 @@
<profiles>
<profile>
<id>latest</id>
- <activation>
- <property>
- <name>!jon.release</name>
- </property>
- </activation>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <configuration>
- <tasks>
- <!-- generate the I18N resource bundles -->
- <taskdef name="i18n"
classpathref="maven.runtime.classpath"
classname="mazz.i18n.ant.I18NAntTask" />
-
- <i18n
outputdir="${project.build.outputDirectory}" defaultlocale="en"
verbose="false" append="false" verify="true">
- <classpath refid="maven.runtime.classpath"
/>
- <classfileset
dir="${project.build.outputDirectory}">
- <include name="**/*I18NResourceKeys.class"
/>
- </classfileset>
- </i18n>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
-
- <execution>
- <id>dbsetup-worker</id>
- <phase>test</phase>
- <configuration>
+ <activation>
+ <property>
+ <name>!jon.release</name>
+ </property>
+ </activation>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <configuration>
+ <tasks>
+ <!-- generate the I18N resource bundles
-->
+ <taskdef name="i18n"
classpathref="maven.runtime.classpath"
classname="mazz.i18n.ant.I18NAntTask" />
+
+ <i18n
outputdir="${project.build.outputDirectory}" defaultlocale="en"
verbose="false" append="false" verify="true">
+ <classpath
refid="maven.runtime.classpath" />
+ <classfileset
dir="${project.build.outputDirectory}">
+ <include
name="**/*I18NResourceKeys.class" />
+ </classfileset>
+ </i18n>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>dbsetup-worker</id>
+ <phase>test</phase>
+ <configuration>
<tasks>
- <property name="settings.localRepository"
location="${user.home}/.m2/repository}" />
- <property name="rhq.ds.type-mapping"
value="${rhq.ds.type-mapping}" />
- <property name="rhq.ds.db-name"
value="${rhq.ds.db-name}" />
- <property name="rhq.ds.connection-url"
value="${rhq.ds.connection-url}"/>
- <property name="rhq.ds.user-name"
value="${rhq.ds.user-name}"/>
- <property name="rhq.ds.password"
value="${rhq.ds.password}"/>
+ <condition property="rhq.ds.type-mapping"
value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
+ <equals arg1="${db}" arg2="dev"
/>
+ </condition>
+ <condition property="rhq.ds.connection-url"
value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
+ <equals arg1="${db}" arg2="dev" />
+ </condition>
+ <condition property="rhq.ds.user-name"
value="${rhq.dev.ds.user-name}" else="${rhq.test.ds.user-name}">
+ <equals arg1="${db}" arg2="dev" />
+ </condition>
+ <condition property="rhq.ds.password"
value="${rhq.dev.ds.password}" else="${rhq.test.ds.password}">
+ <equals arg1="${db}" arg2="dev" />
+ </condition>
<ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml">
<property name="settings.localRepository"
value="${settings.localRepository}" />
@@ -243,21 +248,21 @@
<tasks>
<property name="settings.localRepository"
location="${user.home}/.m2/repository}" />
- <condition property="rhq.ds.type-mapping"
value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
+ <condition property="rhq.ds.type-mapping"
value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
<equals arg1="${db}" arg2="dev" />
- </condition>
+ </condition>
- <condition property="rhq.ds.connection-url"
value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
+ <condition property="rhq.ds.connection-url"
value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
<equals arg1="${db}" arg2="dev" />
- </condition>
+ </condition>
- <condition property="rhq.ds.user-name"
value="${rhq.dev.ds.user-name}" else="${rhq.test.ds.user-name}">
+ <condition property="rhq.ds.user-name"
value="${rhq.dev.ds.user-name}" else="${rhq.test.ds.user-name}">
<equals arg1="${db}" arg2="dev" />
- </condition>
+ </condition>
- <condition property="rhq.ds.password"
value="${rhq.dev.ds.password}" else="${rhq.test.ds.password}">
+ <condition property="rhq.ds.password"
value="${rhq.dev.ds.password}" else="${rhq.test.ds.password}">
<equals arg1="${db}" arg2="dev" />
- </condition>
+ </condition>
<ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml"
target="dbsetup-combine">
<property name="settings.localRepository"
value="${settings.localRepository}" />
@@ -289,50 +294,50 @@
-->
<id>test-db-schema-version</id>
<phase>test</phase>
- <configuration>
- <tasks>
- <property name="settings.localRepository"
location="${user.home}/.m2/repository}" />
-
- <condition property="rhq.ds.type-mapping"
value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
- <equals arg1="${db}" arg2="dev" />
- </condition>
-
- <condition property="rhq.ds.connection-url"
value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
- <equals arg1="${db}" arg2="dev" />
- </condition>
-
- <condition property="rhq.ds.user-name"
value="${rhq.dev.ds.user-name}" else="${rhq.test.ds.user-name}">
- <equals arg1="${db}" arg2="dev" />
- </condition>
-
- <condition property="rhq.ds.password"
value="${rhq.dev.ds.password}" else="${rhq.test.ds.password}">
- <equals arg1="${db}" arg2="dev" />
- </condition>
-
- <condition property="rhq.ds.driver-class"
value="${rhq.dev.ds.driver-class}"
else="${rhq.test.ds.driver-class}">
- <equals arg1="${db}" arg2="dev" />
- </condition>
-
- <ant antfile="${basedir}/src/main/scripts/dbsetup-build.xml"
target="dbsetup-check-schema">
- <property name="settings.localRepository"
value="${settings.localRepository}" />
- <property name="ojdbc5.version"
value="${ojdbc5.version}" />
- <property name="postgresql.version"
value="${postgresql.version}" />
- <property name="h2.version"
value="${h2.version}" />
- <property name="jtds.version"
value="${jtds.version}" />
- <property name="task.classpath.property"
refid="maven.test.classpath" />
- <property name="rhq.ds.db-name"
value="${rhq.ds.db-name}" />
- <property name="rhq.ds.type-mapping"
value="${rhq.ds.type-mapping}" />
- <property name="rhq.ds.connection-url"
value="${rhq.ds.connection-url}" />
- <property name="rhq.ds.user-name"
value="${rhq.ds.user-name}" />
- <property name="rhq.ds.password"
value="${rhq.ds.password}" />
- <property name="project.version"
value="${project.version}" />
- <property name="db.schema.version"
value="${db.schema.version}" />
- <property name="rhq.ds.driver-class"
value="${rhq.ds.driver-class}" />
- <property name="dbsetup-do-not-check-schema"
value="${dbsetup-do-not-check-schema}" />
- </ant>
- </tasks>
- </configuration>
- <goals>
+ <configuration>
+ <tasks>
+ <property name="settings.localRepository"
location="${user.home}/.m2/repository}" />
+
+ <condition property="rhq.ds.type-mapping"
value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
+ <equals arg1="${db}" arg2="dev"
/>
+ </condition>
+
+ <condition property="rhq.ds.connection-url"
value="${rhq.dev.ds.connection-url}"
else="${rhq.test.ds.connection-url}">
+ <equals arg1="${db}" arg2="dev"
/>
+ </condition>
+
+ <condition property="rhq.ds.user-name"
value="${rhq.dev.ds.user-name}" else="${rhq.test.ds.user-name}">
+ <equals arg1="${db}" arg2="dev"
/>
+ </condition>
+
+ <condition property="rhq.ds.password"
value="${rhq.dev.ds.password}" else="${rhq.test.ds.password}">
+ <equals arg1="${db}" arg2="dev"
/>
+ </condition>
+
+ <condition property="rhq.ds.driver-class"
value="${rhq.dev.ds.driver-class}"
else="${rhq.test.ds.driver-class}">
+ <equals arg1="${db}" arg2="dev"
/>
+ </condition>
+
+ <ant
antfile="${basedir}/src/main/scripts/dbsetup-build.xml"
target="dbsetup-check-schema">
+ <property name="settings.localRepository"
value="${settings.localRepository}" />
+ <property name="ojdbc5.version"
value="${ojdbc5.version}" />
+ <property name="postgresql.version"
value="${postgresql.version}" />
+ <property name="h2.version"
value="${h2.version}" />
+ <property name="jtds.version"
value="${jtds.version}" />
+ <property name="task.classpath.property"
refid="maven.test.classpath" />
+ <property name="rhq.ds.db-name"
value="${rhq.ds.db-name}" />
+ <property name="rhq.ds.type-mapping"
value="${rhq.ds.type-mapping}" />
+ <property name="rhq.ds.connection-url"
value="${rhq.ds.connection-url}" />
+ <property name="rhq.ds.user-name"
value="${rhq.ds.user-name}" />
+ <property name="rhq.ds.password"
value="${rhq.ds.password}" />
+ <property name="project.version"
value="${project.version}" />
+ <property name="db.schema.version"
value="${db.schema.version}" />
+ <property name="rhq.ds.driver-class"
value="${rhq.ds.driver-class}" />
+ <property name="dbsetup-do-not-check-schema"
value="${dbsetup-do-not-check-schema}" />
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
<goal>run</goal>
</goals>
</execution>
@@ -361,7 +366,7 @@
<tasks>
<property name="settings.localRepository"
location="${user.home}/.m2/repository}" />
- <condition property="rhq.ds.type-mapping"
value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
+ <condition property="rhq.ds.type-mapping"
value="${rhq.dev.ds.type-mapping}"
else="${rhq.test.ds.type-mapping}">
<equals arg1="${db}" arg2="dev"
/>
</condition>
@@ -391,7 +396,7 @@
<property name="rhq.ds.password"
value="${rhq.ds.password}" />
<property name="project.version"
value="${project.version}" />
<property name="db.schema.version"
value="${db.schema.version}" />
- <property name="jon.release" value="${jon.release}" />
+ <property name="jon.release"
value="${jon.release}" />
</ant>
</tasks>
</configuration>