From: Sanjay Dalal Date: Thu, 17 Dec 2009 21:29:06 +0000 (+0000) Subject: NOJIRA moved db script generation and create_db tasks out of account.client and authe... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=e42ef77846140e4f5f676425c0198d7df4aafa42;p=tmp%2Fjakarta-migration.git NOJIRA moved db script generation and create_db tasks out of account.client and authentication.client to account.pstore and authentication.pstore Added gen_ddl task at trunk level and service.main levels M trunk/services/authentication/pom.xml AM trunk/services/authentication/pstore A trunk/services/authentication/pstore/src A trunk/services/authentication/pstore/src/test A trunk/services/authentication/pstore/src/test/resources A trunk/services/authentication/pstore/src/test/resources/META-INF A trunk/services/authentication/pstore/src/test/resources/META-INF/persistence.xml A trunk/services/authentication/pstore/src/test/resources/log4j.properties A trunk/services/authentication/pstore/src/test/resources/hibernate.cfg.xml A trunk/services/authentication/pstore/src/main A trunk/services/authentication/pstore/src/main/resources A + trunk/services/authentication/pstore/src/main/resources/db A trunk/services/authentication/pstore/pom.xml A trunk/services/authentication/pstore/build.xml D trunk/services/authentication/client/src/main/resources/db M trunk/services/authentication/client/pom.xml M trunk/services/authentication/client/build.xml M trunk/services/authentication/build.xml M trunk/services/account/pom.xml A trunk/services/account/pstore A trunk/services/account/pstore/src A trunk/services/account/pstore/src/test A trunk/services/account/pstore/src/test/resources A trunk/services/account/pstore/src/test/resources/META-INF A trunk/services/account/pstore/src/test/resources/META-INF/persistence.xml A trunk/services/account/pstore/src/test/resources/log4j.properties A trunk/services/account/pstore/src/test/resources/hibernate.cfg.xml A trunk/services/account/pstore/src/main A trunk/services/account/pstore/src/main/resources A trunk/services/account/pstore/src/main/resources/db A trunk/services/account/pstore/src/main/resources/db/mysql A + trunk/services/account/pstore/src/main/resources/db/mysql/test_account.sql A + trunk/services/account/pstore/src/main/resources/db/mysql/account.sql A trunk/services/account/pstore/pom.xml A trunk/services/account/pstore/build.xml M trunk/services/account/build.xml D trunk/services/account/client/src/main/resources/db/mysql/test_account.sql D trunk/services/account/client/src/main/resources/db/mysql/account.sql M trunk/services/account/client/pom.xml M trunk/services/account/client/build.xml M trunk/services/build.xml M trunk/build.xml --- diff --git a/build.xml b/build.xml index 4f4e1888e..e16026705 100644 --- a/build.xml +++ b/build.xml @@ -18,20 +18,20 @@ - + + description="generate cspace service distribution"> - + - + @@ -42,19 +42,19 @@ + preserveLeadingSlashes="true"> + description="create jboss distributions for cspace and nuxeo"> + description="generate jboss distribution for cspace"> @@ -73,17 +73,17 @@ + prefix="${jboss.release}" + preserveLeadingSlashes="true"> - + + description="generate nuxeo domain distribution" > @@ -102,8 +102,8 @@ + prefix="${jboss.release}" + preserveLeadingSlashes="true"> @@ -112,7 +112,7 @@ + description="mvn package" /> @@ -137,7 +137,7 @@ + description="mvn install" /> @@ -163,7 +163,7 @@ + description="Delete target directories" > @@ -198,24 +198,30 @@ + + + + + description="create database(s), grant privileges to test users"> + url="jdbc:mysql://${db.host}:${db.port}/cspace" + userid="${db.user}" + password="${db.user.password}" + src="${db.script.dir}/init_db.sql" + > + - + description="deploy services in ${jboss.server.cspace}"> + @@ -229,7 +235,7 @@ + description="undeploy services from ${jboss.server.cspace}"> @@ -239,7 +245,7 @@ + description="deploy services in running ${jboss.server.cspace}"> @@ -263,7 +269,7 @@ + description="Installer: Creates an installer distribution for the CollectionSpace services."> diff --git a/services/account/build.xml b/services/account/build.xml index cf82f7bd7..7ba51d58e 100644 --- a/services/account/build.xml +++ b/services/account/build.xml @@ -3,7 +3,7 @@ collectionobject service - + @@ -20,8 +20,8 @@ - + description="Package CollectionSpace Services" /> + @@ -32,7 +32,7 @@ - + @@ -48,7 +48,7 @@ + description="Install" /> @@ -73,7 +73,7 @@ + description="Delete target directories" > @@ -107,24 +107,29 @@ + + + + - + description="create tables(s), indices for account service"> + - + description="deploy collectionobject service"> + - + description="undeploy collectionobject service"> + - + description="distribute collectionobject service}"> + diff --git a/services/account/client/build.xml b/services/account/client/build.xml index b41dd80a0..669ece089 100644 --- a/services/account/client/build.xml +++ b/services/account/client/build.xml @@ -126,59 +126,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/services/account/client/pom.xml b/services/account/client/pom.xml index 3f0d57433..093e95431 100644 --- a/services/account/client/pom.xml +++ b/services/account/client/pom.xml @@ -14,10 +14,6 @@ org.collectionspace.services.account.client 1.0 services.account.client - - account.sql - ${basedir}/src/main/resources/db/mysql - @@ -133,69 +129,6 @@ - - - - ddl - - - - org.codehaus.mojo - hibernate3-maven-plugin - 2.2 - - - process-test-resources - - hbm2ddl - - - - - - - hbm2ddl - - - - ${sql.file} - jpaconfiguration - true - true - true - true - false - org.collectionspace.services.account - - - - - mysql - mysql-connector-java - 5.0.5 - - - - - maven-antrun-plugin - - - process-test-resources - - - - - - - run - - - - - - - - diff --git a/services/account/pom.xml b/services/account/pom.xml index 15ce11de5..dfff467a8 100644 --- a/services/account/pom.xml +++ b/services/account/pom.xml @@ -14,6 +14,7 @@ jaxb + pstore service client diff --git a/services/account/pstore/build.xml b/services/account/pstore/build.xml new file mode 100644 index 000000000..27e12ea2a --- /dev/null +++ b/services/account/pstore/build.xml @@ -0,0 +1,197 @@ + + + + collectionspace account service + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/services/account/pstore/pom.xml b/services/account/pstore/pom.xml new file mode 100644 index 000000000..8dcd7084a --- /dev/null +++ b/services/account/pstore/pom.xml @@ -0,0 +1,157 @@ + + + + + org.collectionspace.services.account + org.collectionspace.services + 1.0 + + + 4.0.0 + org.collectionspace.services + org.collectionspace.services.account.pstore + 1.0 + services.account.pstore + + account.sql + ${basedir}/src/main/resources/db/mysql + + + + + org.slf4j + slf4j-api + test + + + org.slf4j + slf4j-log4j12 + test + + + org.collectionspace.services + org.collectionspace.services.account.jaxb + 1.0 + + + org.testng + testng + 5.6 + + + mysql + mysql-connector-java + + + + + cspace-services-account-client + + + maven-antrun-plugin + + + subs-hibernate-config + generate-test-resources + + run + + + + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + log4j.configuration + file:target/test-classes/log4j.properties + + + + + + maven-compiler-plugin + 2.0.2 + + 1.6 + 1.6 + + + + + + + + ddl + + + + org.codehaus.mojo + hibernate3-maven-plugin + 2.2 + + + process-test-resources + + hbm2ddl + + + + + + + hbm2ddl + + + + ${sql.file} + jpaconfiguration + true + true + true + true + false + org.collectionspace.services.account + + + + + mysql + mysql-connector-java + 5.0.5 + + + + + maven-antrun-plugin + + + process-test-resources + + + + + + + run + + + + + + + + + + + diff --git a/services/account/client/src/main/resources/db/mysql/account.sql b/services/account/pstore/src/main/resources/db/mysql/account.sql similarity index 100% rename from services/account/client/src/main/resources/db/mysql/account.sql rename to services/account/pstore/src/main/resources/db/mysql/account.sql diff --git a/services/account/client/src/main/resources/db/mysql/test_account.sql b/services/account/pstore/src/main/resources/db/mysql/test_account.sql similarity index 100% rename from services/account/client/src/main/resources/db/mysql/test_account.sql rename to services/account/pstore/src/main/resources/db/mysql/test_account.sql diff --git a/services/account/pstore/src/test/resources/META-INF/persistence.xml b/services/account/pstore/src/test/resources/META-INF/persistence.xml new file mode 100644 index 000000000..f4c1e8b49 --- /dev/null +++ b/services/account/pstore/src/test/resources/META-INF/persistence.xml @@ -0,0 +1,20 @@ + + + + org.collectionspace.services.account.AccountsCommon + org.collectionspace.services.account.AccountsCommon$Tenant + org.collectionspace.services.account.AccountsCommonList + org.collectionspace.services.account.AccountsCommonList$AccountListItem + + + + + + + diff --git a/services/account/pstore/src/test/resources/hibernate.cfg.xml b/services/account/pstore/src/test/resources/hibernate.cfg.xml new file mode 100644 index 000000000..8296399cf --- /dev/null +++ b/services/account/pstore/src/test/resources/hibernate.cfg.xml @@ -0,0 +1,24 @@ + + + + + + + @DB_URL@ + @DB_DRIVER_CLASS@ + @DB_USER@ + @DB_PASSWORD@ + @DB_DIALECT@ + org.hibernate.transaction.JDBCTransactionFactory + thread + true + + diff --git a/services/account/pstore/src/test/resources/log4j.properties b/services/account/pstore/src/test/resources/log4j.properties new file mode 100644 index 000000000..f9c47870a --- /dev/null +++ b/services/account/pstore/src/test/resources/log4j.properties @@ -0,0 +1,25 @@ +log4j.rootLogger=debug, stdout, R + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout + +# Pattern to output the caller's file name and line number. +log4j.appender.stdout.layout.ConversionPattern=%d %-5p [%t] [%c:%L] %m%n + +log4j.appender.R=org.apache.log4j.RollingFileAppender +log4j.appender.R.File=target/test-client.log + +log4j.appender.R.MaxFileSize=100KB +# Keep one backup file +log4j.appender.R.MaxBackupIndex=1 + +log4j.appender.R.layout=org.apache.log4j.PatternLayout +log4j.appender.R.layout.ConversionPattern=%d %-5p [%t] [%c:%L] %m%n + +#packages +log4j.logger.org.collectionspace=DEBUG +log4j.logger.org.apache=INFO +log4j.logger.httpclient=INFO +log4j.logger.org.jboss.resteasy=INFO +log4j.logger.org.hibernate=INFO +log4j.logger.org.hibernate.cfg=WARN diff --git a/services/authentication/build.xml b/services/authentication/build.xml index e63117331..81a73cfce 100644 --- a/services/authentication/build.xml +++ b/services/authentication/build.xml @@ -3,7 +3,7 @@ authentication service - + @@ -20,8 +20,8 @@ - + description="Package CollectionSpace Services" /> + @@ -32,7 +32,7 @@ - + @@ -48,7 +48,7 @@ + description="Install" /> @@ -73,7 +73,7 @@ + description="Delete target directories" > @@ -107,26 +107,31 @@ + + + - + description="create tables(s), indices for authentication service"> + - + description="deploy authentication service"> + - + description="undeploy authentication service"> + + description="distribute authentication service}"> + diff --git a/services/authentication/client/build.xml b/services/authentication/client/build.xml index 631350b86..c4ffad0f6 100644 --- a/services/authentication/client/build.xml +++ b/services/authentication/client/build.xml @@ -124,62 +124,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/services/authentication/client/pom.xml b/services/authentication/client/pom.xml index 4d0086b8c..a5bda0fa0 100644 --- a/services/authentication/client/pom.xml +++ b/services/authentication/client/pom.xml @@ -14,10 +14,6 @@ org.collectionspace.services.authentication.client 1.0 services.authentication.client - - authentication.sql - ${basedir}/src/main/resources/db/mysql - @@ -40,17 +36,6 @@ org.collectionspace.services.client 1.0 - - - org.collectionspace.services - org.collectionspace.services.account.client - 1.0 - - - org.collectionspace.services - org.collectionspace.services.collectionobject.client - 1.0 - org.testng testng @@ -132,69 +117,6 @@ - - - - ddl - - - - org.codehaus.mojo - hibernate3-maven-plugin - 2.2 - - - process-test-resources - - hbm2ddl - - - - - - - hbm2ddl - - - - ${sql.file} - jpaconfiguration - true - true - true - true - false - org.collectionspace.services.authentication - - - - - mysql - mysql-connector-java - 5.0.5 - - - - - maven-antrun-plugin - - - process-test-resources - - - - - - - run - - - - - - - - diff --git a/services/authentication/pom.xml b/services/authentication/pom.xml index 8d131d494..da983b443 100644 --- a/services/authentication/pom.xml +++ b/services/authentication/pom.xml @@ -17,6 +17,7 @@ jaxb + pstore service client diff --git a/services/authentication/pstore/build.xml b/services/authentication/pstore/build.xml new file mode 100644 index 000000000..1add12b45 --- /dev/null +++ b/services/authentication/pstore/build.xml @@ -0,0 +1,197 @@ + + + + collectionspace authentication service + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/services/authentication/pstore/pom.xml b/services/authentication/pstore/pom.xml new file mode 100644 index 000000000..cb896ca76 --- /dev/null +++ b/services/authentication/pstore/pom.xml @@ -0,0 +1,157 @@ + + + + + org.collectionspace.services.authentication + org.collectionspace.services + 1.0 + + + 4.0.0 + org.collectionspace.services + org.collectionspace.services.authentication.pstore + 1.0 + services.authentication.pstore + + authentication.sql + ${basedir}/src/main/resources/db/mysql + + + + + org.slf4j + slf4j-api + test + + + org.slf4j + slf4j-log4j12 + test + + + org.collectionspace.services + org.collectionspace.services.authentication.jaxb + 1.0 + + + org.testng + testng + 5.6 + + + mysql + mysql-connector-java + + + + + cspace-services-authentication-client + + + maven-antrun-plugin + + + subs-hibernate-config + generate-test-resources + + run + + + + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + log4j.configuration + file:target/test-classes/log4j.properties + + + + + + maven-compiler-plugin + 2.0.2 + + 1.6 + 1.6 + + + + + + + + ddl + + + + org.codehaus.mojo + hibernate3-maven-plugin + 2.2 + + + process-test-resources + + hbm2ddl + + + + + + + hbm2ddl + + + + ${sql.file} + jpaconfiguration + true + true + true + true + false + org.collectionspace.services.authentication + + + + + mysql + mysql-connector-java + 5.0.5 + + + + + maven-antrun-plugin + + + process-test-resources + + + + + + + run + + + + + + + + + + + diff --git a/services/authentication/client/src/main/resources/db/mysql/authentication.sql b/services/authentication/pstore/src/main/resources/db/mysql/authentication.sql similarity index 100% rename from services/authentication/client/src/main/resources/db/mysql/authentication.sql rename to services/authentication/pstore/src/main/resources/db/mysql/authentication.sql diff --git a/services/authentication/client/src/main/resources/db/mysql/test_authn.sql b/services/authentication/pstore/src/main/resources/db/mysql/test_authn.sql similarity index 100% rename from services/authentication/client/src/main/resources/db/mysql/test_authn.sql rename to services/authentication/pstore/src/main/resources/db/mysql/test_authn.sql diff --git a/services/authentication/pstore/src/test/resources/META-INF/persistence.xml b/services/authentication/pstore/src/test/resources/META-INF/persistence.xml new file mode 100644 index 000000000..97d00a01d --- /dev/null +++ b/services/authentication/pstore/src/test/resources/META-INF/persistence.xml @@ -0,0 +1,19 @@ + + + + org.collectionspace.services.authentication.User + org.collectionspace.services.authentication.Role + org.collectionspace.services.authentication.UserRole + + + + + + + diff --git a/services/authentication/pstore/src/test/resources/hibernate.cfg.xml b/services/authentication/pstore/src/test/resources/hibernate.cfg.xml new file mode 100644 index 000000000..8296399cf --- /dev/null +++ b/services/authentication/pstore/src/test/resources/hibernate.cfg.xml @@ -0,0 +1,24 @@ + + + + + + + @DB_URL@ + @DB_DRIVER_CLASS@ + @DB_USER@ + @DB_PASSWORD@ + @DB_DIALECT@ + org.hibernate.transaction.JDBCTransactionFactory + thread + true + + diff --git a/services/authentication/pstore/src/test/resources/log4j.properties b/services/authentication/pstore/src/test/resources/log4j.properties new file mode 100644 index 000000000..5d288d87d --- /dev/null +++ b/services/authentication/pstore/src/test/resources/log4j.properties @@ -0,0 +1,23 @@ +log4j.rootLogger=debug, stdout, R + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout + +# Pattern to output the caller's file name and line number. +log4j.appender.stdout.layout.ConversionPattern=%d %-5p [%t] [%c:%L] %m%n + +log4j.appender.R=org.apache.log4j.RollingFileAppender +log4j.appender.R.File=target/test-client.log + +log4j.appender.R.MaxFileSize=100KB +# Keep one backup file +log4j.appender.R.MaxBackupIndex=1 + +log4j.appender.R.layout=org.apache.log4j.PatternLayout +log4j.appender.R.layout.ConversionPattern=%d %-5p [%t] [%c:%L] %m%n + +#packages +log4j.logger.org.collectionspace=DEBUG +log4j.logger.org.apache=INFO +log4j.logger.httpclient=INFO +log4j.logger.org.jboss.resteasy=WARN diff --git a/services/build.xml b/services/build.xml index b040be636..de51ae0c1 100644 --- a/services/build.xml +++ b/services/build.xml @@ -104,6 +104,12 @@ + + + + +