src-trl/build.xml
author Adrián Romero <adrian.romero@openbravo.com>
Tue, 20 Nov 2007 16:27:14 +0000
changeset 94 4e7ba7b8a4ad
parent 41 5e565c858353
child 205 b235b3cfbfa9
permissions -rw-r--r--
fix: Changed check constraint names and foreign key names to fit in to
30 characteres.
<?xml version="1.0" encoding="UTF-8" ?>
<!--
 *************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at http://www.openbravo.com/legal/license.html 
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License. 
 * The Original Code is Openbravo ERP. 
 * The Initial Developer of the Original Code is Openbravo SL 
 * All portions are Copyright (C) 2001-2006 Openbravo SL 
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
 ************************************************************************
-->
<project default="compile" basedir="." name="openbravo-trl">
  <property name="build.trl" value="${basedir}/build/classes"/>
  <property name="build.trl.docs" value="${basedir}/docs"/>
  <property name="build.trl.sqlc" value="${basedir}/build/javasqlc"/>
  <property name="build.trl.src" value="${basedir}/src"/>
 
  <path id="trl.class.path">
    <pathelement path="../src-core/build/classes"/>
    <fileset dir="${build.trl.lib}">
      <include name="**/*.jar"/>
    </fileset>
  </path>   

  <target name="init">
    <mkdir dir="${build.trl}"/>
    <mkdir dir="${build.trl.sqlc}"/>
    <mkdir dir="${build.trl.docs}"/>
  </target>
  
  <target name="clean">
    <delete dir="${build.trl}" failonerror="false" includeemptydirs="true"/>
    <delete dir="${build.trl.docs}" failonerror="false" includeemptydirs="true"/>
    <delete dir="${build.trl.sqlc}" failonerror="false" includeemptydirs="true"/>
    <delete failonerror="false" file="${build.trl.lib}/openbravo-trl.jar"/>
  </target>

  <target name="sqlc" depends="init">
    <java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
      <arg line="${base.config}/Openbravo.properties .xsql ./src ${build.trl.sqlc}"/>
      <classpath refid="trl.class.path"/>
    </java>
  </target>

  <target name="compileSqlc" depends="sqlc">
    <javac srcdir="${build.trl.sqlc}/src" destdir="${build.trl}" encoding="UTF-8" debug="${debug.level}">
      <classpath refid="trl.class.path"/>
    </javac>
  </target>

  <target name="compile" depends="clean, compileSqlc">
    <javac srcdir="${build.trl.src}" destdir="${build.trl}" deprecation="on" encoding="UTF-8" debug="${debug.level}">
      <classpath refid="trl.class.path"/>  
    </javac>
  </target>

  <target name="build.jar">
    <jar destfile="${build.trl.lib}/openbravo-trl.jar">
      <fileset dir="${build.trl}"/>
      <manifest>
        <attribute name="Built-By" value="Openbravo S.L."/>
        <!--section name="common/class1.class">
          <attribute name="Sealed" value="false"/>
        </section-->
      </manifest>
    </jar>
  </target>
 
  <target name="build" depends="compile, doc, build.jar">
  </target>
  
  <target name="doc" depends="init" description="Generate api">
    <javadoc packagenames="org.openbravo.*" 
           sourcepath="${build.trl.sqlc}/src:${build.trl.src}"
           destdir="${build.trl.docs}"
           author="true"
           version="true"
           use="true"
           docencoding="UTF-8"
           encoding="UTF-8"
           failonerror="false"
           windowtitle="${ant.project.name}">
      <classpath refid="trl.class.path"/>
    </javadoc>
  </target>
</project>