[jboss-cvs] jboss-seam/seam-gen ...

Peter Muir peter at bleepbleep.org.uk
Wed Nov 21 06:44:04 EST 2007


  User: pmuir   
  Date: 07/11/21 06:44:04

  Modified:    seam-gen  build.xml
  Log:
  JBSEAM-843
  
  Revision  Changes    Path
  1.118     +28 -7     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.117
  retrieving revision 1.118
  diff -u -b -r1.117 -r1.118
  --- build.xml	20 Nov 2007 17:24:50 -0000	1.117
  +++ build.xml	21 Nov 2007 11:44:04 -0000	1.118
  @@ -975,22 +975,30 @@
           <echo message="Type 'seam restart' and go to http://localhost:8080/${project.name}/${masterPage.name}.seam"/>
       </target>
   
  -	<target name="generate-entities" depends="validate-project"
  +	<target name="generate-entities" depends="validate-project, generate-model, generate-ui"
           description="Reverse engineer entities from the database">
  +	</target>
   		
  -		<echo message="Reverse engineering database using JDBC driver ${driver.jar}"/>
  -
  -	    <taskdef name="hibernate" 
  -	             classname="org.hibernate.tool.ant.HibernateToolTask">
  +	<target name="init-generate">
  +		<taskdef name="hibernate" classname="org.hibernate.tool.ant.HibernateToolTask">
   	        <classpath>
   	            <fileset dir="lib">
   	                <include name="*.jar"/>
   	            </fileset>
  +	        	<pathelement path="../lib/persistence-api.jar" />
  +	        	<pathelement path="../lib/hibernate-commons-annotations.jar" />
  +	        	<pathelement path="../lib/hibernate-annotations.jar" />
  +	        	<pathelement path="../lib/hibernate-entitymanager.jar" />
  +	        	<pathelement path="../lib/javassist.jar" />
  +	        	<pathelement path="../lib/jboss-common-core.jar" />
   	            <pathelement path="${driver.jar}"/>
   	        	<pathelement path="../lib/jboss-seam-gen.jar"/>
   	        </classpath>
   	    </taskdef>
  +	</target>
   		
  +	<target name="generate-model" depends="init-generate">
  +		<echo message="Reverse engineering database using JDBC driver ${driver.jar}"/>
           <echo>project=${project.home}</echo>
           <echo>model=${model.package}</echo>
   		<hibernate templatepath="${base.dir}">
  @@ -1003,6 +1011,19 @@
           		    value="org.jboss.seam.tool.Util"/>
           	
               <hbm2java jdk5="true" ejb3="true" destdir="${project.home}/src/model"/> 
  +		</hibernate>
  +	</target>
  +	
  +	<target name="generate-ui" depends="validate-project, init-generate" description="Build the ui based on existing entities">
  +		<echo message="Building project '${project.name}' to generate views and controllers" />
  +		<ant antfile="${project.home}/build.xml" target="jar" inheritall="false"/>
  +		<hibernate templatepath="${base.dir}">
  +			
  +			<jpaconfiguration persistenceunit="${project.name}" />
  +			<classpath>
  +				<pathelement path="${project.home}/exploded-archives/${project.name}.jar"/>
  +			</classpath> 
  +			<property key="hibernatetool.util.toolclass" value="org.jboss.seam.tool.Util"/>
           	<hbmtemplate filepattern="{class-name}List.xhtml"
           	                template="view/list.xhtml.ftl" 
           		             destdir="${project.home}/view"
  
  
  



More information about the jboss-cvs-commits mailing list