[jboss-cvs] jboss-seam/seam-gen ...
Norman Richards
norman.richards at jboss.com
Wed Jun 13 10:11:59 EDT 2007
User: nrichards
Date: 07/06/13 10:11:59
Modified: seam-gen build.xml
Log:
JBSEAM-1442
Revision Changes Path
1.84 +143 -136 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.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- build.xml 6 Jun 2007 16:58:14 -0000 1.83
+++ build.xml 13 Jun 2007 14:11:58 -0000 1.84
@@ -28,8 +28,9 @@
classname="org.jboss.seam.tool.FixPathTask"
classpath="../jboss-seam-gen.jar"/>
- <!-- properties -->
+
+ <target name="init-properties">
<!-- Give user a chance to override without editing this file or typing -D -->
<property file="${basedir}/build.properties" />
@@ -56,7 +57,6 @@
<condition property="project.war" value="true">
<equals arg1="${project.type}" arg2="war"/>
</condition>
-
<property name="project.home" value="${workspace.home}/${project.name}"/>
<!-- filtersets and filesets -->
@@ -91,6 +91,9 @@
<filter token="driverJar" value="${driver.file}"/>
</filterset>
+ </target>
+
+
<fileset id="view" dir="${basedir}/view">
<include name="home.xhtml"/>
<include name="error.xhtml"/>
@@ -132,47 +135,49 @@
<target name="setup"
description="Prompt for settings">
+ <property file="${basedir}/build.properties" prefix="old" />
+
<echo message="Welcome to seam-gen :-)"/>
- <property name="workspace.home" value="C:/Projects"/>
+ <property name="old.workspace.home" value="C:/Projects"/>
<input addproperty="workspace.home.new"
- message="Enter your Java project workspace (the directory that contains your Seam projects) [${workspace.home}]"
- defaultvalue="${workspace.home}"/>
+ message="Enter your Java project workspace (the directory that contains your Seam projects) [${old.workspace.home}]"
+ defaultvalue="${old.workspace.home}"/>
<pathFixer property="workspace.home.new" />
- <property name="jboss.home" value="C:/Program Files/jboss-4.0.5.GA"/>
+ <property name="old.jboss.home" value="C:/Program Files/jboss-4.2.0.GA"/>
<input addproperty="jboss.home.new"
- message="Enter your JBoss home directory [${jboss.home}]"
- defaultvalue="${jboss.home}"/>
+ message="Enter your JBoss home directory [${old.jboss.home}]"
+ defaultvalue="${old.jboss.home}"/>
<pathFixer property="jboss.home.new" />
- <property name="project.name" value="myproject"/>
+ <property name="old.project.name" value="myproject"/>
<input addproperty="project.name.new"
- message="Enter the project name [${project.name}]"
- defaultvalue="${project.name}"/>
+ message="Enter the project name [${old.project.name}]"
+ defaultvalue="${old.project.name}"/>
- <property name="project.type" value="ear"/>
+ <property name="old.project.type" value="ear"/>
<input addproperty="project.type.new"
- message="Is this project deployed as an EAR (with EJB components) or a WAR (with no EJB support) [${project.type}] "
+ message="Is this project deployed as an EAR (with EJB components) or a WAR (with no EJB support) [${old.project.type}] "
validargs="ear,war,"
- defaultvalue="${project.type}"/>
+ defaultvalue="${old.project.type}"/>
- <property name="action.package" value="com.mydomain.${project.name.new}"/>
+ <property name="old.action.package" value="com.mydomain.${project.name.new}"/>
<input addproperty="action.package.new"
- message="Enter the Java package name for your session beans [${action.package}]"
- defaultvalue="${action.package}"/>
+ message="Enter the Java package name for your session beans [${old.action.package}]"
+ defaultvalue="${old.action.package}"/>
- <property name="model.package" value="${action.package.new}"/>
+ <property name="old.model.package" value="${action.package.new}"/>
<input addproperty="model.package.new"
- message="Enter the Java package name for your entity beans [${model.package}]"
- defaultvalue="${model.package}"/>
+ message="Enter the Java package name for your entity beans [${old.model.package}]"
+ defaultvalue="${old.model.package}"/>
- <property name="test.package" value="${action.package.new}.test"/>
+ <property name="old.test.package" value="${action.package.new}.test"/>
<input addproperty="test.package.new"
- message="Enter the Java package name for your test cases [${test.package}]"
- defaultvalue="${test.package}"/>
+ message="Enter the Java package name for your test cases [${old.test.package}]"
+ defaultvalue="${old.test.package}"/>
- <condition property="database.type.default" value="${database.type}">
- <isset property="database.type"/>
+ <condition property="database.type.default" value="${old.database.type}">
+ <isset property="old.database.type"/>
</condition>
<property name="database.type.default" value="hsql"/>
<input addproperty="database.type.new"
@@ -182,14 +187,14 @@
<!-- if the database type did not change, default to the previous values -->
- <condition property="hibernate.dialect.default" value="${hibernate.dialect}">
- <equals arg1="${database.type}" arg2="${database.type.new}"/>
+ <condition property="hibernate.dialect.default" value="${old.hibernate.dialect}">
+ <equals arg1="${old.database.type}" arg2="${database.type.new}"/>
</condition>
- <condition property="hibernate.connection.url.default" value="${hibernate.connection.url}">
- <equals arg1="${database.type}" arg2="${database.type.new}"/>
+ <condition property="hibernate.connection.url.default" value="${old.hibernate.connection.url}">
+ <equals arg1="${old.database.type}" arg2="${database.type.new}"/>
</condition>
- <condition property="hibernate.connection.driver_class.default" value="${hibernate.connection.driver_class}">
- <equals arg1="${database.type}" arg2="${database.type.new}"/>
+ <condition property="hibernate.connection.driver_class.default" value="${old.hibernate.connection.driver_class}">
+ <equals arg1="${old.database.type}" arg2="${database.type.new}"/>
</condition>
<!-- otherwise default to the defaults for the database type -->
@@ -279,10 +284,10 @@
message="Enter the Hibernate dialect for your database [${hibernate.dialect.default}]"
defaultvalue="${hibernate.dialect.default}"/>
- <property name="driver.jar" value="lib/hsqldb.jar"/>
+ <property name="old.driver.jar" value="lib/hsqldb.jar"/>
<input addproperty="driver.jar.new"
- message="Enter the filesystem path to the JDBC driver jar [${driver.jar}]"
- defaultvalue="${driver.jar}"/>
+ message="Enter the filesystem path to the JDBC driver jar [${old.driver.jar}]"
+ defaultvalue="${old.driver.jar}"/>
<input addproperty="hibernate.connection.driver_class.new"
message="Enter JDBC driver class for your database [${hibernate.connection.driver_class.default}]"
@@ -292,40 +297,40 @@
message="Enter the JDBC URL for your database [${hibernate.connection.url.default}]"
defaultvalue="${hibernate.connection.url.default}"/>
- <property name="hibernate.connection.username" value="sa"/>
+ <property name="old.hibernate.connection.username" value="sa"/>
<input addproperty="hibernate.connection.username.new"
- message="Enter database username [${hibernate.connection.username}]"
- defaultvalue="${hibernate.connection.username}"/>
+ message="Enter database username [${old.hibernate.connection.username}]"
+ defaultvalue="${old.hibernate.connection.username}"/>
- <property name="hibernate.connection.password" value=""/>
+ <property name="old.hibernate.connection.password" value=""/>
<input addproperty="hibernate.connection.password.new"
- message="Enter database password [${hibernate.connection.password}]"
- defaultvalue="${hibernate.connection.password}"/>
+ message="Enter database password [${old.hibernate.connection.password}]"
+ defaultvalue="${old.hibernate.connection.password}"/>
- <property name="hibernate.default_schema" value=""/>
+ <property name="old.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}"/>
+ message="Enter the database schema name (it is OK to leave this blank) [${old.hibernate.default_schema}]"
+ defaultvalue="${old.hibernate.default_schema}"/>
- <property name="hibernate.default_catalog" value=""/>
+ <property name="old.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}"/>
+ message="Enter the database catalog name (it is OK to leave this blank) [${old.hibernate.default_catalog}]"
+ defaultvalue="${old.hibernate.default_catalog}"/>
- <property name="database.exists" value="n"/>
+ <property name="old.database.exists" value="n"/>
<input addproperty="database.exists.new"
- message="Are you working with tables that already exist in the database? [${database.exists}] "
+ message="Are you working with tables that already exist in the database? [${old.database.exists}] "
validargs="y,n,"
- defaultvalue="${database.exists}"/>
+ defaultvalue="${old.database.exists}"/>
- <property name="database.drop" value="n"/>
+ <property name="old.database.drop" value="n"/>
<input addproperty="database.drop.new"
- message="Do you want to drop and recreate the database tables and data in import.sql each time you deploy? [${database.drop}] "
+ message="Do you want to drop and recreate the database tables and data in import.sql each time you deploy? [${old.database.drop}] "
validargs="y,n,"
- defaultvalue="${database.drop}"/>
+ defaultvalue="${old.database.drop}"/>
<condition property="hibernate.default_schema.key" value="hibernate.default_schema">
<not><equals arg1="${hibernate.default_schema.new}" arg2=""/></not>
@@ -628,7 +633,7 @@
</target>
- <target name="validate-project" depends="validate-workspace">
+ <target name="validate-project" depends="init-properties, validate-workspace">
<fail message="No project name specified (run 'seam new-project' first)">
<condition>
<or>
@@ -813,6 +818,8 @@
</classpath>
</taskdef>
+<echo>project=${project.home}</echo>
+<echo>model=${model.package}</echo>
<hibernate templatepath=".">
<jdbcconfiguration propertyfile="build.properties"
packagename="${model.package}"
@@ -927,7 +934,7 @@
<delete file="build.properties"/>
</target>
- <target name="settings"
+ <target name="settings" depends="init-properties"
description="Print the settings">
<echo message="Java project workspace: ${workspace.home}"/>
<echo message="JBoss home: ${jboss.home}"/>
More information about the jboss-cvs-commits
mailing list