[jboss-cvs] jboss-seam/seam-gen ...
Shane Bryzak
sbryzak at redhat.com
Wed Jan 9 22:33:50 EST 2008
User: sbryzak2
Date: 08/01/09 22:33:50
Modified: seam-gen build.xml
Log:
added identity management to seam-gen
Revision Changes Path
1.132 +1281 -1213jboss-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.131
retrieving revision 1.132
diff -u -b -r1.131 -r1.132
--- build.xml 9 Jan 2008 13:57:34 -0000 1.131
+++ build.xml 10 Jan 2008 03:33:50 -0000 1.132
@@ -52,21 +52,26 @@
<equals arg1="${database.drop}" arg2="n"/>
</and>
</condition>
+
<condition property="hibernate.hbm2ddl.auto" value="validate">
<and>
<equals arg1="${database.exists}" arg2="y"/>
<equals arg1="${database.drop}" arg2="n"/>
</and>
</condition>
+
<condition property="hibernate.hbm2ddl.auto" value="create-drop">
<equals arg1="${database.drop}" arg2="y"/>
</condition>
+
<condition property="project.war" value="true">
<equals arg1="${project.type}" arg2="war"/>
</condition>
+
<condition property="project.ear" value="true">
<equals arg1="${project.type}" arg2="ear"/>
</condition>
+
<property name="project.home" value="${workspace.home}/${project.name}"/>
<!-- filtersets and filesets -->
@@ -74,6 +79,7 @@
<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>
@@ -81,6 +87,7 @@
<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>
@@ -166,15 +173,19 @@
<input addproperty="workspace.home.new"
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="old.jboss.home" value="C:/Program Files/jboss-4.2.2.GA"/>
+
<input addproperty="jboss.home.new"
message="Enter your JBoss home directory [${old.jboss.home}]"
defaultvalue="${old.jboss.home}"/>
+
<pathFixer property="jboss.home.new" />
<property name="old.project.name" value="myproject"/>
+
<input addproperty="project.name.new"
message="Enter the project name [${old.project.name}]"
defaultvalue="${old.project.name}"/>
@@ -230,6 +241,7 @@
<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"
message="What kind of database are you using? [${database.type.default}] "
@@ -241,9 +253,11 @@
<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="${old.hibernate.connection.url}">
<equals arg1="${old.database.type}" arg2="${database.type.new}"/>
</condition>
+
<condition property="hibernate.connection.driver_class.default" value="${old.hibernate.connection.driver_class}">
<equals arg1="${old.database.type}" arg2="${database.type.new}"/>
</condition>
@@ -253,27 +267,35 @@
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.H2Dialect">
<equals arg1="${database.type.new}" arg2="h2"/>
</condition>
+
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.HSQLDialect">
<equals arg1="${database.type.new}" arg2="hsql"/>
</condition>
+
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.MySQLDialect">
<equals arg1="${database.type.new}" arg2="mysql"/>
</condition>
+
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.OracleDialect">
<equals arg1="${database.type.new}" arg2="oracle"/>
</condition>
+
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.PostgreSQLDialect">
<equals arg1="${database.type.new}" arg2="postgres"/>
</condition>
+
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.SQLServerDialect">
<equals arg1="${database.type.new}" arg2="mssql"/>
</condition>
+
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.DB2Dialect">
<equals arg1="${database.type.new}" arg2="db2"/>
</condition>
+
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.SybaseDialect">
<equals arg1="${database.type.new}" arg2="sybase"/>
</condition>
+
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.PostgreSQLDialect">
<equals arg1="${database.type.new}" arg2="enterprisedb"/>
</condition>
@@ -301,27 +323,35 @@
<condition property="hibernate.connection.driver_class.default" value="org.h2.Driver">
<equals arg1="${database.type.new}" arg2="h2"/>
</condition>
+
<condition property="hibernate.connection.driver_class.default" value="org.hsqldb.jdbcDriver">
<equals arg1="${database.type.new}" arg2="hsql"/>
</condition>
+
<condition property="hibernate.connection.driver_class.default" value="com.mysql.jdbc.Driver">
<equals arg1="${database.type.new}" arg2="mysql"/>
</condition>
+
<condition property="hibernate.connection.driver_class.default" value="oracle.jdbc.driver.OracleDriver">
<equals arg1="${database.type.new}" arg2="oracle"/>
</condition>
+
<condition property="hibernate.connection.driver_class.default" value="org.postgresql.Driver">
<equals arg1="${database.type.new}" arg2="postgres"/>
</condition>
+
<condition property="hibernate.connection.driver_class.default" value="com.microsoft.sqlserver.jdbc.SQLServerDriver">
<equals arg1="${database.type.new}" arg2="mssql"/>
</condition>
+
<condition property="hibernate.connection.driver_class.default" value="COM.ibm.db2.jdbc.app.DB2Driver">
<equals arg1="${database.type.new}" arg2="db2"/>
</condition>
+
<condition property="hibernate.connection.driver_class.default" value="com.sybase.jdbc2.jdbc.SybDriver">
<equals arg1="${database.type.new}" arg2="sybase"/>
</condition>
+
<condition property="hibernate.connection.driver_class.default" value="com.edb.Driver">
<equals arg1="${database.type.new}" arg2="enterprisedb"/>
</condition>
@@ -329,27 +359,35 @@
<condition property="hibernate.connection.url.default" value="jdbc:h2:.">
<equals arg1="${database.type.new}" arg2="h2"/>
</condition>
+
<condition property="hibernate.connection.url.default" value="jdbc:hsqldb:.">
<equals arg1="${database.type.new}" arg2="hsql"/>
</condition>
+
<condition property="hibernate.connection.url.default" value="jdbc:mysql:///test">
<equals arg1="${database.type.new}" arg2="mysql"/>
</condition>
+
<condition property="hibernate.connection.url.default" value="jdbc:oracle:thin:@localhost:1521:test">
<equals arg1="${database.type.new}" arg2="oracle"/>
</condition>
+
<condition property="hibernate.connection.url.default" value="jdbc:postgresql:template1">
<equals arg1="${database.type.new}" arg2="postgres"/>
</condition>
+
<condition property="hibernate.connection.url.default" value="jdbc:sqlserver://localhost">
<equals arg1="${database.type.new}" arg2="mssql"/>
</condition>
+
<condition property="hibernate.connection.url.default" value="jdbc:db2:test">
<equals arg1="${database.type.new}" arg2="db2"/>
</condition>
+
<condition property="hibernate.connection.url.default" value="jdbc:sybase:Tds:localhost:5000/test">
<equals arg1="${database.type.new}" arg2="sybase"/>
</condition>
+
<condition property="hibernate.connection.url.default" value="jdbc:edb://localhost:5444/edb">
<equals arg1="${database.type.new}" arg2="enterprisedb"/>
</condition>
@@ -391,6 +429,7 @@
<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) [${old.hibernate.default_schema}]"
defaultvalue="${old.hibernate.default_schema}"/>
@@ -415,6 +454,7 @@
<condition property="hibernate.default_schema.key" value="hibernate.default_schema">
<not><equals arg1="${hibernate.default_schema.new}" arg2=""/></not>
</condition>
+
<condition property="hibernate.default_schema.key" value="hibernate.default_schema.null">
<equals arg1="${hibernate.default_schema.new}" arg2=""/>
</condition>
@@ -422,6 +462,7 @@
<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>
@@ -436,6 +477,7 @@
-->
<delete file="build.properties"/>
+
<propertyfile file="build.properties" comment="Generated by seam setup">
<entry key="workspace.home" value="${workspace.home.new}"/>
<entry key="project.name" value="${project.name.new}"/>
@@ -485,6 +527,7 @@
<include name="util/**"/>
</fileset>
</copy>
+
<copy todir="icefaces-staging" overwrite="true">
<fileset dir="icefaces">
<include name="build-scripts/**"/>
@@ -496,7 +539,6 @@
</target>
<target name="action-input" depends="init">
-
<input addproperty="component.name" message="Enter the Seam component name"/>
<uppercaseProperty name="interface.name.default" value="${component.name}"/>
@@ -528,7 +570,6 @@
</target>
<target name="entity-input" depends="init">
-
<input addproperty="entity.name" message="Enter the entity class name"/>
<lowercaseProperty name="component.name" value="${entity.name}"/>
@@ -547,7 +588,6 @@
<property name="list.file" value="${project.home}/src/${action.dir}/${entity.name}List.java"/>
<property name="page.file" value="${project.home}/view/${page.name}.xhtml"/>
<property name="masterPage.file" value="${project.home}/view/${masterPage.name}.xhtml"/>
-
</target>
<target name="query-input">
@@ -562,7 +602,6 @@
The entity ${entity.name} was not found. It was expected to be in ${entity.file}.
</fail>
-
<lowercaseProperty name="component.name.default" value="${entity.name}Query" />
<input addproperty="component.name"
message="Enter the Seam query component name [${component.name.default}]"
@@ -588,10 +627,8 @@
<property name="page.file" value="${project.home}/view/${page.name}.xhtml"/>
</target>
-
-
<target name="copy-lib" depends="copyseam, copyseamdependencies, copyjbossembedded, copy-icefaces-home, copy-icefaces-maven">
- <echo message="Copying Seam and depdencies to the ${project.home}/lib directory..." />
+ <echo message="Copying Seam and dependencies to the ${project.home}/lib directory..." />
<copy todir="${project.home}/lib" overwrite="true">
<fileset dir="../lib">
@@ -606,6 +643,7 @@
</copy>
<echo message="Copying JBoss Embedded configuration to the ${project.home}/bootstrap directory..." />
+
<copy todir="${project.home}/bootstrap" overwrite="true">
<fileset dir="../bootstrap" />
</copy>
@@ -648,11 +686,14 @@
<copy tofile="${project.home}/resources/WEB-INF/components.xml"
file="${base.dir}/resources/WEB-INF/components-war.xml">
<filterset refid="project"/>
+ <filterset refid="filters"/>
</copy>
+
<copy tofile="${project.home}/build.xml"
file="${base.dir}/build-scripts/build-war.xml">
<filterset refid="project"/>
</copy>
+
<copy todir="${project.home}/resources">
<fileset dir="${base.dir}/resources/">
<include name="META-INF/persistence*-war.xml"/>
@@ -661,24 +702,29 @@
<filterset refid="project"/>
<filterset refid="jdbc"/>
</copy>
+
<copy todir="${project.home}/src/action" file="${base.dir}/resources/seam.properties"/>
<copy todir="${project.home}/src/model" file="${base.dir}/resources/seam.properties"/>
</target>
- <target name="file-copy-ear" unless="project.war">
+ <target name="file-copy-ear" unless="project.war" depends="setup-filters">
<echo message="Copying resources needed for EAR deployment to the ${project.home}/resources directory..." />
<copy tofile="${project.home}/resources/WEB-INF/components.xml"
file="${base.dir}/resources/WEB-INF/components.xml">
<filterset refid="project"/>
+ <filterset refid="filters"/>
</copy>
+
<copy tofile="${project.home}/build.xml"
file="${base.dir}/build-scripts/build.xml">
<filterset refid="project"/>
</copy>
+
<copy todir="${project.home}" overwrite="true">
<fileset file="../validate.xml"/>
</copy>
+
<copy todir="${project.home}/resources">
<fileset dir="${base.dir}/resources/">
<include name="META-INF/application.xml"/>
@@ -693,7 +739,6 @@
</target>
<target name="file-copy" depends="file-copy-war,file-copy-ear,setup-filters">
-
<copy todir="${project.home}/resources">
<fileset dir="${base.dir}/resources/">
<exclude name="datasource-ds.xml"/>
@@ -775,12 +820,15 @@
<include name="login.xhtml"/>
<include name="login.page.xml"/>
<include name="index.html"/>
+ <include name="usermanager.xhtml"/>
+ <include name="userdetail.xhtml"/>
<include name="layout/*"/>
<include name="stylesheet/*"/>
<exclude name="**/*.ftl"/>
</fileset>
<filterset refid="project"/>
</copy>
+
<!-- Images have to be copied without filter -->
<copy todir="${project.home}/view">
<fileset id="view" dir="${base.dir}/view">
@@ -791,6 +839,8 @@
<copy todir="${project.home}/src/${action.dir}">
<fileset dir="${base.dir}/src/">
<include name="Authenticator.java"/>
+ <include name="UserSearch.java"/>
+ <include name="UserAction.java"/>
<include name="Timer*.java" if="icefaces.property"/>
</fileset>
<filterset refid="filters"/>
@@ -808,9 +858,17 @@
<mkdir dir="${project.home}/src/action"/>
<mkdir dir="${project.home}/src/test"/>
+ <copy todir="${project.home}/src/${model.dir}">
+ <fileset dir="${base.dir}/src/">
+ <include name="UserAccount.java"/>
+ </fileset>
+ <filterset refid="filters"/>
+ </copy>
+
<copy todir="${project.home}/src/test" file="${base.dir}/test/readme.txt" />
<mkdir dir="${project.home}/nbproject"/>
+
<copy todir="${project.home}/nbproject">
<fileset dir="${base.dir}/nbproject" />
<filterset refid="project"/>
@@ -827,6 +885,7 @@
</or>
</condition>
</fail>
+
<fail message="Invalid package combination. If the default package is used, then all classes (action, model, and test) must be in the default package">
<condition>
<and>
@@ -858,6 +917,7 @@
<!-- Do not remove new-project, netbeans depends on it -->
<target name="new-project" depends="create-project" />
+
<target name="create-project" depends="validate-project,icefaces-staging-copy,copy-lib,file-copy"
description="Create a new project">
<echo message="A new Seam project named '${project.name}' was created in the ${workspace.home} directory"/>
@@ -880,8 +940,10 @@
<target name="new-action" depends="new-action-ear,new-action-war"
description="Create a new action"/>
+
<target name="new-form" depends="new-form-ear,new-form-war"
description="Create a new form action"/>
+
<target name="new-conversation" depends="new-conversation-ear,new-conversation-war"
description="Create a new conversation controller"/>
@@ -1029,6 +1091,7 @@
<!-- Do not remove generate-entities, netbeans depends on it -->
<target name="generate-entities" depends="generate" />
+
<target name="generate" depends="validate-project,generate-model,generate-ui"
description="Reverse engineer entities from the database">
</target>
@@ -1054,6 +1117,7 @@
<pathelement path="${driver.jar}"/>
<pathelement path="../lib/jboss-seam-gen.jar"/>
</path>
+
<taskdef name="hibernate" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="htools.classpath"/>
</target>
@@ -1061,6 +1125,7 @@
<echo message="Reverse engineering database using JDBC driver ${driver.jar}"/>
<echo>project=${project.home}</echo>
<echo>model=${model.package}</echo>
+
<hibernate templatepath="${base.dir}">
<jdbcconfiguration propertyfile="build.properties"
packagename="${model.package}"
@@ -1090,14 +1155,16 @@
<condition property="project.jar.target" value="jar">
<equals arg1="${project.type}" arg2="ear" />
</condition>
+
<condition property="project.jar.target" value="war">
<equals arg1="${project.type}" arg2="war" />
</condition>
<ant antfile="${project.home}/build.xml" target="${project.jar.target}" inheritall="false"/>
- <hibernate templatepath="${base.dir}">
+ <hibernate templatepath="${base.dir}">
<jpaconfiguration persistenceunit="${project.name}" />
+
<classpath>
<dirset dir="${project.home}/exploded-archives">
<include name="*.war/WEB-INF/classes" if="project.war" />
@@ -1105,6 +1172,7 @@
<include name="*.jar" if="project.ear" />
</dirset>
</classpath>
+
<property key="hibernatetool.util.toolclass" value="org.jboss.seam.tool.Util"/>
<hbmtemplate filepattern="{class-name}List.xhtml"
template="view/list.xhtml.ftl"
More information about the jboss-cvs-commits
mailing list