[jboss-cvs] jboss-seam/seam-gen/build-scripts ...
Gavin King
gavin.king at jboss.com
Sat Oct 28 13:56:03 EDT 2006
User: gavin
Date: 06/10/28 13:56:03
Added: seam-gen/build-scripts build.properties build.xml
Log:
add seam-gen to CVS
Revision Changes Path
1.1 date: 2006/10/28 17:56:03; author: gavin; state: Exp;jboss-seam/seam-gen/build-scripts/build.properties
Index: build.properties
===================================================================
jboss.home = @jbossHome@
1.1 date: 2006/10/28 17:56:03; author: gavin; state: Exp;jboss-seam/seam-gen/build-scripts/build.xml
Index: build.xml
===================================================================
<?xml version="1.0"?>
<project name="seam-demo" default="deploy" basedir=".">
<!-- Give user a chance to override without editing this file or typing -D -->
<property file="${basedir}/build.properties" />
<!-- set global properties for this build -->
<property name="dist.dir" value="dist" />
<property name="classes.dir" value="exploded-archives/@projectName at .jar" />
<property name="src.java.dir" value="src" />
<property name="lib.dir" value="lib" />
<property name="ear.dir" value="exploded-archives/@projectName at .ear" />
<property name="jar.dir" value="exploded-archives/@projectName at .jar" />
<property name="war.dir" value="exploded-archives/@projectName at .war" />
<property name="test.dir" value="build/test" />
<property name="embedded-ejb3.dir" value="${basedir}/embedded-ejb/conf" />
<property name="deploy.dir" value="${jboss.home}/server/default/deploy" />
<property name="testng.jar" value="${basedir}/lib/testng-4.5.1-jdk15.jar" />
<property name="javac.debug" value="true" />
<property name="javac.deprecation" value="false" />
<fileset id="lib" dir="${lib.dir}">
<include name="*.jar" />
</fileset>
<path id="build.classpath">
<fileset refid="lib" />
</path>
<target name="init" description="Initialize the build">
<mkdir dir="${classes.dir}" />
<mkdir dir="${dist.dir}" />
<mkdir dir="${ear.dir}" />
<mkdir dir="${war.dir}" />
</target>
<target name="compile" depends="init" description="Compile the Java source code">
<javac classpathref="build.classpath" destdir="${classes.dir}" debug="${javac.debug}" deprecation="${javac.deprecation}" nowarn="on">
<src path="${src.java.dir}" />
</javac>
</target>
<target name="build-jar" depends="compile" description="Build the distribution .jar file">
<copy todir="${classes.dir}">
<fileset dir="${basedir}/resources">
<include name="*.properties" />
</fileset>
</copy>
<copy todir="${classes.dir}/META-INF">
<fileset dir="${basedir}/resources/META-INF">
<include name="ejb-jar.xml" />
<include name="persistence.xml" />
</fileset>
</copy>
<jar jarfile="${ear.dir}/@projectName at .jar" basedir="${classes.dir}">
<include name="**/*" />
<manifest>
<attribute name="@projectName@" value="Seam Shell Sample" />
</manifest>
</jar>
</target>
<target name="build-war" depends="compile" description="Build the distribution .war file">
<copy todir="${basedir}/exploded-archives/@projectName at .war">
<fileset dir="${basedir}/view" />
<fileset dir="${basedir}/resources/WEB-INF" />
</copy>
<copy todir="${basedir}/exploded-archives/@projectName at .war/WEB-INF/lib">
<fileset dir="${lib.dir}">
<include name="el-api.jar" />
<include name="el-ri.jar" />
<include name="jsf-facelets.jar" />
<include name="jboss-seam-ui.jar" />
</fileset>
</copy>
<copy todir="${basedir}/exploded-archives/@projectName at .war/WEB-INF">
<fileset dir="${basedir}/resources/WEB-INF" />
</copy>
</target>
<target name="build-ear" depends="build-jar,build-war" description="Build the EAR">
<copy todir="${basedir}/exploded-archives/@projectName at .ear">
<fileset dir="${basedir}/resources">
<include name="*jpdl.xml" />
<include name="hibernate.cfg.xml" />
<include name="jbpm.cfg.xml" />
</fileset>
<fileset dir="${lib.dir}">
<include name="jboss-seam.jar" />
<include name="jbpm*.jar" />
</fileset>
</copy>
<copy todir="${basedir}/exploded-archives/@projectName at .ear/META-INF">
<fileset dir="${basedir}/resources/META-INF">
<include name="application.xml" />
<include name="jboss-app.xml" />
<include name="jboss-beans.xml" />
</fileset>
</copy>
<zip destfile="exploded-archives/@projectName at .ear/@projectName at .war" basedir="${war.dir}" update="true" />
<ear basedir="${ear.dir}" appxml="${ear.dir}/META-INF/application.xml" destfile="${dist.dir}/@projectName at .ear" />
</target>
<target name="deploy" depends="build-ear" description="Deploy to JBoss">
<fail unless="jboss.home">jboss.home MUST be set. Update build.properties to point to a valid JBoss installation.</fail>
<copy todir="${deploy.dir}">
<fileset dir="${basedir}/resources">
<include name="@projectName at -ds.xml" />
</fileset>
</copy>
<copy todir="${deploy.dir}" file="${dist.dir}/@projectName at .ear" />
</target>
<target name="undeploy" description="Undeploy the example from JBoss">
<delete file="${deploy.dir}/@projectName at .ear" />
<delete file="${deploy.dir}/@projectName at -ds.xml" />
</target>
<target name="clean" description="Cleans up the build directory">
<delete dir="${test.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${classes.dir}" />
<delete dir="${ear.dir}" />
<delete dir="${war.dir}" />
<delete dir="${jar.dir}" />
</target>
<target name="test" depends="build-ear" description="Test registration module">
<taskdef resource="testngtasks" classpath="${testng.jar}" />
<copy todir="${test.dir}">
<fileset dir="${basedir}/resources" />
<fileset dir="${jar.dir}" />
</copy>
<copy todir="${test.dir}/WEB-INF">
<fileset dir="${war.dir}/WEB-INF">
<exclude name="**/*.jar" />
</fileset>
</copy>
<copy todir="${test.dir}" flatten="true">
<fileset dir="${src.java.dir}">
<include name="**/*-testng.xml" />
</fileset>
</copy>
<testng outputdir="${basedir}/testng-report">
<classpath path="${test.dir}" />
<classpath path="${embedded-ejb3.dir}" />
<classpath refid="build.classpath" />
<xmlfileset dir="${test.dir}" includes="*-testng.xml" />
</testng>
</target>
</project>
More information about the jboss-cvs-commits
mailing list