2006-11-17 10:13:45 +07:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!-- ============================================= -->
|
|
|
|
<!-- Adempiere Server Root -->
|
|
|
|
<!-- ============================================= -->
|
|
|
|
<!-- $Header: /cvs/adempiere/serverRoot/build.xml,v 1.4 2006/06/10 21:58:02 jjanke Exp $-->
|
|
|
|
|
|
|
|
<project name="adempiereRoot" default="main" basedir=".">
|
|
|
|
|
2007-01-30 16:06:53 +07:00
|
|
|
<!--<property environment="env"/>-->
|
2007-01-30 17:13:17 +07:00
|
|
|
<import file="../utils_dev/properties.xml"/>
|
2006-11-17 10:13:45 +07:00
|
|
|
|
|
|
|
<property name="xdoclet.home" value="../tools" />
|
|
|
|
<property name="xdoclet.force" value="false" />
|
|
|
|
<property name="ejb.version" value="2.0" />
|
|
|
|
|
|
|
|
<property name="src.dir" value="${basedir}/src"/>
|
|
|
|
<property name="src.main.dir" value="${src.dir}/main"/>
|
|
|
|
<property name="src.ear.dir" value="${src.dir}/ear"/>
|
|
|
|
<property name="src.ejb.dir" value="${src.main.dir}/ejb"/>
|
|
|
|
<property name="src.servlet.dir" value="${src.main.dir}/servlet"/>
|
|
|
|
<property name="src.server.dir" value="${src.main.dir}/server"/>
|
|
|
|
<property name="src.resources.dir" value="${src.dir}/resources"/>
|
|
|
|
<property name="src.web.dir" value="${src.dir}/web"/>
|
|
|
|
|
|
|
|
<property name="build.dir" value="${basedir}/build"/>
|
|
|
|
<property name="build.tmp.dir" value="${build.dir}/tmp"/>
|
|
|
|
<property name="build.deploy.dir" value="${build.dir}/deploy"/>
|
|
|
|
<property name="build.classes.dir" value="${build.dir}/classes"/>
|
|
|
|
<property name="build.war.dir" value="${build.dir}/war"/>
|
|
|
|
|
2007-05-10 10:54:08 +07:00
|
|
|
<property name="interfaces.dir" value="../base"/>
|
|
|
|
<property name="src.interfaces.dir" value="../base/src"/>
|
2006-11-17 10:13:45 +07:00
|
|
|
|
|
|
|
|
|
|
|
<target name="adempiereRootInit">
|
|
|
|
<echo message="=========== Build Server Root"/>
|
|
|
|
|
|
|
|
<tstamp/>
|
|
|
|
<uptodate property="interfaces.uptodate"
|
|
|
|
targetfile="${interfaces.dir}/Interfaces.jar">
|
|
|
|
<srcfiles dir="${src.ejb.dir}" includes="**/*.java"/>
|
2007-05-10 10:54:08 +07:00
|
|
|
<srcfiles dir="${src.interfaces.dir}" includes="**/interfaces/*.java"/>
|
2006-11-17 10:13:45 +07:00
|
|
|
</uptodate>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<path id="xdoclet.path">
|
|
|
|
<pathelement location="${xdoclet.home}/lib/ant.jar" />
|
|
|
|
<pathelement location="${xdoclet.home}/lib/log4j.jar" />
|
|
|
|
<pathelement location="${xdoclet.home}/lib/commons-logging.jar" />
|
|
|
|
<pathelement location="${xdoclet.home}/lib/xdoclet-1.2.3.jar" />
|
|
|
|
<pathelement location="${xdoclet.home}/lib/xdoclet-web-module-1.2.3.jar" />
|
|
|
|
<pathelement location="${xdoclet.home}/lib/xdoclet-ejb-module-1.2.3.jar" />
|
|
|
|
<pathelement location="${xdoclet.home}/lib/xjavadoc-1.1.jar" />
|
|
|
|
<pathelement location="${xdoclet.home}/lib/xdoclet-xdoclet-module-1.2.3.jar" />
|
2007-05-25 13:47:28 +07:00
|
|
|
<pathelement location="${xdoclet.home}/lib/xdoclet-jboss-module-1.2.3.jar" />
|
|
|
|
<pathelement location="${xdoclet.home}/lib/xdoclet-jmx-module-1.2.3.jar" />
|
2006-11-17 10:13:45 +07:00
|
|
|
<pathelement location="${xdoclet.home}/lib/commons-collections-3.1.jar" />
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="base.path">
|
|
|
|
<path refid="xdoclet.path"/>
|
|
|
|
<pathelement location="../lib/Adempiere.jar" />
|
|
|
|
<pathelement location="../lib/CSTools.jar" />
|
|
|
|
<pathelement location="../tools/lib/j2ee.jar" />
|
2007-05-10 18:50:13 +07:00
|
|
|
<pathelement location="../tools/lib/jnlp.jar" />
|
|
|
|
<pathelement location="../tools/lib/servlet-api.jar" />
|
|
|
|
<pathelement location="../tools/lib/mail.jar" />
|
|
|
|
<pathelement location="../tools/lib/bsh-1.3.0.jar" />
|
2007-05-11 22:06:53 +07:00
|
|
|
<pathelement location="../tools/lib/junit.jar" />
|
2007-05-10 18:50:13 +07:00
|
|
|
<pathelement location="../lib/oracle.jar" />
|
|
|
|
<pathelement location="../lib/jboss.jar" />
|
|
|
|
<pathelement location="../lib/postgresql.jar" />
|
2006-11-17 10:13:45 +07:00
|
|
|
<pathelement location="${build.classes.dir}" />
|
|
|
|
</path>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- =================================================================== -->
|
|
|
|
<!-- Generates the necessary EJB classes and deployment descriptors -->
|
|
|
|
<!-- =================================================================== -->
|
|
|
|
<target name="adempiereRootXdoclet" depends="adempiereRootInit">
|
|
|
|
<echo message="XDoclet=${xdoclet.home}"/>
|
|
|
|
<echo message="UpToDate=${interfaces.uptodate}"/>
|
|
|
|
|
|
|
|
<taskdef
|
|
|
|
name="ejbdoclet"
|
|
|
|
classname="xdoclet.modules.ejb.EjbDocletTask"
|
|
|
|
classpathref="base.path"/>
|
|
|
|
|
2007-09-28 04:49:54 +07:00
|
|
|
<delete file="${build.dir}/META-INF/jboss.xml"/>
|
2006-11-17 10:13:45 +07:00
|
|
|
<ejbdoclet
|
|
|
|
destdir="${src.interfaces.dir}"
|
|
|
|
excludedTags="@version,@author"
|
|
|
|
ejbspec="${ejb.version}"
|
|
|
|
mergedir="${src.resources.dir}/xdoclet"
|
|
|
|
force="${xdoclet.force}">
|
|
|
|
<fileset dir="${src.ejb.dir}">
|
|
|
|
<include name="**/*Bean.java"/>
|
|
|
|
</fileset>
|
|
|
|
<packageSubstitution packages="session,entity" substituteWith="interfaces"/>
|
|
|
|
<homeinterface/>
|
|
|
|
<localinterface/>
|
|
|
|
<localhomeinterface/>
|
|
|
|
<remoteinterface/>
|
2007-05-25 13:47:28 +07:00
|
|
|
<jboss
|
|
|
|
securityDomain="java:/jaas/adempiere"
|
|
|
|
destdir="${build.dir}/META-INF"/>
|
2006-11-17 10:13:45 +07:00
|
|
|
<deploymentdescriptor destdir="${build.dir}/META-INF"/>
|
2008-10-25 05:29:40 +07:00
|
|
|
</ejbdoclet>
|
2006-11-17 10:13:45 +07:00
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- =========================================== -->
|
|
|
|
<!-- Compiles the source code -->
|
|
|
|
<!-- =========================================== -->
|
|
|
|
<target name="adempiereRootCompile" depends="adempiereRootXdoclet">
|
|
|
|
<mkdir dir="${build.classes.dir}"/>
|
|
|
|
|
2007-05-12 00:52:58 +07:00
|
|
|
<!-- Compile interface -->
|
2006-11-17 10:13:45 +07:00
|
|
|
<javac
|
|
|
|
destdir="${build.classes.dir}"
|
|
|
|
debug="on"
|
|
|
|
deprecation="off"
|
|
|
|
optimize="on"
|
2007-05-12 00:52:58 +07:00
|
|
|
encoding="UTF-8"
|
2006-11-17 10:13:45 +07:00
|
|
|
classpathref="base.path">
|
|
|
|
<src path="${src.interfaces.dir}"/>
|
2007-05-12 00:52:58 +07:00
|
|
|
<include name="org/compiere/interfaces/*"/>
|
|
|
|
</javac>
|
|
|
|
|
|
|
|
<!-- Compile all -->
|
|
|
|
<javac
|
|
|
|
destdir="${build.classes.dir}"
|
|
|
|
debug="on"
|
|
|
|
deprecation="off"
|
|
|
|
optimize="on"
|
|
|
|
classpathref="base.path">
|
|
|
|
<src path="${src.ejb.dir}"/>
|
2006-11-17 10:13:45 +07:00
|
|
|
<src path="${src.servlet.dir}"/>
|
|
|
|
<src path="${src.server.dir}"/>
|
|
|
|
</javac>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- =========================================== -->
|
|
|
|
<!-- Creates the jar archives -->
|
|
|
|
<!-- =========================================== -->
|
|
|
|
<target name="adempiereRootJar" depends="adempiereRootCompile">
|
|
|
|
<mkdir dir="${build.deploy.dir}"/>
|
|
|
|
|
|
|
|
<!-- Jar -->
|
|
|
|
<jar
|
|
|
|
jarfile="${build.deploy.dir}/adempiereRoot.jar">
|
|
|
|
<fileset
|
|
|
|
dir="${build.classes.dir}">
|
|
|
|
</fileset>
|
|
|
|
<fileset
|
|
|
|
dir="${build.dir}"
|
|
|
|
includes="META-INF/**">
|
|
|
|
</fileset>
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Specification-Title" value="AdempiereRoot"/>
|
|
|
|
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/>
|
|
|
|
<attribute name="Specification-Vendor" value="Adempiere"/>
|
|
|
|
<attribute name="Implementation-Title" value="AdempiereRoot ${env.ADEMPIERE_VERSION}"/>
|
|
|
|
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
|
|
|
|
<attribute name="Implementation-URL" value="http://www.adempiere.com"/>
|
|
|
|
<attribute name="Class-Path" value="Adempiere.jar AdempiereSLib.jar"/>
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- =========================================== -->
|
|
|
|
<!-- Creates the war archives -->
|
|
|
|
<!-- =========================================== -->
|
|
|
|
<target name="adempiereRootWar" depends="adempiereRootJar">
|
|
|
|
<war
|
|
|
|
warfile="${build.deploy.dir}/adempiereRootBase.war"
|
|
|
|
webxml="${src.web.dir}/WEB-INF/web.xml">
|
|
|
|
<!-- copy from web -->
|
|
|
|
<fileset dir="${src.web.dir}" excludes="**/web.xml,**/lib/**,**/classes/**"/>
|
|
|
|
<!-- WEB-INF/lib -->
|
|
|
|
<lib dir="${src.web.dir}/WEB-INF/lib"/>
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Specification-Title" value="AdempiereRootWar"/>
|
|
|
|
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/>
|
|
|
|
<attribute name="Specification-Vendor" value="Adempiere"/>
|
|
|
|
<attribute name="Implementation-Title" value="AdempiereRootWar ${env.ADEMPIERE_VERSION}"/>
|
|
|
|
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
|
|
|
|
<attribute name="Implementation-URL" value="http://www.adempiere.com"/>
|
|
|
|
<attribute name="Class-Path" value="Adempiere.jar AdempiereSLib.jar"/>
|
|
|
|
</manifest>
|
|
|
|
</war>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- =========================================== -->
|
|
|
|
<!-- Deploy Server Files -->
|
|
|
|
<!-- =========================================== -->
|
2007-05-12 00:52:58 +07:00
|
|
|
<target name="adempiereRootDeployServer" depends="adempiereRootJar,adempiereRootWar,adempiereRootCompile">
|
2006-11-17 10:13:45 +07:00
|
|
|
<copy todir="../lib">
|
|
|
|
<fileset dir="${build.deploy.dir}"/>
|
|
|
|
</copy>
|
|
|
|
<copy file="${src.ear.dir}/application.xml"
|
|
|
|
tofile="../lib/adempiereRoot.xml"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- =========================================== -->
|
|
|
|
<!-- Creates the binary structure -->
|
|
|
|
<!-- =========================================== -->
|
|
|
|
<target name="main" depends="adempiereRootDeployServer">
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- =========================================== -->
|
|
|
|
<!-- Cleans up the current build -->
|
|
|
|
<!-- =========================================== -->
|
|
|
|
<target name="clean">
|
2007-01-30 16:06:53 +07:00
|
|
|
<delete dir="${build.dir}" failonerror="false"/>
|
2007-02-16 05:37:20 +07:00
|
|
|
<delete file="../lib/adempiereRootBase.war"/>
|
|
|
|
<delete file="../lib/adempiereRoot.jar"/>
|
2007-02-16 06:08:12 +07:00
|
|
|
<delete file="../lib/adempiereRoot.xml"/>
|
2006-11-17 10:13:45 +07:00
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|