[jboss-cvs] jboss-seam/seam-gen ...
Gavin King
gavin.king at jboss.com
Fri Dec 15 04:17:40 EST 2006
User: gavin
Date: 06/12/15 04:17:40
Modified: seam-gen build.xml
Log:
mo' betta' handling of schemas and catalogs
Revision Changes Path
1.52 +33 -1 jboss-seam/seam-gen/build.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: build.xml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/build.xml,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- build.xml 15 Dec 2006 08:32:39 -0000 1.51
+++ build.xml 15 Dec 2006 09:17:40 -0000 1.52
@@ -58,11 +58,27 @@
<!-- filtersets and filesets -->
+ <condition property="schema.property" value="<property name="hibernate.default_schema" value="${hibernate.default_schema}"/>">
+ <isset property="hibernate.default_schema"/>
+ </condition>
+ <condition property="schema.property" value="">
+ <not><isset property="hibernate.default_schema"/></not>
+ </condition>
+
+ <condition property="catalog.property" value="<property name="hibernate.default_catalog" value="${hibernate.default_catalog}"/>">
+ <isset property="hibernate.default_catalog"/>
+ </condition>
+ <condition property="catalog.property" value="">
+ <not><isset property="hibernate.default_catalog"/></not>
+ </condition>
+
<filterset id="jdbc">
<filter token="jdbcUrl" value="${hibernate.connection.url}"/>
<filter token="driverClass" value="${hibernate.connection.driver_class}"/>
<filter token="username" value="${hibernate.connection.username}"/>
<filter token="password" value="${hibernate.connection.password}"/>
+ <filter token="catalogProperty" value="${catalog.property}"/>
+ <filter token="schemaProperty" value="${schema.property}"/>
</filterset>
<filterset id="project">
@@ -266,10 +282,18 @@
defaultvalue="${hibernate.connection.password}"/>
<property name="hibernate.default_schema" value=""/>
+ <condition property="hibernate.default_schema.new" value="">
+ <equals arg1="${database.type.new}" arg2="mysql"/>
+ </condition>
<input addproperty="hibernate.default_schema.new"
message="Enter the database schema name (it is OK to leave this blank) [${hibernate.default_schema}]"
defaultvalue="${hibernate.default_schema}"/>
+ <property name="hibernate.default_catalog" value=""/>
+ <input addproperty="hibernate.default_catalog.new"
+ message="Enter the database catalog name (it is OK to leave this blank) [${hibernate.default_catalog}]"
+ defaultvalue="${hibernate.default_catalog}"/>
+
<property name="database.exists" value="n"/>
<input addproperty="database.exists.new"
message="Are you working with tables that already exist in the database? [${database.exists}] "
@@ -289,6 +313,13 @@
<equals arg1="${hibernate.default_schema.new}" arg2=""/>
</condition>
+ <condition property="hibernate.default_catalog.key" value="hibernate.default_catalog">
+ <not><equals arg1="${hibernate.default_catalog.new}" arg2=""/></not>
+ </condition>
+ <condition property="hibernate.default_catalog.key" value="hibernate.default_catalog.null">
+ <equals arg1="${hibernate.default_catalog.new}" arg2=""/>
+ </condition>
+
<propertyfile file="build.properties">
<entry key="workspace.home" value="${workspace.home.new}"/>
<entry key="project.name" value="${project.name.new}"/>
@@ -308,6 +339,7 @@
<entry key="hibernate.connection.password" value="${hibernate.connection.password.new}"/>
<entry key="hibernate.connection.password" value="${hibernate.connection.password.new}"/>
<entry key="${hibernate.default_schema.key}" value="${hibernate.default_schema.new}"/>
+ <entry key="${hibernate.default_catalog.key}" value="${hibernate.default_catalog.new}"/>
</propertyfile>
<echo message="Installing JDBC driver jar to JBoss server"/>
More information about the jboss-cvs-commits
mailing list