src-util/diagnostic/build-create.xml
author Antonio Moreno <antonio.moreno@openbravo.com>
Tue, 30 Mar 2010 19:20:38 +0200
changeset 6901 43a7191bdeb6
parent 6886 60a98816806d
child 9072 79e55dfc8af0
permissions -rw-r--r--
[validation] Corrected build.xml
<?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 SLU
* All portions are Copyright (C) 2008 Openbravo SLU
* All Rights Reserved.
* Contributor(s):  ______________________________________.
************************************************************************
-->
<project name="openbravo-diagnostics-build" basedir="." default="build">

  <path id="diagnostic.class.path">
    <fileset dir="WebContent/WEB-INF/lib">
      <include name="**/*.jar" />
    </fileset>
  </path>

  <target name="build" depends="clean">
    <copy todir="WebContent/WEB-INF/lib">
      <fileset dir="../../lib/runtime">
        <include name="**/*.jar" />
      </fileset>
    </copy>
    <javac srcdir="src" destdir="build/classes" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" deprecation="on">
      <classpath refid="diagnostic.class.path" />
    </javac>
  </target>

  <target name="clean">
    <delete failonerror="false">
      <fileset dir="WebContent/WEB-INF/lib" />
      <fileset dir="build/classes" />
    </delete>
    <mkdir dir="WebContent/WEB-INF/lib" />
    <mkdir dir="build/classes" />
    <copy file="../../config/Openbravo.properties" todir="config" failonerror="false" />
    <copy todir="WebContent/WEB-INF">
      <fileset dir="config" />
    </copy>
  </target>

  <target name="war">
    <delete failonerror="false" file="lib/OpenbravoDiagnostics.war" />
    <war compress="true" destfile="OpenbravoDiagnostics.war" encoding="UTF-8" webxml="WebContent/WEB-INF/web.xml">
      <zipfileset dir="WebContent">
        <exclude name="**/WEB-INF/web.xml" />
        <exclude name="**/WEB-INF/lib/servlet-api.jar" />
      </zipfileset>
      <classes dir="build/classes" />
    </war>
  </target>
</project>