SEAM - using seam-gen for a multi-user (server) environment on multiple projects per user

4 views
Skip to first unread message

IntelliBitz Technologies

unread,
Mar 30, 2007, 12:13:36 PM3/30/07
to IntelliBitz Technologies
SEAM - using seam-gen for a multi-user (server) environment on
multiple projects per user
by IntelliBitz Technologies
http://www.intellibitz.com


====================================================================
Objective:
====================================================================

A single SEAM installation on a server environment.
All Users get their own seam-gen 'build.properties' file per project.
The build properties file are stored in the users home directory
instead of seam-gen directory.
Multiple seam projects per user supported. This is because every
build.properties per project is preserved in users home directory.
User can switch projects as required in command line using 'seam -
Dproject.name=[PROJECT]' without losing previous configuration.


====================================================================
Pre-requisites:
====================================================================

a) Download and Install Seam and its dependencies.
(In our case we put it in '/usr/local/share/jboss-seam-1.2.0.PATCH1'
folder)

b) cd /usr/local/share/jboss-seam-1.2.0.PATCH1/seam-gen
(changing to the seam-gen folder to do some hack)

c) cp build.xml build.xml.org
(copy the orginal file for a backup)


====================================================================
STEP 1:
====================================================================

Edit 'build.xml' and copy and paste our new build.xml which supports
multi user multi project seam-gen tool capabilities.
(Dont worry, the hack is only a few lines and we are not changing any
of the seam-gen functionalities here)


==========
build.xml
==========

<?xml version="1.0"?>

<project name="seam-gen" default="help" basedir=".">

<!-- taskdefs -->

<taskdef name="packageDirectory"
classname="org.jboss.seam.tool.PackageDirectoryTask"
classpath="../jboss-seam-gen.jar"/>

<taskdef name="pathFilename"
classname="org.jboss.seam.tool.PathFilenameTask"
classpath="../jboss-seam-gen.jar"/>

<taskdef name="lowercaseProperty"
classname="org.jboss.seam.tool.LowercasePropertyTask"
classpath="../jboss-seam-gen.jar"/>

<taskdef name="uppercaseProperty"
classname="org.jboss.seam.tool.UppercasePropertyTask"
classpath="../jboss-seam-gen.jar"/>

<taskdef name="print"
classname="org.jboss.seam.tool.PrintTask"
classpath="../jboss-seam-gen.jar"/>

<taskdef name="pathFixer"
classname="org.jboss.seam.tool.FixPathTask"
classpath="../jboss-seam-gen.jar"/>

<!-- properties -->

<!--
BEGIN MULTI USER MULTI PROJECT HACK
Muthu Ramadoss
IntelliBitz Technologies, Chennai
Mar 30, 2007.
-->
<property file="${user.home}/build-intellibitz.properties"/>
<basename property="workspace.home.base" file="${workspace.home}"/
>
<!-- INCLUDE USER SPECIFIC PROJECT LOCATION PROPERTIES FIRST -->
<property file="${user.home}/build-${workspace.home.base}-$
{project.name}-${project.type}.properties"/>
<!--
END MULTI USER MULTI PROJECT HACK
Muthu Ramadoss
IntelliBitz Technologies, Chennai
Mar 30, 2007.
-->

<packageDirectory property="action.dir" package="$
{action.package}"/>
<packageDirectory property="model.dir" package="${model.package}"/
>
<packageDirectory property="test.dir" package="${test.package}"/>
<pathFilename property="driver.file" path="${driver.jar}"/>

<condition property="hibernate.hbm2ddl.auto" value="update">
<and>
<equals arg1="${database.exists}" arg2="n"/>
<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>

<property name="project.home" value="${workspace.home}/$
{project.name}"/>

<!-- filtersets and filesets -->

<condition property="schema.property"
value="&#xa; &lt;property
name=&quot;hibernate.default_schema&quot; value=&quot;$
{hibernate.default_schema}&quot;/&gt;">
<isset property="hibernate.default_schema"/>
</condition>
<condition property="schema.property" value="">
<not>
<isset property="hibernate.default_schema"/>
</not>
</condition>

<condition property="catalog.property"
value="&#xa; &lt;property
name=&quot;hibernate.default_catalog&quot; value=&quot;$
{hibernate.default_catalog}&quot;/&gt;">
<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">
<filter token="projectName" value="${project.name}"/>
<filter token="jbossHome" value="${jboss.home}"/>
<filter token="hbm2ddl" value="${hibernate.hbm2ddl.auto}"/>
<filter token="driverJar" value="${driver.file}"/>
</filterset>

<fileset id="view" dir="${basedir}/view">
<include name="home.xhtml"/>
<include name="error.xhtml"/>
<include name="login.xhtml"/>
<include name="login.page.xml"/>
<include name="index.html"/>
<include name="layout/*"/>
<include name="stylesheet/*"/>
<include name="img/*"/>
<exclude name="**/*.ftl"/>
</fileset>

<fileset id="seam" dir="../">
<include name="jboss-seam*.jar"/>
<exclude name="jboss-seam-gen.jar"/>
</fileset>

<!-- targets -->

<target name="setup-filters">

