From: Sanjay Dalal Date: Wed, 2 Dec 2009 21:12:10 +0000 (+0000) Subject: CSPACE-643 build now requires the following properties set in the environment. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=8cab7a41d2f47d3d842919aa12b693c74a2193e7;p=tmp%2Fjakarta-migration.git CSPACE-643 build now requires the following properties set in the environment. DB_USER, DB_PASSWORD (for create_db, gen_ddl tasks) and JBOSS_HOME (for deploy) Each build.xml reads environment before loading build.properties. build.properties uses environment variables to set db.user, db.user.password and jboss.dir properties. Database and user specific properties are also externalized from hibernate.cfg.xml used by gen_ddl task. Before invoking gen_ddl subsitution occurs as a pre-requisite. tests: mvn test at services level, ant create_db at trunk level, gen_ddl at account and authentication client levels M trunk/services/authentication/service/build.xml M trunk/services/authentication/client/src/test/resources/hibernate.cfg.xml M trunk/services/authentication/client/build.xml M trunk/services/authentication/build.xml M trunk/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/build.xml M trunk/services/collectionobject/3rdparty/build.xml M trunk/services/collectionobject/build.xml M trunk/services/JaxRsServiceProvider/build.xml M trunk/services/common/build.xml M trunk/services/acquisition/3rdparty/nuxeo-platform-cs-acquisition/build.xml M trunk/services/acquisition/3rdparty/build.xml M trunk/services/acquisition/build.xml M trunk/services/account/build.xml M trunk/services/account/client/src/test/resources/hibernate.cfg.xml M trunk/services/account/client/build.xml M trunk/services/id/service/build.xml M trunk/services/id/build.xml M trunk/services/vocabulary/3rdparty/nuxeo-platform-cs-vocabulary/build.xml M trunk/services/vocabulary/3rdparty/build.xml M trunk/services/vocabulary/build.xml M trunk/services/intake/3rdparty/nuxeo-platform-cs-intake/build.xml M trunk/services/intake/3rdparty/build.xml M trunk/services/intake/build.xml M trunk/services/relation/3rdparty/nuxeo-platform-cs-relation/build.xml M trunk/services/relation/3rdparty/build.xml M trunk/services/relation/build.xml M trunk/build.properties M trunk/build.xml M trunk/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.properties M trunk/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.xml M trunk/3rdparty/nuxeo/build.xml M trunk/3rdparty/build.xml --- diff --git a/3rdparty/build.xml b/3rdparty/build.xml index 18747454a..397b8e170 100644 --- a/3rdparty/build.xml +++ b/3rdparty/build.xml @@ -5,6 +5,8 @@ + + diff --git a/3rdparty/nuxeo/build.xml b/3rdparty/nuxeo/build.xml index 3998dcfd5..7bf63d8bc 100644 --- a/3rdparty/nuxeo/build.xml +++ b/3rdparty/nuxeo/build.xml @@ -5,6 +5,8 @@ + + diff --git a/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.properties b/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.properties index c26799aa9..ab6f6614a 100644 --- a/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.properties +++ b/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.properties @@ -1,5 +1,5 @@ # Example for Windows -jboss.dir=c:/dev/jboss-4.2.3.GA +jboss.dir=${env.JBOSS_HOME} # Example for Unix #jboss.dir=/opt/jboss diff --git a/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.xml b/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.xml index d4e3b266c..e26e09c58 100644 --- a/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.xml +++ b/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.xml @@ -1,6 +1,8 @@ + + diff --git a/build.properties b/build.properties index 956127b9e..d8f869199 100644 --- a/build.properties +++ b/build.properties @@ -36,7 +36,7 @@ dist.deploy.nuxeo.system=${dist.deploy.nuxeo}/${nuxeo.system} #jboss #assumption: both nuxeo and cspace domains are using the same JBoss installation jboss.release=jboss-4.2.3.GA -jboss.dir=/home/sanjaydalal/work/${jboss.release} +jboss.dir=${env.JBOSS_HOME} jboss.home=${jboss.dir} #jboss cspace domain @@ -58,8 +58,11 @@ jboss.deploy.nuxeo.system=${jboss.deploy.nuxeo}/${nuxeo.system} #database db=mysql db.script.dir=${basedir}/src/main/resources/db/${db} -db.user=root -db.user.password=admin +db.user=${env.DB_USER} +db.user.password=${env.DB_PASSWORD} db.host=localhost db.port=3306 -db.driver.jar=${jboss.lib.cspace}/mysql-connector-java-5.1.7-bin.jar \ No newline at end of file +db.driver.jar=${jboss.lib.cspace}/mysql-connector-java-5.1.7-bin.jar +db.jdbc.url=jdbc:${db}://${db.host}:${db.port}/cspace +db.jdbc.driver.class=com.mysql.jdbc.Driver +db.dialect=org.hibernate.dialect.MySQLDialect diff --git a/build.xml b/build.xml index 7af82a079..4f4e1888e 100644 --- a/build.xml +++ b/build.xml @@ -3,7 +3,9 @@ collectionspace services - + + + @@ -266,7 +268,7 @@ - + diff --git a/services/JaxRsServiceProvider/build.xml b/services/JaxRsServiceProvider/build.xml index e6ba44aa6..a96d191c5 100644 --- a/services/JaxRsServiceProvider/build.xml +++ b/services/JaxRsServiceProvider/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/account/build.xml b/services/account/build.xml index 6c5a6f903..cf82f7bd7 100644 --- a/services/account/build.xml +++ b/services/account/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/account/client/build.xml b/services/account/client/build.xml index 380c36fa9..538e37c77 100644 --- a/services/account/client/build.xml +++ b/services/account/client/build.xml @@ -5,6 +5,8 @@ + + @@ -107,9 +109,26 @@ + + + + + + + + + + + + + + + + + - + @@ -119,7 +138,7 @@ - + diff --git a/services/account/client/src/test/resources/hibernate.cfg.xml b/services/account/client/src/test/resources/hibernate.cfg.xml index c7c600995..8296399cf 100644 --- a/services/account/client/src/test/resources/hibernate.cfg.xml +++ b/services/account/client/src/test/resources/hibernate.cfg.xml @@ -1,22 +1,22 @@ - jdbc:mysql://localhost:3306/cspace - com.mysql.jdbc.Driver - test - test - org.hibernate.dialect.MySQLDialect + @DB_URL@ + @DB_DRIVER_CLASS@ + @DB_USER@ + @DB_PASSWORD@ + @DB_DIALECT@ org.hibernate.transaction.JDBCTransactionFactory thread true diff --git a/services/acquisition/3rdparty/build.xml b/services/acquisition/3rdparty/build.xml index 1acd41734..8cf5bce76 100644 --- a/services/acquisition/3rdparty/build.xml +++ b/services/acquisition/3rdparty/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/acquisition/3rdparty/nuxeo-platform-cs-acquisition/build.xml b/services/acquisition/3rdparty/nuxeo-platform-cs-acquisition/build.xml index 95f83cf1e..2d9b4852a 100644 --- a/services/acquisition/3rdparty/nuxeo-platform-cs-acquisition/build.xml +++ b/services/acquisition/3rdparty/nuxeo-platform-cs-acquisition/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/acquisition/build.xml b/services/acquisition/build.xml index fa283736f..e5187d385 100644 --- a/services/acquisition/build.xml +++ b/services/acquisition/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/authentication/build.xml b/services/authentication/build.xml index 6d4ccff2b..e63117331 100644 --- a/services/authentication/build.xml +++ b/services/authentication/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/authentication/client/build.xml b/services/authentication/client/build.xml index 6736c399f..631350b86 100644 --- a/services/authentication/client/build.xml +++ b/services/authentication/client/build.xml @@ -5,6 +5,8 @@ + + @@ -106,10 +108,27 @@ + + + + + + + + + + + + + + + + + - + @@ -119,7 +138,7 @@ - + diff --git a/services/authentication/client/src/test/resources/hibernate.cfg.xml b/services/authentication/client/src/test/resources/hibernate.cfg.xml index 9c2b94e2c..8296399cf 100644 --- a/services/authentication/client/src/test/resources/hibernate.cfg.xml +++ b/services/authentication/client/src/test/resources/hibernate.cfg.xml @@ -1,7 +1,7 @@ + + @@ -114,13 +116,15 @@ - + + - + + + + diff --git a/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/build.xml b/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/build.xml index b335dec26..5d379105f 100644 --- a/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/build.xml +++ b/services/collectionobject/3rdparty/nuxeo-platform-cs-collectionobject/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/collectionobject/build.xml b/services/collectionobject/build.xml index 95d4e3f06..6c6a7f9e5 100644 --- a/services/collectionobject/build.xml +++ b/services/collectionobject/build.xml @@ -5,6 +5,8 @@ + + @@ -127,7 +129,7 @@ - + diff --git a/services/common/build.xml b/services/common/build.xml index c689430ee..3a725fdfa 100644 --- a/services/common/build.xml +++ b/services/common/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/id/build.xml b/services/id/build.xml index 7f6bba48a..e84303625 100644 --- a/services/id/build.xml +++ b/services/id/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/id/service/build.xml b/services/id/service/build.xml index c7fe75a8d..d5a544fd4 100644 --- a/services/id/service/build.xml +++ b/services/id/service/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/intake/3rdparty/build.xml b/services/intake/3rdparty/build.xml index 2de95591f..3c02035d1 100644 --- a/services/intake/3rdparty/build.xml +++ b/services/intake/3rdparty/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/intake/3rdparty/nuxeo-platform-cs-intake/build.xml b/services/intake/3rdparty/nuxeo-platform-cs-intake/build.xml index 1ce3256bc..5d94507c2 100644 --- a/services/intake/3rdparty/nuxeo-platform-cs-intake/build.xml +++ b/services/intake/3rdparty/nuxeo-platform-cs-intake/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/intake/build.xml b/services/intake/build.xml index 9d8b03f6c..d0235ce60 100644 --- a/services/intake/build.xml +++ b/services/intake/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/relation/3rdparty/build.xml b/services/relation/3rdparty/build.xml index 31f25efc2..384814117 100644 --- a/services/relation/3rdparty/build.xml +++ b/services/relation/3rdparty/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/relation/3rdparty/nuxeo-platform-cs-relation/build.xml b/services/relation/3rdparty/nuxeo-platform-cs-relation/build.xml index 3adb7e945..bfbae1481 100644 --- a/services/relation/3rdparty/nuxeo-platform-cs-relation/build.xml +++ b/services/relation/3rdparty/nuxeo-platform-cs-relation/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/relation/build.xml b/services/relation/build.xml index abd1a7547..97c11228e 100644 --- a/services/relation/build.xml +++ b/services/relation/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/vocabulary/3rdparty/build.xml b/services/vocabulary/3rdparty/build.xml index 18d4c8589..43e004eea 100644 --- a/services/vocabulary/3rdparty/build.xml +++ b/services/vocabulary/3rdparty/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/vocabulary/3rdparty/nuxeo-platform-cs-vocabulary/build.xml b/services/vocabulary/3rdparty/nuxeo-platform-cs-vocabulary/build.xml index 8688b0801..647370a11 100644 --- a/services/vocabulary/3rdparty/nuxeo-platform-cs-vocabulary/build.xml +++ b/services/vocabulary/3rdparty/nuxeo-platform-cs-vocabulary/build.xml @@ -5,6 +5,8 @@ + + diff --git a/services/vocabulary/build.xml b/services/vocabulary/build.xml index f56f37c2e..036120fbf 100644 --- a/services/vocabulary/build.xml +++ b/services/vocabulary/build.xml @@ -5,6 +5,8 @@ + + @@ -115,9 +117,9 @@ - + - + - - - + + +