src-core/build.xml
author Fernando Iriazabal <fernando.iriazabal@openbravo.com>
Mon, 10 Dec 2007 15:18:49 +0000
changeset 206 40bee6d93a42
parent 0 0247c26f10c6
child 213 7bc683ea98e9
permissions -rw-r--r--
Comments on build.xml
carlos@0
     1
<?xml version="1.0" encoding="UTF-8" ?>
carlos@0
     2
<!--
carlos@0
     3
************************************************************************************
carlos@0
     4
* Copyright (C) 2001-2006 Openbravo S.L.
carlos@0
     5
* Licensed under the Apache Software License version 2.0
carlos@0
     6
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
carlos@0
     7
* Unless required by applicable law or agreed to  in writing,  software  distributed
carlos@0
     8
* under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR
carlos@0
     9
* CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  for  the
carlos@0
    10
* specific language governing permissions and limitations under the License.
carlos@0
    11
************************************************************************************
fernando@206
    12
-->
fernando@206
    13
fernando@206
    14
<!--
fernando@206
    15
List of targets:
fernando@206
    16
fernando@206
    17
init: creates all the needed folders.
fernando@206
    18
clean: removes all the files and folders.
fernando@206
    19
compile: compile the java files of the project.
fernando@206
    20
build.jar: generates the jar file in the lib folder.
fernando@206
    21
build: compile the project and generates the jar and doc.
fernando@206
    22
doc: generates the api for the project.
carlos@0
    23
-->
carlos@0
    24
<project default="compile" basedir="." name="openbravo-core">
carlos@0
    25
  <property name="build.core" value="${basedir}/build/classes"/>
carlos@0
    26
  <property name="build.core.docs" value="${basedir}/docs"/>
carlos@0
    27
  <property name="build.core.src" value="${basedir}/src"/>
carlos@0
    28
 
carlos@0
    29
  <path id="core.class.path">
carlos@0
    30
    <fileset dir="${build.core.lib}">
carlos@0
    31
      <include name="**/*.jar"/>
carlos@0
    32
    </fileset>
carlos@0
    33
  </path>   
carlos@0
    34
    
carlos@0
    35
  <target name="init">
carlos@0
    36
    <mkdir dir="${build.core}"/>
carlos@0
    37
    <mkdir dir="${build.core.docs}"/>
carlos@0
    38
  </target>
carlos@0
    39
carlos@0
    40
  <target name="clean">
carlos@0
    41
    <delete dir="${build.core}" failonerror="false" includeemptydirs="true"/>
carlos@0
    42
    <delete dir="${build.core.docs}" failonerror="false" includeemptydirs="true"/>
carlos@0
    43
    <delete failonerror="false" file="${build.core.lib}/openbravo-core.jar"/>
carlos@0
    44
  </target>
carlos@0
    45
carlos@0
    46
  <target name="compile" depends="clean, init">
carlos@0
    47
    <javac srcdir="${build.core.src}" destdir="${build.core}" deprecation="on" encoding="UTF-8" debug="${debug.level}">
carlos@0
    48
      <classpath refid="core.class.path"/>  
carlos@0
    49
    </javac>
carlos@0
    50
  </target>
carlos@0
    51
carlos@0
    52
  <target name="build.jar">
carlos@0
    53
    <jar destfile="${build.core.lib}/openbravo-core.jar">
carlos@0
    54
      <fileset dir="${build.core}"/>
carlos@0
    55
      <manifest>
carlos@0
    56
        <attribute name="Built-By" value="Openbravo S.L."/>
carlos@0
    57
          <!--section name="common/class1.class">
carlos@0
    58
          <attribute name="Sealed" value="false"/>
carlos@0
    59
        </section-->
carlos@0
    60
      </manifest>
carlos@0
    61
    </jar> 
carlos@0
    62
  </target>
carlos@0
    63
carlos@0
    64
  <target name="build" depends="compile, doc, build.jar">
carlos@0
    65
  </target>
carlos@0
    66
carlos@0
    67
<target name="doc" depends="init" description="Generate api">
carlos@0
    68
  <javadoc packagenames="org.openbravo.*" 
carlos@0
    69
    sourcepath="${build.core.src}"
carlos@0
    70
    destdir="${build.core.docs}"
carlos@0
    71
    author="true"
carlos@0
    72
    version="true"
carlos@0
    73
    use="true"
carlos@0
    74
    docencoding="UTF-8"
carlos@0
    75
    encoding="UTF-8"
carlos@0
    76
    failonerror="false"
carlos@0
    77
    windowtitle="${ant.project.name}">
carlos@0
    78
    <classpath refid="core.class.path"/>
carlos@0
    79
  </javadoc>
carlos@0
    80
</target>
carlos@0
    81
</project>