<filterset id="filters">
<filter token="interfaceName" value="${interface.name}"/>
<filter token="beanName" value="${bean.name}"/>
<filter token="entityName" value="${entity.name}"/>
<filter token="methodName" value="${method.name}"/>
<filter token="componentName" value="${component.name}"/>
<filter token="pageName" value="${page.name}"/>
<filter token="masterPageName" value="${masterPage.name}"/
>
<filter token="actionPackage" value="${action.package}"/>
<filter token="modelPackage" value="${model.package}"/>
<filter token="testPackage" value="${test.package}"/>
<filter token="listName" value="${component.name}List"/>
<filter token="homeName" value="${component.name}Home"/>
<filter token="query" value="${query.text}"/>
</filterset>

</target>

<target name="setup"
description="Prompt for settings">
<echo message="Welcome to seam-gen :-)"/>
<property name="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}"/>
<pathFixer property="workspace.home.new"/>

<property name="jboss.home" value="C:/Program Files/
jboss-4.0.5.GA"/>
<input addproperty="jboss.home.new"
message="Enter your JBoss home directory [$
{jboss.home}]"
defaultvalue="${jboss.home}"/>
<pathFixer property="jboss.home.new"/>

<property name="project.name" value="myproject"/>
<input addproperty="project.name.new"
message="Enter the project name [${project.name}]"
defaultvalue="${project.name}"/>

<property name="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}] "
validargs="ear,war,"
defaultvalue="${project.type}"/>

<property name="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}"/>

<property name="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}"/>

<property name="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}"/>

<condition property="database.type.default" value="$
{database.type}">
<isset property="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}] "

validargs="hsql,mysql,oracle,postgres,mssql,db2,sybase,enterprisedb,"
defaultvalue="${database.type.default}"/>

<!-- 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>
<condition property="hibernate.connection.url.default" value="$
{hibernate.connection.url}">
<equals arg1="${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>

<!-- otherwise default to the defaults for the database type --
>

<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>

<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>

<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>

<!-- finally, default them to HSQL -->

<property name="hibernate.dialect.default"
value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.connection.driver_class.default"
value="org.hsqldb.jdbcDriver"/>
<property name="hibernate.connection.url.default"
value="jdbc:hsqldb:."/>

<input addproperty="hibernate.dialect.new"
message="Enter the Hibernate dialect for your database
[${hibernate.dialect.default}]"
defaultvalue="${hibernate.dialect.default}"/>

<property name="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}"/>

<input addproperty="hibernate.connection.driver_class.new"
message="Enter JDBC driver class for your database [$
{hibernate.connection.driver_class.default}]"
defaultvalue="$
{hibernate.connection.driver_class.default}"/>

<input addproperty="hibernate.connection.url.new"
message="Enter the JDBC URL for your database [$
{hibernate.connection.url.default}]"
defaultvalue="${hibernate.connection.url.default}"/>

<property name="hibernate.connection.username" value="sa"/>
<input addproperty="hibernate.connection.username.new"
message="Enter database username [$
{hibernate.connection.username}]"
defaultvalue="${hibernate.connection.username}"/>

<property name="hibernate.connection.password" value=""/>
<input addproperty="hibernate.connection.password.new"
message="Enter database password [$
{hibernate.connection.password}]"
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}] "
validargs="y,n,"
defaultvalue="${database.exists}"/>

<property name="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}]
"
validargs="y,n,"
defaultvalue="${database.drop}"/>

<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>

<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>

<!--
BEGIN MULTI USER MULTI PROJECT HACK
Muthu Ramadoss
IntelliBitz Technologies, Chennai
Mar 30, 2007.
-->
<propertyfile file="${user.home}/build-
intellibitz.properties">
<entry key="workspace.home" value="${workspace.home.new}"/
>
<entry key="project.name" value="${project.name.new}"/>
<entry key="project.type" value="${project.type.new}"/>
</propertyfile>


<basename property="workspace.home.new.base" file="$
{workspace.home.new}"/>

<propertyfile file="${user.home}/build-$
{workspace.home.new.base}-${project.name.new}-$
{project.type.new}.properties">
<!--
END MULTI USER MULTI PROJECT HACK
Muthu Ramadoss
IntelliBitz Technologies, Chennai
Mar 30, 2007.
-->
<entry key="workspace.home" value="${workspace.home.new}"/
>
<entry key="project.name" value="${project.name.new}"/>
<entry key="project.type" value="${project.type.new}"/>
<entry key="jboss.home" value="${jboss.home.new}"/>
<entry key="action.package" value="${action.package.new}"/
>
<entry key="model.package" value="${model.package.new}"/>
<entry key="test.package" value="${test.package.new}"/>
<entry key="database.type" value="${database.type.new}"/>
<entry key="database.exists" value="$
{database.exists.new}"/>
<entry key="database.drop" value="${database.drop.new}"/>
<entry key="driver.jar" value="${driver.jar.new}"/>
<entry key="hibernate.dialect" value="$
{hibernate.dialect.new}"/>
<entry key="hibernate.connection.driver_class" value="$
{hibernate.connection.driver_class.new}"/>
<entry key="hibernate.connection.url" value="$
{hibernate.connection.url.new}"/>
<entry key="hibernate.connection.username" value="$
{hibernate.connection.username.new}"/>
<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"/>
<copy file="${driver.jar.new}" todir="${jboss.home.new}/server/
default/lib"/>

<echo message="Type 'seam new-project' to create the new
project"/>
</target>

<target name="action-input">

<input addproperty="component.name" message="Enter the Seam
component name"/>

