Author: dan.j.allen
Date: 2009-04-06 22:29:03 -0400 (Mon, 06 Apr 2009)
New Revision: 10322
Modified:
trunk/seam-gen/build-scripts/build.properties
trunk/seam-gen/build.xml
Log:
Prompt for GlassFish home directory
Propogate GlassFish domain to project build file
Detect defaults such as JBoss AS home, GlassFish home, and workspace based on environment
Improve settings report
Print settings report at the end of setup
Clean up some sentences
Modified: trunk/seam-gen/build-scripts/build.properties
===================================================================
--- trunk/seam-gen/build-scripts/build.properties 2009-04-06 23:18:07 UTC (rev 10321)
+++ trunk/seam-gen/build-scripts/build.properties 2009-04-07 02:29:03 UTC (rev 10322)
@@ -1,6 +1,6 @@
jboss.home=@jbossHome@
jboss.domain=@jbossDomain@
glassfish.home=@glassfishHome@
-glassfish.domain=domain1
+glassfish.domain=@glassfishDomain@
# Uncomment to stop the build from deploying the datasource to GlassFish
#glassfish.datasource.useDefault=true
Modified: trunk/seam-gen/build.xml
===================================================================
--- trunk/seam-gen/build.xml 2009-04-06 23:18:07 UTC (rev 10321)
+++ trunk/seam-gen/build.xml 2009-04-07 02:29:03 UTC (rev 10322)
@@ -24,9 +24,20 @@
</condition>
<property file="${seam-gen.properties}"/>
- <!-- set property defaults for backwards compatibility -->
+
+ <property environment="env"/>
+ <!-- set property defaults (also maintains backwards compatibility) -->
+ <condition property="jboss.home" value="${env.JBOSS_HOME}"
else="C:/Program Files/jboss-4.2.3.GA">
+ <isset property="env.JBOSS_HOME"/>
+ </condition>
<property name="jboss.domain" value="default"/>
- <property name="glassfish.home" value=""/>
+ <condition property="glassfish.home"
value="${env.GLASSFISH_HOME}" else="C:/Program
Files/glassfish-v2.1">
+ <isset property="env.GLASSFISH_HOME"/>
+ </condition>
+ <property name="glassfish.domain" value="domain1"/>
+ <condition property="workspace.home" value="C:/Projects"
else="${user.home}/projects">
+ <os family="windows"/>
+ </condition>
<import file="${seam.dir}/build/common.build.xml"/>
@@ -172,6 +183,7 @@
<filter token="jbossHome" value="${jboss.home}"/>
<filter token="jbossDomain"
value="${jboss.domain}"/>
<filter token="glassfishHome"
value="${glassfish.home}"/>
+ <filter token="glassfishDomain"
value="${glassfish.domain}"/>
<filter token="iceHome" value="${icefaces.home}"/>
<filter token="hbm2ddl"
value="${hibernate.hbm2ddl.auto}"/>
<filter token="driverJar" value="${driver.file}"/>
@@ -208,23 +220,34 @@
<echo message="Welcome to seam-gen ${complete.version} :-)"/>
<echo message="Answer each question or hit ENTER to accept the default
(in brackets)"/>
<echo message=""/>
- <property name="old.workspace.home"
value="C:/Projects"/>
+ <property name="old.workspace.home"
value="${workspace.home}"/>
<input addproperty="workspace.home.new"
- message="Enter your Java project workspace (the directory that
contains your Seam projects) [${old.workspace.home}]"
+ message="Enter your project workspace (the directory that
contains your Seam projects) [${old.workspace.home}]"
defaultvalue="${old.workspace.home}"/>
<pathFixer property="workspace.home.new"/>
- <property name="old.jboss.home" value="C:/Program
Files/jboss-4.2.3.GA"/>
+ <property name="old.jboss.home"
value="${jboss.home}"/>
<input addproperty="jboss.home.new"
message="Enter your JBoss AS home directory
[${old.jboss.home}]"
defaultvalue="${old.jboss.home}"/>
<pathFixer property="jboss.home.new"/>
- <property name="old.jboss.domain" value="default"/>
+ <property name="old.jboss.domain"
value="${jboss.domain}"/>
<input addproperty="jboss.domain.new"
message="Enter your JBoss AS domain [${old.jboss.domain}]"
defaultvalue="${old.jboss.domain}"/>
+ <property name="old.glassfish.home"
value="${glassfish.home}"/>
+ <input addproperty="glassfish.home.new"
+ message="Enter your GlassFish V2 or V3 home directory (Ignore if
you aren't deploying to GlassFish) [${old.glassfish.home}]"
+ defaultvalue="${old.glassfish.home}"/>
+ <pathFixer property="glassfish.home.new"/>
+
+ <property name="old.glassfish.domain"
value="${glassfish.domain}"/>
+ <input addproperty="glassfish.domain.new"
+ message="Enter your GlassFish domain (Ignore if you aren't
deploying to GlassFish) [${old.glassfish.domain}]"
+ defaultvalue="${old.glassfish.domain}"/>
+
<property name="old.project.name" value="myproject"/>
<input addproperty="project.name.new"
message="Enter the project name [${old.project.name}]"
@@ -234,7 +257,7 @@
<property name="old.icefaces" value="n"/>
<input addproperty="icefaces.new"
- message="Do you want to use ICEfaces instead of RichFaces
[${old.icefaces}]"
+ message="Do you want to use ICEfaces instead of RichFaces?
[${old.icefaces}]"
validargs="y,n"
defaultvalue="${old.icefaces}"/>
@@ -244,7 +267,7 @@
<property name="old.icefaces.home" value=""/>
<input addproperty="icefaces.home.new"
- message="By default, seam-gen will download the recommended
ICEfaces. If you want to use a specific version of ICEfaces, enter the path to icefaces
here [${old.icefaces.home}]"
+ message="By default, seam-gen will download the recommended
ICEfaces. If you want to use a specific version of ICEfaces, enter the path to ICEfaces
[${old.icefaces.home}]"
defaultvalue="${old.icefaces.home}"/>
<condition property="richfaces.skin.new" value="">
@@ -257,9 +280,9 @@
validargs="blueSky,classic,deepMarine,DEFAULT,emeraldTown,japanCherry,ruby,wine"
defaultvalue="${old.richfaces.skin}"/>
- <property name="old.project.type" value="ear"/>
+ <property name="old.project.type" value="war"/>
<input addproperty="project.type.new"
- message="Is this project deployed as an EAR (with EJB components)
or a WAR (with no EJB support) [${old.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="${old.project.type}"/>
@@ -493,7 +516,7 @@
<equals arg1="${database.type.new}" arg2="mysql"/>
</condition>
<input addproperty="hibernate.default_schema.entered"
- message="Enter the database schema name (Enter - to clear value)
[${old.hibernate.default_schema}]"
+ message="Enter the database schema name (Enter '-' to
clear previous value) [${old.hibernate.default_schema}]"
defaultvalue="${old.hibernate.default_schema}"/>
<uppercaseProperty name="hibernate.default_schema.uppercase"
value="${hibernate.default_schema.entered}"/>
<condition property="hibernate.default_schema.new"
value="${hibernate.default_schema.uppercase}"
else="${hibernate.default_schema.entered}">
@@ -505,7 +528,7 @@
<equals arg1="${database.type.new}"
arg2="oracle"/>
</condition>
<input addproperty="hibernate.default_catalog.entered"
- message="Enter the database catalog name (Enter - to clear value)
[${old.hibernate.default_catalog}]"
+ message="Enter the database catalog name (Enter '-' to
clear previous value) [${old.hibernate.default_catalog}]"
defaultvalue="${old.hibernate.default_catalog}"/>
<property name="old.database.exists" value="n"/>
@@ -516,7 +539,7 @@
<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? [${old.database.drop}]"
+ message="Do you want to recreate the database tables and execute
import.sql each time you deploy? [${old.database.drop}]"
validargs="y,n"
defaultvalue="${old.database.drop}"/>
@@ -550,6 +573,8 @@
<entry key="project.type"
value="${project.type.new}"/>
<entry key="jboss.home"
value="${jboss.home.new}"/>
<entry key="jboss.domain"
value="${jboss.domain.new}"/>
+ <entry key="glassfish.home"
value="${glassfish.home.new}"/>
+ <entry key="glassfish.domain"
value="${glassfish.domain.new}"/>
<entry key="icefaces" value="${icefaces.new}"/>
<entry key="icefaces.home"
value="${icefaces.home.new}"/>
<entry key="action.package"
value="${action.package.new}"/>
@@ -586,6 +611,8 @@
</fileset>
</copy>
+ <antcall target="settings"/>
+ <echo/>
<echo message="Type '${seam.cmd} create-project' to create the
new project"/>
</target>
@@ -1650,15 +1677,19 @@
<target name="settings" depends="validate-project"
description="Print the settings">
- <echo message="Java project workspace: ${workspace.home}"/>
<echo message="JBoss AS home: ${jboss.home}"/>
- <echo message="IceFaces: ${icefaces}"/>
+ <echo message="GlassFish home: ${glassfish.home}"/>
<echo message="Project name: ${project.name}"/>
+ <echo message="Project location:
${workspace.home}/${project.name}"/>
<echo message="Project type: ${project.type}"/>
+ <echo message="IceFaces: ${icefaces}"/>
+ <echo message="Action package: ${action.package}"/>
+ <echo message="Model package: ${model.package}"/>
+ <echo message="Test package: ${test.package}"/>
+ <echo message="JDBC driver class:
${hibernate.connection.driver_class}"/>
+ <echo message="JDBC DataSource class:
${hibernate.connection.dataSource_class}"/>
<echo message="Hibernate dialect: ${hibernate.dialect}"/>
<echo message="JDBC URL: ${hibernate.connection.url}"/>
- <echo message="JDBC driver class:
${hibernate.connection.driver_class}"/>
- <echo message="JDBC DataSource class:
${hibernate.connection.dataSource_class}"/>
<echo message="Database username:
${hibernate.connection.username}"/>
<echo message="Database password:
${hibernate.connection.password}"/>
</target>