src-wad/build.xml
author Martin Taal <martin.taal@openbravo.com>
Mon, 08 Jun 2009 13:49:27 +0200
changeset 3981 e4caff5b5554
parent 2870 457064949d41
child 6115 cad2215b1629
permissions -rw-r--r--
fixes issue 9375: OBContext is not stored in session in case of login through REST
carlos@0
     1
<?xml version="1.0" encoding="UTF-8" ?>
carlos@0
     2
<!--
carlos@0
     3
 *************************************************************************
carlos@0
     4
 * The contents of this file are subject to the Openbravo Public License 
carlos@0
     5
 * Version 1.1 (the "License"), being the Mozilla Public License 
carlos@0
     6
 * version 1.1  with a permitted attribution clause ; you may not use 
carlos@0
     7
 * this file except in compliance with the License. 
carlos@0
     8
 * You may obtain a copy of the License at  
carlos@0
     9
 * http://www.openbravo.com/legal/license.txt 
carlos@0
    10
 * Software distributed under the License is distributed on an 
carlos@0
    11
 * "AS IS" basis, WITHOUT WARRANTY OF  ANY KIND, either express or 
carlos@0
    12
 * implied. See the License for the specific language governing rights 
carlos@0
    13
 * and  limitations under the License. 
carlos@0
    14
 * The Original Code is Openbravo ERP. 
carlos@1471
    15
 * The Initial Developer of the Original Code is Openbravo SL 
carlos@1337
    16
 * All portions are Copyright (C) 2005-2008 Openbravo SL 
carlos@0
    17
 * All Rights Reserved. 
carlos@0
    18
 * Contributor(s): Openbravo S.L.
carlos@0
    19
 ************************************************************************
juanpablo@213
    20
-->
juanpablo@213
    21
<!--
juanpablo@213
    22
List of targets:
juanpablo@213
    23
juanpablo@213
    24
init: creates the needed folders.
juanpablo@213
    25
clean: removes all the created files and folders.
juanpablo@213
    26
sqlc: generates java files from xsql's files.
juanpablo@213
    27
compileSqlc: compile the java files generated from xsql's files.
juanpablo@213
    28
compile: compile the java files of the project.
juanpablo@213
    29
build.jar: generates the jar file in the lib folder.
juanpablo@213
    30
build: compile the project, including the xsql's files and generates the jar and doc.
fernando@204
    31
doc: generates the api for the project.
carlos@0
    32
-->
carlos@0
    33
<project name="openbravo-wad" default="compile" basedir=".">
martin@2870
    34
  <property name="build.wad" value="${basedir}/build/classes" />
martin@2870
    35
  <property name="build.wad.docs" value="${basedir}/docs" />
martin@2870
    36
  <property name="build.wad.sqlc" value="${basedir}/build/javasqlc" />
martin@2870
    37
  <property name="build.wad.src" value="${basedir}/src" />
juanpablo@213
    38
carlos@0
    39
  <path id="wad.class.path">
martin@2870
    40
    <pathelement path="../src-core/build/classes" />
jordi@1711
    41
    <fileset dir="${base.lib}">
martin@2870
    42
      <include name="**/*.jar" />
carlos@0
    43
    </fileset>
juanpablo@213
    44
  </path>
carlos@0
    45
carlos@0
    46
  <target name="init">
martin@2870
    47
    <mkdir dir="${build.wad}" />
martin@2870
    48
    <mkdir dir="${build.wad.docs}" />
martin@2870
    49
    <mkdir dir="${build.wad.sqlc}" />
carlos@0
    50
  </target>
juanpablo@213
    51
carlos@0
    52
  <target name="clean">
martin@2870
    53
    <delete dir="${build.wad}" failonerror="false" includeemptydirs="true" />
martin@2870
    54
    <delete dir="${build.wad.sqlc}" failonerror="false" includeemptydirs="true" />
martin@2870
    55
    <delete dir="${build.wad.docs}" failonerror="false" includeemptydirs="true" />
martin@2870
    56
    <delete failonerror="false" file="${build.wad.lib}/openbravo-wad.jar" />
carlos@0
    57
  </target>
carlos@0
    58
carlos@0
    59
  <target name="sqlc" depends="init">
carlos@0
    60
    <java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
martin@2870
    61
      <arg line="'${base.config}'/Openbravo.properties .xsql ./src/org '${build.wad.sqlc}'" />
martin@2870
    62
      <classpath refid="wad.class.path" />
carlos@0
    63
    </java>
carlos@0
    64
  </target>
carlos@0
    65
carlos@0
    66
  <target name="compileSqlc" depends="sqlc">
asier@1929
    67
    <javac srcdir="${build.wad.sqlc}/src" destdir="${build.wad}" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
martin@2870
    68
      <classpath refid="wad.class.path" />
carlos@0
    69
    </javac>
carlos@0
    70
  </target>
carlos@0
    71
martin@2870
    72
  <target name="compile" depends="compileSqlc">
asier@1929
    73
    <javac srcdir="${build.wad.src}" destdir="${build.wad}" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
martin@2870
    74
      <classpath refid="wad.class.path" />
carlos@0
    75
    </javac>
carlos@0
    76
    <copy todir="${build.wad}" encoding="UTF-8">
martin@2870
    77
      <fileset dir="${build.wad.src}" includes="**/*xml" />
martin@2870
    78
      <fileset dir="${build.wad.src}" includes="**/*html" />
carlos@0
    79
    </copy>
carlos@0
    80
  </target>
juanpablo@213
    81
juanpablo@213
    82
  <target name="build.jar">
carlos@0
    83
    <jar destfile="${build.wad.lib}/openbravo-wad.jar">
martin@2870
    84
      <fileset dir="${build.wad}" />
carlos@0
    85
      <manifest>
martin@2870
    86
        <attribute name="Built-By" value="Openbravo S.L." />
carlos@0
    87
        <!--section name="common/class1.class">
juanpablo@213
    88
        <attribute name="Sealed" value="false"/>
juanpablo@213
    89
      </section-->
martin@2870
    90
      </manifest>
martin@2870
    91
    </jar>
martin@2870
    92
  </target>
carlos@0
    93
martin@2870
    94
  <target name="build" depends="compile, build.jar">
martin@2870
    95
  </target>
juanpablo@213
    96
martin@2870
    97
  <target name="doc" depends="init" description="Generate api">
martin@2870
    98
    <javadoc packagenames="org.openbravo.*" sourcepath="${build.wad.sqlc}/src:${build.wad.src}" destdir="${build.wad.docs}" author="true" version="true" use="true" docencoding="UTF-8" encoding="UTF-8" failonerror="false" windowtitle="${ant.project.name}">
martin@2870
    99
      <classpath refid="wad.class.path" />
martin@2870
   100
    </javadoc>
martin@2870
   101
  </target>
carlos@0
   102
</project>