<uppercaseProperty name="interface.name.default" value="$
{component.name}"/>
<input message="Enter the local interface name [$
{interface.name.default}]"
addproperty="interface.name"
defaultvalue="${interface.name.default}"/>

<uppercaseProperty name="bean.name.default" value="$
{component.name}Bean"/>
<input message="Enter the bean class name [$
{bean.name.default}]"
addproperty="bean.name"
defaultvalue="${bean.name.default}"/>

<lowercaseProperty name="method.name.default" value="$
{component.name}"/>
<input message="Enter the action method name [$
{method.name.default}]"
addproperty="method.name"
defaultvalue="${method.name.default}"/>

<lowercaseProperty name="page.name.default" value="$
{component.name}"/>
<input message="Enter the page name [${page.name.default}]"
addproperty="page.name"
defaultvalue="${page.name.default}"/>

<property name="bean.file" value="${project.home}/src/$
{action.dir}/${bean.name}.java"/>
<property name="interface.file" value="${project.home}/src/$
{action.dir}/${interface.name}.java"/>
<property name="page.file" value="${project.home}/view/$
{page.name}.xhtml"/>
<property name="test.file" value="${project.home}/test/$
{test.dir}/${interface.name}Test.java"/>
<property name="testng.file" value="${project.home}/test/$
{test.dir}/${interface.name}Test.xml"/>

</target>

<target name="entity-input">

<input addproperty="entity.name" message="Enter the entity
class name"/>
<lowercaseProperty name="component.name" value="$
{entity.name}"/>

<lowercaseProperty name="masterPage.name.default" value="$
{component.name}List"/>
<input message="Enter the master page name [$
{masterPage.name.default}]"
addproperty="masterPage.name"
defaultvalue="${masterPage.name.default}"/>

<lowercaseProperty name="page.name.default" value="$
{component.name}"/>
<input message="Enter the detail page name [$
{page.name.default}]"
addproperty="page.name"
defaultvalue="${page.name.default}"/>

<property name="entity.file" value="${project.home}/src/$
{model.dir}/${entity.name}.java"/>
<property name="home.file" value="${project.home}/src/$
{action.dir}/${entity.name}Home.java"/>
<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">
<property name="entity.name.default" value="Entity"/>
<input addproperty="entity.name"
message="Enter the entity class to search for [$
{entity.name.default}] "
defaultvalue="${entity.name}"/>

<property name="entity.file" value="${project.home}/src/$
{model.dir}/${entity.name}.java"/>
<available property="entity.present" file="${entity.file}"/>
<fail unless="entity.present">
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}]"
defaultvalue="${component.name.default}"/>

<uppercaseProperty name="bean.name.default" value="$
{component.name}"/>
<input message="Enter the query class name [$
{bean.name.default}]"
addproperty="bean.name"
defaultvalue="${bean.name.default}"/>

<property name="query.default"
value="select o from ${entity.name} o"/>
<input message="Enter the EJBQL query string [$
{query.default}]"
addproperty="query.text"
defaultvalue="${query.default}"/>

<lowercaseProperty name="page.name.default" value="$
{component.name}"/>
<input message="Enter the query resuls page name [$
{page.name.default}]"
addproperty="page.name"
defaultvalue="${page.name.default}"/>

<property name="query.file" value="${project.home}/src/$
{action.dir}/${bean.name}.java"/>
<property name="page.file" value="${project.home}/view/$
{page.name}.xhtml"/>
</target>


<target name="copy-lib">
<echo message="Copying Seam jars to the ${project.home}/lib
directory..."/>

<copy todir="${project.home}/lib" overwrite="true">
<fileset dir="../lib"/>
<fileset dir="../drools/lib"/>
<fileset refid="seam"/>
<fileset file="${driver.jar}"/>
</copy>

<echo message="Copying Embeddable EJB3 configuration to the $
{project.home}/embedded-ejb directory..."/>
<copy todir="${project.home}/embedded-ejb" overwrite="true">
<fileset dir="../embedded-ejb"/>
</copy>

</target>

<target name="file-copy-war" if="project.war">
<echo message="Copying resources needed for WAR deployment to
the ${project.home}/resources directory..."/>

<copy tofile="${project.home}/resources/WEB-INF/
components.xml"
file="${basedir}/resources/WEB-INF/components-war.xml">
<filterset refid="project"/>
</copy>
<copy tofile="${project.home}/build.xml"
file="${basedir}/build-scripts/build-war.xml">
<filterset refid="project"/>
</copy>
<copy todir="${project.home}/resources">
<fileset dir="${basedir}/resources/">
<include name="META-INF/persistence*-war.xml"/>
<include name="WEB-INF/jboss-web.xml"/>
</fileset>
<filterset refid="project"/>
<filterset refid="jdbc"/>
</copy>
</target>

<target name="file-copy-ear" unless="project.war">
<echo message="Copying resources needed for EAR deployment to
the ${project.home}/resources directory..."/>

<copy tofile="${project.home}/resources/WEB-INF/
components.xml"
file="${basedir}/resources/WEB-INF/components.xml">
<filterset refid="project"/>
</copy>
<copy tofile="${project.home}/build.xml"
file="${basedir}/build-scripts/build.xml">
<filterset refid="project"/>
</copy>
<copy todir="${project.home}/resources">
<fileset dir="${basedir}/resources/">
<include name="META-INF/application.xml"/>
<include name="META-INF/jboss-app.xml"/>
<include name="META-INF/ejb-jar.xml"/>
<include name="META-INF/persistence*.xml"/>
<exclude name="META-INF/persistence*-war.xml"/>
</fileset>
<filterset refid="project"/>
<filterset refid="jdbc"/>
</copy>
</target>

