[jboss-cvs] jboss-seam/examples/jpa ...

Michael Yuan michael.yuan at jboss.com
Wed Nov 8 04:38:57 EST 2006


  User: myuan   
  Date: 06/11/08 04:38:57

  Added:       examples/jpa  build.xml
  Log:
  add jpa
  
  Revision  Changes    Path
  1.1      date: 2006/11/08 09:38:57;  author: myuan;  state: Exp;jboss-seam/examples/jpa/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project name="JPA Booking"
           default="main" basedir=".">
      
    <description>Hello World</description>
    <property name="projname" value="jboss-seam-jpa" />
  
    <property file="../build.properties"/>
    <property name="jboss.deploy"
      location="${jboss.home}/server/default/deploy"/>
  
    <property name="lib" location="../../lib" />
    <property name="applib" location="lib" />
    <property name="seamlib" location="../../" />
    <path id="lib.classpath">
      <fileset dir="${lib}" includes="*.jar"/>
      <fileset dir="${applib}" includes="*.jar"/>
      <fileset dir="${seamlib}" includes="*.jar"/>
    </path>
    
    <property name="resources" location="resources" />
    
    <property name="src" location="src" />
    <property name="view" location="view" />
    
    <property name="build.classes" location="build/classes" />
    <property name="build.jars" location="build/" />
  
    <target name="clean">
      <delete dir="build"/>
    </target>
  
    <target name="main" depends="jboss"/>
  
    <target name="compile">
      <mkdir dir="${build.classes}"/>
      <javac destdir="${build.classes}"
             classpathref="lib.classpath"
             debug="true">
        <src path="${src}"/>
      </javac>
    </target>
    
    <target name="components" depends="compile">
      <mkdir dir="${build.jars}"/>
      
      <jar destfile="${build.jars}/${projname}.jar">
        <fileset dir="${build.classes}">
          <include name="**/*.class"/>
        </fileset>
        <fileset dir="${resources}">
          <include name="seam.properties" />
          <include name="import.sql" />
        </fileset>
        <metainf dir="${resources}">
          <include name="persistence.xml" />
        </metainf>
      </jar>
    </target>
    
    <!--
      Only for JBoss AS 4.0.2+.
      
      JBoss AS 4.0.0: need to remove cglib.jar and hibernate2.jar from server/default/lib
        the isolated classloader in jboss-web.xml does not seem to work. If we force it
        in jbossweb*/META-INF/jboss-service.xml, the commons logging lib in thirdparty-all.jar
        will throw errors
    -->
    <target name="jboss" depends="compile,components">
      
      <war destfile="${build.jars}/${projname}.war"
           webxml="${resources}/web.xml">
        <webinf dir="${resources}">
          <include name="faces-config.xml" />
          <include name="pages.xml" />
          <include name="navigation.xml" />
        </webinf>
        <webinf dir="${resources}/jboss">
          <include name="jboss-web.xml" />
          <include name="components.xml" />
        </webinf>
        <lib dir="${seamlib}">
          <include name="jboss-seam*.jar" />
        </lib>
        <lib dir="${applib}">
          <include name="el-api.jar" />
          <include name="el-ri.jar" />
          <include name="jsf-facelets.jar" />
          <include name="ajax4jsf.jar" />
          <include name="oscache-2.3.2.jar" />
          <!-- do not need the following for 4.0.4 and 4.0.5 -->
          <include name="cglib.jar" />
        </lib>
        <lib dir="${lib}">
          <!-- do not need the following 4 jars for 4.0.4 and 4.0.5 -->
          <include name="myfaces-api-1.1.4.jar" />
          <include name="myfaces-impl-1.1.4.jar" />
          <include name="hibernate-all.jar" />
          <include name="commons*.jar" />
        </lib>
        <lib dir="${build.jars}">
          <include name="${projname}.jar" />
        </lib>
        <fileset dir="${view}"/>
      </war>
    </target>
    
    <target name="tomcat" depends="compile,components">
      
      <war destfile="${build.jars}/${projname}.war"
           webxml="${resources}/web.xml">
        <webinf dir="${resources}">
          <include name="faces-config.xml" />
          <include name="pages.xml" />
          <include name="navigation.xml" />
        </webinf>
        <webinf dir="${resources}/tomcat">
          <include name="components.xml" />
        </webinf>
        <lib dir="${seamlib}">
          <include name="jboss-seam*.jar" />
        </lib>
        <lib dir="${applib}">
          <include name="el-api.jar" />
          <include name="el-ri.jar" />
          <include name="jsf-facelets.jar" />
          <include name="ajax4jsf.jar" />
          <include name="oscache-2.3.2.jar" />
        </lib>
        <lib dir="${lib}">
          <include name="myfaces-api-1.1.4.jar" />
          <include name="myfaces-impl-1.1.4.jar" />
          <include name="hibernate-all.jar" />
          <include name="jboss-ejb3-all.jar" />
          <include name="thirdparty-all.jar" />
          <include name="commons*.jar" />
        </lib>
        <lib dir="${build.jars}">
          <include name="${projname}.jar" />
        </lib>
        <classes dir="${resources}/tomcat">
          <include name="jndi.properties" />
          <include name="jboss-beans.xml" />
          <include name="log4j.xml" />
        </classes>
        <fileset dir="${view}"/>
      </war>
    </target>
    
    <!--
    <target name="tomcat" depends="compile">
      <mkdir dir="${build.jars}"/>
      
      <jar destfile="${build.jars}/${projname}.jar">
        <fileset dir="${build.classes}">
          <include name="**/*.class"/>
        </fileset>
        <fileset dir="${resources}">
          <include name="seam.properties" />
          <include name="import.sql" />
        </fileset>
        <metainf dir="${resources}/tomcat">
          <include name="persistence.xml" />
        </metainf>
      </jar>
  
      <war destfile="${build.jars}/${projname}.war"
           webxml="${resources}/tomcat/web.xml">
        <webinf dir="${resources}">
          <include name="faces-config.xml" />
          <include name="components.xml" />
          <include name="pages.xml" />
          <include name="navigation.xml" />
        </webinf>
        <lib dir="${seamlib}">
          <include name="jboss-seam*.jar" />
        </lib>
        <lib dir="${applib}">
          <include name="el-api.jar" />
          <include name="el-ri.jar" />
          <include name="jsf-facelets.jar" />
          <include name="ajax4jsf.jar" />
          <include name="oscache-2.3.2.jar" />
          <include name="cglib.jar" />
          <include name="hibernate*.jar" />
          <include name="ejb3-persistence.jar" />
          <include name="derby.jar" />
        </lib>
        <lib dir="${lib}">
          <include name="myfaces-api-1.1.4.jar" />
          <include name="myfaces-impl-1.1.4.jar" />
          <include name="jboss-ejb3-all.jar" />
          <include name="thirdparty-all.jar" />
          <include name="commons*.jar" />
        </lib>
        <lib dir="${build.jars}">
          <include name="${projname}.jar" />
        </lib>
        <classes dir="${resources}/tomcat">
          <include name="log4j.xml" />
        </classes>
        <fileset dir="${view}"/>
      </war>
    </target>
    -->
    
    <target name="deploy">
      <copy file="${build.jars}/${projname}.war"
        todir="${jboss.deploy}"/>
    </target>
  
    <target name="undeploy">
      <delete
          file="${jboss.deploy}/${projname}.war"/>
    </target>
  
  </project>
  
  
  



More information about the jboss-cvs-commits mailing list