<target name="file-copy" depends="file-copy-war,file-copy-
ear,setup-filters">

<copy todir="${project.home}/resources">
<fileset dir="${basedir}/resources/">
<exclude name="datasource-ds.xml"/>
<exclude name="import.sql"/>
<exclude name="WEB-INF/components*.xml"/>
<exclude name="META-INF/persistence*.xml"/>
<exclude name="META-INF/application.xml"/>
<exclude name="META-INF/jboss-app.xml"/>
<exclude name="META-INF/ejb-jar.xml"/>
<exclude name="WEB-INF/jboss-web.xml"/>
</fileset>
<filterset refid="project"/>
<filterset refid="jdbc"/>
</copy>

<copy tofile="${project.home}/${project.name}.launch"
file="${basedir}/hibernatetools/hibernate-
console.launch">
<filterset refid="project"/>
</copy>

<copy tofile="${project.home}/hibernate-console.properties"
file="${basedir}/hibernatetools/hibernate-
console.properties">
<filterset refid="project"/>
<filterset refid="jdbc"/>
<filterset>
<filter token="hibernate.dialect" value="$
{hibernate.dialect}"/>
</filterset>
</copy>

<copy tofile="${project.home}/.settings/
org.hibernate.eclipse.console.prefs"
file="${basedir}/hibernatetools/.settings/
org.hibernate.eclipse.console.prefs">
<filterset refid="project"/>
</copy>

<copy tofile="${project.home}/resources/${project.name}-dev-
ds.xml"
file="${basedir}/resources/datasource-ds.xml">
<filterset refid="project"/>
<filterset refid="jdbc"/>
</copy>

<copy tofile="${project.home}/resources/${project.name}-prod-
ds.xml"
file="${basedir}/resources/datasource-ds.xml">
<filterset refid="project"/>
<filterset refid="jdbc"/>
</copy>

<copy tofile="${project.home}/resources/import-dev.sql"
file="${basedir}/resources/import.sql">
<filterset refid="project"/>
<filterset refid="jdbc"/>
</copy>

<copy tofile="${project.home}/resources/import-prod.sql"
file="${basedir}/resources/import.sql">
<filterset refid="project"/>
<filterset refid="jdbc"/>
</copy>

<copy tofile="${project.home}/resources/import-test.sql"
file="${basedir}/resources/import.sql">
<filterset refid="project"/>
<filterset refid="jdbc"/>
</copy>

<copy todir="${project.home}/view">
<fileset refid="view"/>
<filterset refid="project"/>
</copy>

<copy todir="${project.home}/src/${action.dir}" file="$
{basedir}/src/Authenticator.java">
<filterset refid="filters"/>
</copy>

<copy todir="${project.home}">
<fileset dir="${basedir}/build-scripts">
<exclude name="build*.xml"/>
</fileset>
<filterset refid="project"/>
</copy>

<mkdir dir="${project.home}/src"/>
<mkdir dir="${project.home}/test"/>

<mkdir dir="${project.home}/nbproject"/>
<copy todir="${project.home}/nbproject">
<fileset dir="${basedir}/nbproject"/>
<filterset refid="project"/>
</copy>

</target>

<target name="validate-project" depends="validate-workspace">
<fail message="No project name specified (run 'seam new-
project' first)">
<condition>
<or>
<not>
<isset property="project.name"/>
</not>
<equals arg1="${project.name}" arg2=""/>
</or>
</condition>
</fail>
</target>

<target name="validate-workspace">
<fail message="No eclipse workspace specified (run 'seam
setup' first)">
<condition>
<or>
<not>
<isset property="workspace.home"/>
</not>
<equals arg1="${workspace.home}" arg2=""/>
</or>
</condition>
</fail>
</target>

<target name="new-project" depends="validate-project,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"/>
<echo message="Type 'seam explode' and go to
http://localhost:8080/${project.name}"/>
<echo message="Eclipse Users: Add the project as a new Java
project from inside Eclipse"/>
<echo message="NetBeans Users: Open the project in NetBeans"/>
</target>

<target name="update-project" depends="validate-project,copy-lib"
description="Update project dependencies">
<echo message="Updated project '${project.name}' with the
latest Seam jars"/>
<echo message="Type 'seam restart' to update the exploded
deployment"/>
</target>

<target name="delete-project" depends="validate-project"
description="Delete the project">
<echo message="Deleting the entire project in ${project.home}"/
>
<delete dir="${project.home}"/>
</target>

<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-action-ear" depends="validate-project,action-
input,setup-filters" unless="project.war">
<echo message="Creating a new stateless session bean component
with an action method"/>
<copy file="src/ActionBean.java" tofile="${bean.file}">
<filterset refid="filters"/>
</copy>
<copy file="src/Action.java" tofile="${interface.file}">
<filterset refid="filters"/>
</copy>
<copy file="test/ActionTest.java" tofile="${test.file}">
<filterset refid="filters"/>
</copy>
<copy file="test/testng.xml" tofile="${testng.file}">
<filterset refid="filters"/>
</copy>
<copy file="view/action.xhtml" tofile="${page.file}">
<filterset refid="filters"/>
</copy>
<echo message="Type 'seam restart' and go to
http://localhost:8080/${project.name}/${page.name}.seam"/>
</target>

<target name="new-action-war" depends="validate-project,action-
input,setup-filters" if="project.war">
<echo message="Creating a new JavaBean component with an
action method"/>
<copy file="src/ActionJavaBean.java" tofile="$
{interface.file}">
<filterset refid="filters"/>
</copy>
<copy file="test/ActionTest.java" tofile="${test.file}">
<filterset refid="filters"/>
</copy>
<copy file="test/testng.xml" tofile="${testng.file}">
<filterset refid="filters"/>
</copy>
<copy file="view/action.xhtml" tofile="${page.file}">
<filterset refid="filters"/>
</copy>
<echo message="Type 'seam restart' and go to
http://localhost:8080/${project.name}/${page.name}.seam"/>
</target>

<target name="new-form-war" depends="validate-project,action-
input,setup-filters" if="project.war">
<echo message="Creating a new JavaBean component with an
action method"/>
<copy file="src/FormActionJavaBean.java" tofile="$
{interface.file}">
<filterset refid="filters"/>
</copy>
<copy file="test/FormTest.java" tofile="${test.file}">
<filterset refid="filters"/>
</copy>
<copy file="view/form.xhtml" tofile="${page.file}">
<filterset refid="filters"/>
</copy>
<copy file="test/testng.xml" tofile="${testng.file}">
<filterset refid="filters"/>
</copy>
<echo message="Type 'seam restart' and go to
http://localhost:8080/${project.name}/${page.name}.seam"/>
</target>

<target name="new-form-ear" depends="validate-project,action-
input,setup-filters" unless="project.war">
<echo message="Creating a new stateful session bean component
with an action method"/>
<copy file="src/FormActionBean.java" tofile="${bean.file}">
<filterset refid="filters"/>
</copy>
<copy file="src/FormAction.java" tofile="${interface.file}">
<filterset refid="filters"/>
</copy>
<copy file="test/FormTest.java" tofile="${test.file}">
<filterset refid="filters"/>
</copy>
<copy file="view/form.xhtml" tofile="${page.file}">
<filterset refid="filters"/>
</copy>
<copy file="test/testng.xml" tofile="${testng.file}">
<filterset refid="filters"/>
</copy>
<echo message="Type 'seam restart' and go to
http://localhost:8080/${project.name}/${page.name}.seam"/>
</target>

<target name="new-query" depends="validate-project,query-
input,setup-filters">
<echo message="Creating a new query"/>
<copy file="src/Query.java" tofile="${query.file}">
<filterset refid="filters"/>
</copy>

<copy file="view/query.xhtml" tofile="${page.file}">
<filterset refid="filters"/>
</copy>

<echo message="Type 'seam restart' and go to
http://localhost:8080/${project.name}/${page.name}.seam"/>
</target>

<target name="new-conversation" depends="validate-project,action-
input,setup-filters">
<echo message="Creating a new stateful session bean component
with @Begin and @End methods"/>
<copy file="src/ConversationBean.java" tofile="${bean.file}">
<filterset refid="filters"/>
</copy>
<copy file="src/Conversation.java" tofile="${interface.file}">
<filterset refid="filters"/>
</copy>
<copy file="view/conversation.xhtml" tofile="${page.file}">
<filterset refid="filters"/>
</copy>
<echo message="Type 'seam restart' and go to
http://localhost:8080/${project.name}/${page.name}.seam"/>
</target>

<target name="new-entity" depends="validate-project,entity-
input,setup-filters"
description="Create a new entity">
<echo message="Creating a new entity bean, with home and list
components"/>
<copy file="src/Entity.java" tofile="${entity.file}">
<filterset refid="filters"/>
</copy>
<copy file="src/EntityHome.java" tofile="${home.file}">
<filterset refid="filters"/>
</copy>
<copy file="src/EntityList.java" tofile="${list.file}">
<filterset refid="filters"/>
</copy>
<copy file="view/edit.xhtml" tofile="${page.file}">
<filterset refid="filters"/>
</copy>
<copy file="view/list.xhtml" tofile="${masterPage.file}">
<filterset refid="filters"/>
</copy>
<echo message="Type 'seam restart' and go to
http://localhost:8080/${project.name}/${masterPage.name}.seam"/>
</target>

<target name="generate-entities" depends="validate-project"
description="Reverse engineer entities from the database">

<taskdef name="hibernate"
classname="org.hibernate.tool.ant.HibernateToolTask">
<classpath>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<pathelement path="${driver.jar}"/>
<pathelement path="../jboss-seam-gen.jar"/>
</classpath>
</taskdef>

<hibernate templatepath=".">
<jdbcconfiguration propertyfile="build.properties"
packagename="${model.package}"/>

<property key="hibernatetool.util.toolclass"
value="org.jboss.seam.tool.Util"/>

<hbm2java jdk5="true" ejb3="true" destdir="${project.home}/
src"/>
<hbmtemplate filepattern="{class-name}List.xhtml"
template="view/list.xhtml.ftl"
destdir="${project.home}/view"
foreach="entity"/>
<hbmtemplate filepattern="{class-name}.xhtml"
template="view/view.xhtml.ftl"
destdir="${project.home}/view"
foreach="entity"/>
<hbmtemplate filepattern="{class-name}.page.xml"
template="view/view.page.xml.ftl"
destdir="${project.home}/view"
foreach="entity"/>
<hbmtemplate filepattern="{class-name}Edit.xhtml"
template="view/edit.xhtml.ftl"
destdir="${project.home}/view"
foreach="entity"/>
<hbmtemplate filepattern="{class-name}Edit.page.xml"
template="view/edit.page.xml.ftl"
destdir="${project.home}/view"
foreach="entity"/>
<hbmtemplate filepattern="{package-name}/{class-
name}List.java"
template="src/EntityList.java.ftl"
destdir="${project.home}/src"
foreach="entity"/>
<hbmtemplate filepattern="{class-name}List.page.xml"
template="view/list.page.xml.ftl"
destdir="${project.home}/view"
foreach="entity"/>
<hbmtemplate filepattern="{package-name}/{class-
name}Home.java"
template="src/EntityHome.java.ftl"
destdir="${project.home}/src"
foreach="entity"/>
<hbmtemplate filepattern="menu.xhtml"
template="view/layout/menu.xhtml.ftl"
destdir="${project.home}/view/layout"
foreach="entity"/>
</hibernate>

<taskdef name="javaformatter"
classname="org.hibernate.tool.ant.JavaFormatterTask">
<classpath>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>

<javaformatter>
<fileset dir="${project.home}/src">
<include name="**/*.java"/>
</fileset>
</javaformatter>

<echo message="Type 'seam restart' and go to
http://localhost:8080/${project.name}"/>

</target>

<target name="deploy" depends="validate-project"
description="Deploy the EAR or WAR">
<echo message="Deploying project '${project.name}' to JBoss"/>
<ant antfile="${project.home}/build.xml" target="deploy"
inheritall="false"/>
</target>

<target name="undeploy" depends="validate-project"
description="Undeploy the EAR or WAR archive">
<echo message="Undeploying project '${project.name}'"/>
<ant antfile="${project.home}/build.xml" target="undeploy"
inheritall="false"/>
</target>

<target name="explode" depends="validate-project"
description="Deploy the project as an exploded directory">
<echo message="Deploying project '${project.name}' to JBoss as
an exploded directory"/>
<ant antfile="${project.home}/build.xml" target="explode"
inheritall="false"/>
</target>

<target name="restart" depends="validate-project"
description="Restart the exploded directory">
<echo message="Restarting project '${project.name}'"/>
<ant antfile="${project.home}/build.xml" target="restart"
inheritall="false"/>
</target>

<target name="unexplode" depends="validate-project"
description="Undeploy the exploded directory">
<echo message="Undeploying exploded directory for project '$
{project.name}'"/>
<ant antfile="${project.home}/build.xml" target="unexplode"
inheritall="false"/>
</target>

<target name="test" depends="validate-project"
description="Run the automated tests">
<echo message="Running tests for project '${project.name}'"/>
<ant antfile="${project.home}/build.xml" target="test"
inheritall="false"/>
</target>

<target name="clean" depends="validate-project"
description="Clean the project directory">
<echo message="Cleaning project '${project.name}'"/>
<ant antfile="${project.home}/build.xml" target="clean"
inheritall="false"/>
</target>

<target name="reset"
description="Delete the settings">
<delete file="build.properties"/>
</target>

<target name="settings"
description="Print the settings">
<echo message="Java project workspace: ${workspace.home}"/>
<echo message="JBoss home: ${jboss.home}"/>
<echo message="Project name: ${project.name}"/>
<echo message="Project type: ${project.type}"/>
<echo message="Hibernate dialect: ${hibernate.dialect}"/>
<echo message="JDBC URL: ${hibernate.connection.url}"/>
<echo message="JDBC driver class: $
{hibernate.connection.driver_class}"/>
<echo message="Database username: $
{hibernate.connection.username}"/>
<echo message="Database password: $
{hibernate.connection.password}"/>
</target>

<target name="help">
<print file="README"/>
</target>

</project>


====================================================================
STEP 2:
====================================================================


Here's how to run

PROJECT1 SETUP
======================

tdashadmin@trgaws38 /usr/local/share/jboss-seam-1.2.0.PATCH1$ seam
setup

Buildfile: build.xml

setup:

[echo] Welcome to seam-gen :-)

[input] Enter your Java project workspace (the directory that
contains your Seam projects) [/home/tdashadmin/temp]

[input] Enter your JBoss home directory [/usr/local/share/
jboss-4.0.5.GA]

[input] Enter the project name [project1]

[input] Is this project deployed as an EAR (with EJB components)
or a WAR (with no EJB support) [ear] (ear,war,)

[input] Enter the Java package name for your session beans
[com.ibt.project1]

[input] Enter the Java package name for your entity beans
[com.ibt.project1]

[input] Enter the Java package name for your test cases
[com.ibt.project1.test]

[input] What kind of database are you using? [mysql]
(hsql,mysql,oracle,postgres,mssql,db2,sybase,enterprisedb,)

[input] Enter the Hibernate dialect for your database
[org.hibernate.dialect.MySQLDialect]

[input] Enter the filesystem path to the JDBC driver jar [/home/
labftp/help/libraries/jdbc/mysql-connector-java.jar]

/home/labftp/help/libraries/jdbc/mysql-connector-java-4 5.0.4-bin.jar

[input] Enter JDBC driver class for your database
[com.mysql.jdbc.Driver]

[input] Enter the JDBC URL for your database [jdbc:mysql://
ns1.intellibitz.com/test]

[input] Enter database username [sa]

[input] Enter database password []

[input] skipping input as property hibernate.default_schema.new
has already been set.

[input] Enter the database catalog name (it is OK to leave this
blank) []

[input] Are you working with tables that already exist in the
database? [n] (y,n,)

[input] Do you want to drop and recreate the database tables and
data in import.sql each time you deploy? [n] (y,n,)

[propertyfile] Updating property file: /home/tdashadmin/build-
intellibitz.properties

[propertyfile] Updating property file: /home/tdashadmin/build-temp-
project1-ear.properties

[echo] Installing JDBC driver jar to JBoss server

[echo] Type 'seam new-project' to create the new project

BUILD SUCCESSFUL

Total time: 38 seconds

PROJECT2 SETUP
======================

tdashadmin@trgaws38:/usr/local/share/jboss-seam-1.2.0.PATCH1$ seam
setup

Buildfile: build.xml

setup:

[echo] Welcome to seam-gen :-)

[input] Enter your Java project workspace (the directory that
contains your Seam projects) [/home/tdashadmin/temp]

[input] Enter your JBoss home directory [/usr/local/share/
jboss-4.0.5.GA]

[input] Enter the project name [project1]

project2

[input] Is this project deployed as an EAR (with EJB components)
or a WAR (with no EJB support) [ear] (ear,war,)

war

[input] Enter the Java package name for your session beans
[com.ibt.project1]

com.ibt.project2

[input] Enter the Java package name for your entity beans
[com.ibt.project1]

com.ibt.project2

[input] Enter the Java package name for your test cases
[com.ibt.project1.test]

com.ibt.project2.test

[input] What kind of database are you using? [mysql]
(hsql,mysql,oracle,postgres,mssql,db2,sybase,enterprisedb,)

[input] Enter the Hibernate dialect for your database
[org.hibernate.dialect.MySQLDialect]

[input] Enter the filesystem path to the JDBC driver jar [/home/
labftp/help/libraries/jdbc/mysql-connector-java-5.0.4-bin.jar]

[input] Enter JDBC driver class for your database
[com.mysql.jdbc.Driver]

[input] Enter the JDBC URL for your database [jdbc:mysql://
ns1.intellibitz.com/test]

[input] Enter database username [sa]

[input] Enter database password []

[input] skipping input as property hibernate.default_schema.new
has already been set.

[input] Enter the database catalog name (it is OK to leave this
blank) []

[input] Are you working with tables that already exist in the
database? [n] (y,n,)

[input] Do you want to drop and recreate the database tables and
data in import.sql each time you deploy? [n] (y,n,)

[propertyfile] Updating property file: /home/tdashadmin/build-
intellibitz.properties

[propertyfile] Creating new property file: /home/tdashadmin/build-temp-
project2-war.properties

[echo] Installing JDBC driver jar to JBoss server

[echo] Type 'seam new-project' to create the new project

BUILD SUCCESSFUL

Total time: 38 seconds

PROJECT2 NEW-PROJECT GENERATION
===============================

tdashadmin@trgaws38:/usr/local/share/jboss-seam-1.2.0.PATCH1$ seam new-
project

Buildfile: build.xml

validate-workspace:

validate-project:

copy-lib:

[echo] Copying Seam jars to the /home/tdashadmin/temp/project2/
lib directory...

[copy] Copying 55 files to /home/tdashadmin/temp/project2/lib

[echo] Copying Embeddable EJB3 configuration to the /home/
tdashadmin/temp/project2/embedded-ejb directory...

[copy] Copying 9 files to /home/tdashadmin/temp/project2/embedded-
ejb

file-copy-war:

[echo] Copying resources needed for WAR deployment to the /home/
tdashadmin/temp/project2/resources directory...

[copy] Copying 1 file to /home/tdashadmin/temp/project2/resources/
WEB-INF

[copy] Copying 1 file to /home/tdashadmin/temp/project2

[copy] Copying 4 files to /home/tdashadmin/temp/project2/
resources

file-copy-ear:

setup-filters:

file-copy:

[copy] Copying 8 files to /home/tdashadmin/temp/project2/
resources

[copy] Copying 1 file to /home/tdashadmin/temp/project2

[copy] Copying 1 file to /home/tdashadmin/temp/project2

[copy] Copying 1 file to /home/tdashadmin/temp/project2/.settings

[copy] Copying 1 file to /home/tdashadmin/temp/project2/resources

[copy] Copying 1 file to /home/tdashadmin/temp/project2/resources

[copy] Copying 1 file to /home/tdashadmin/temp/project2/resources

[copy] Copying 1 file to /home/tdashadmin/temp/project2/resources

[copy] Copying 1 file to /home/tdashadmin/temp/project2/resources

[copy] Copying 12 files to /home/tdashadmin/temp/project2/view

[copy] Copying 1 file to /home/tdashadmin/temp/project2/src/com/
ibt/project2

[copy] Copying 4 files to /home/tdashadmin/temp/project2

[mkdir] Created dir: /home/tdashadmin/temp/project2/test

[mkdir] Created dir: /home/tdashadmin/temp/project2/nbproject

[copy] Copying 3 files to /home/tdashadmin/temp/project2/
nbproject

new-project:

[echo] A new Seam project named 'project2' was created in the /
home/tdashadmin/temp directory

[echo] Type 'seam explode' and go to http://localhost:8080/project2

[echo] Eclipse Users: Add the project as a new Java project from
inside Eclipse

[echo] NetBeans Users: Open the project in NetBeans

BUILD SUCCESSFUL

Total time: 14 seconds


PROJECT1 NEW-PROJECT GENERATION
===============================

[tdashadmin@trgaws38 /usr/local/share/jboss-seam-1.2.0.PATCH1]$ seam -
Dproject.name=Project1 new-project

Buildfile: build.xml

validate-workspace:

validate-project:

copy-lib:

[echo] Copying Seam jars to the /home/tdashadmin/temp/project1/
lib directory...

[copy] Copying 54 files to /home/tdashadmin/temp/project1/lib

[echo] Copying Embeddable EJB3 configuration to the /home/
tdashadmin/temp/project1/embedded-ejb directory...

[copy] Copying 9 files to /home/tdashadmin/temp/project1/embedded-
ejb

file-copy-war:

[echo] Copying resources needed for WAR deployment to the /home/
tdashadmin/temp/project1/resources directory...

[copy] Copying 1 file to /home/tdashadmin/temp/project1/resources/
WEB-INF

[copy] Copying 1 file to /home/tdashadmin/temp/project1

[copy] Copying 4 files to /home/tdashadmin/temp/project1/
resources

file-copy-ear:

setup-filters:

file-copy:

[copy] Copying 8 files to /home/tdashadmin/temp/project1/
resources

[copy] Copying 1 file to /home/tdashadmin/temp/project1

[copy] Copying 1 file to /home/tdashadmin/temp/project1

[copy] Copying 1 file to /home/tdashadmin/temp/project1/.settings

[copy] Copying 1 file to /home/tdashadmin/temp/project1/resources

[copy] Copying 1 file to /home/tdashadmin/temp/project1/resources

[copy] Copying 1 file to /home/tdashadmin/temp/project1/resources

[copy] Copying 1 file to /home/tdashadmin/temp/project1/resources

[copy] Copying 1 file to /home/tdashadmin/temp/project1/resources

[copy] Copying 12 files to /home/tdashadmin/temp/project1/view

[copy] Copying 1 file to /home/tdashadmin/temp/project1/src/$
{action/package}

[copy] Copying 4 files to /home/tdashadmin/temp/project1

[mkdir] Created dir: /home/tdashadmin/temp/project1/test

[mkdir] Created dir: /home/tdashadmin/temp/project1/nbproject

[copy] Copying 3 files to /home/tdashadmin/temp/project1/
nbproject

new-project:

[echo] A new Seam project named 'project1' was created in the /
home/tdashadmin/temp directory

[echo] Type 'seam explode' and go to http://localhost:8080/project1

[echo] Eclipse Users: Add the project as a new Java project from
inside Eclipse

[echo] NetBeans Users: Open the project in NetBeans

BUILD SUCCESSFUL

Total time: 13 seconds

PROJECT2 NEW-ACTION GENERATION
===============================

tdashadmin@trgaws38:/usr/local/share/jboss-seam-1.2.0.PATCH1$ seam new-
action

Buildfile: build.xml

validate-workspace:

validate-project:

action-input:

[input] Enter the Seam component name

Project2Action

[input] Enter the local interface name [Project2Action]

[input] Enter the bean class name [Project2ActionBean]

[input] Enter the action method name [project2Action]

[input] Enter the page name [project2Action]

setup-filters:

new-action-ear:

new-action-war:

[echo] Creating a new JavaBean component with an action method

[copy] Copying 1 file to /home/tdashadmin/temp/project2/src/com/
ibt/project2

[copy] Copying 1 file to /home/tdashadmin/temp/project2/test/com/
ibt/project2/test

[copy] Copying 1 file to /home/tdashadmin/temp/project2/test/com/
ibt/project2/test

[copy] Copying 1 file to /home/tdashadmin/temp/project2/view

[echo] Type 'seam restart' and go to http://localhost:8080/project2/project2Action.seam

new-action:

BUILD SUCCESSFUL

Total time: 6 seconds


PROJECT1 NEW-ACTION GENERATION
===============================


tdashadmin@trgaws38:/usr/local/share/jboss-seam-1.2.0.PATCH1$ seam -
Dproject.name=project1 new-action

Buildfile: build.xml

validate-workspace:

validate-project:

action-input:

[input] Enter the Seam component name

Project1Action

[input] Enter the local interface name [Project1Action]

[input] Enter the bean class name [Project1ActionBean]

[input] Enter the action method name [project1Action]

[input] Enter the page name [project1Action]

setup-filters:

new-action-ear:

new-action-war:

[echo] Creating a new JavaBean component with an action method

[copy] Copying 1 file to /home/tdashadmin/temp/project1/src/$
{action/package}

[copy] Copying 1 file to /home/tdashadmin/temp/project1/test/$
{test/package}

[copy] Copying 1 file to /home/tdashadmin/temp/project1/test/$
{test/package}

[copy] Copying 1 file to /home/tdashadmin/temp/project1/view

[echo] Type 'seam restart' and go to http://localhost:8080/project1/project1Action.seam

new-action:

BUILD SUCCESSFUL

Total time: 8 seconds


link:
by IntelliBitz Technologies
http://www.intellibitz.com

Reply all
Reply to author
Forward
0 new messages