author | David Baz Fayos <david.baz@openbravo.com> |
Fri, 29 May 2015 11:17:43 +0200 | |
changeset 26798 | 535b08878cf7 |
parent 21973 | 7844d93d8b2b |
child 32767 | 8a37ee35c54f |
permissions | -rw-r--r-- |
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. |
ggi@6701 | 15 |
* The Initial Developer of the Original Code is Openbravo SLU |
augusto@21973 | 16 |
* All portions are Copyright (C) 2005-2014 Openbravo SLU |
carlos@0 | 17 |
* All Rights Reserved. |
ggi@6701 | 18 |
* Contributor(s): Openbravo S.L.U. |
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" /> |
martin@6152 | 38 |
<property name="main.dir" value="${basedir}/.." /> |
juanpablo@213 | 39 |
|
carlos@0 | 40 |
<path id="wad.class.path"> |
martin@2870 | 41 |
<pathelement path="../src-core/build/classes" /> |
jordi@1711 | 42 |
<fileset dir="${base.lib}"> |
martin@2870 | 43 |
<include name="**/*.jar" /> |
carlos@0 | 44 |
</fileset> |
juanpablo@213 | 45 |
</path> |
carlos@0 | 46 |
|
carlos@0 | 47 |
<target name="init"> |
martin@2870 | 48 |
<mkdir dir="${build.wad}" /> |
martin@2870 | 49 |
<mkdir dir="${build.wad.docs}" /> |
martin@2870 | 50 |
<mkdir dir="${build.wad.sqlc}" /> |
carlos@0 | 51 |
</target> |
juanpablo@213 | 52 |
|
carlos@0 | 53 |
<target name="clean"> |
martin@2870 | 54 |
<delete dir="${build.wad}" failonerror="false" includeemptydirs="true" /> |
martin@2870 | 55 |
<delete dir="${build.wad.sqlc}" failonerror="false" includeemptydirs="true" /> |
martin@2870 | 56 |
<delete dir="${build.wad.docs}" failonerror="false" includeemptydirs="true" /> |
martin@2870 | 57 |
<delete failonerror="false" file="${build.wad.lib}/openbravo-wad.jar" /> |
carlos@0 | 58 |
</target> |
carlos@0 | 59 |
|
carlos@0 | 60 |
<target name="sqlc" depends="init"> |
carlos@0 | 61 |
<java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}"> |
augusto@21973 | 62 |
<arg line="'${base.config}'/Openbravo.properties .xsql ./src/org '${build.wad.sqlc}' null false" /> |
martin@2870 | 63 |
<classpath refid="wad.class.path" /> |
antonio@7580 | 64 |
<syspropertyset> |
antonio@7580 | 65 |
<propertyref name="java.security.egd" /> |
antonio@7580 | 66 |
</syspropertyset> |
carlos@0 | 67 |
</java> |
asier@6115 | 68 |
|
asier@6115 | 69 |
<java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}"> |
augusto@21973 | 70 |
<arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.wad.sqlc}'/src */src-wad false" /> |
asier@6115 | 71 |
<classpath refid="wad.class.path" /> |
antonio@7580 | 72 |
<syspropertyset> |
antonio@7580 | 73 |
<propertyref name="java.security.egd" /> |
antonio@7580 | 74 |
</syspropertyset> |
asier@6115 | 75 |
</java> |
carlos@0 | 76 |
</target> |
carlos@0 | 77 |
|
carlos@0 | 78 |
<target name="compileSqlc" depends="sqlc"> |
stefan@11995 | 79 |
<javac srcdir="${build.wad.sqlc}/src" includes="**/*.java" destdir="${build.wad}" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" fork="true" includeantruntime="false"> |
martin@2870 | 80 |
<classpath refid="wad.class.path" /> |
carlos@0 | 81 |
</javac> |
carlos@0 | 82 |
</target> |
carlos@0 | 83 |
|
antonio@16420 | 84 |
<path id="my-src-wad-dirs"> |
antonio@16420 | 85 |
<pathelement path="src" /> |
antonio@16420 | 86 |
<dirset dir="../modules"> |
antonio@16423 | 87 |
<include name="*/src-wad" /> |
antonio@16420 | 88 |
</dirset> |
antonio@16420 | 89 |
</path> |
antonio@16420 | 90 |
|
martin@2870 | 91 |
<target name="compile" depends="compileSqlc"> |
antonio@16420 | 92 |
<javac destdir="${build.wad}" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" fork="true" includeantruntime="false"> |
antonio@16420 | 93 |
<src refid="my-src-wad-dirs" /> |
martin@2870 | 94 |
<classpath refid="wad.class.path" /> |
carlos@0 | 95 |
</javac> |
antonio@16420 | 96 |
|
carlos@0 | 97 |
<copy todir="${build.wad}" encoding="UTF-8"> |
martin@2870 | 98 |
<fileset dir="${build.wad.src}" includes="**/*xml" /> |
martin@2870 | 99 |
<fileset dir="${build.wad.src}" includes="**/*html" /> |
carlos@0 | 100 |
</copy> |
martin@6152 | 101 |
<copy todir="${build.wad}" encoding="UTF-8"> |
martin@6152 | 102 |
<fileset dir="${base.modules}"> |
martin@6152 | 103 |
<include name="*/src-wad/**/*" /> |
martin@6152 | 104 |
<exclude name="*/src-wad/**/*.java" /> |
martin@6152 | 105 |
<exclude name="*/src-wad/**/*.xsql" /> |
martin@6152 | 106 |
</fileset> |
martin@6152 | 107 |
<mapper type="regexp" from="(.*\${file.separator}src-wad)(.*)" to="\2" /> |
martin@6152 | 108 |
</copy> |
carlos@0 | 109 |
</target> |
juanpablo@213 | 110 |
|
juanpablo@213 | 111 |
<target name="build.jar"> |
carlos@0 | 112 |
<jar destfile="${build.wad.lib}/openbravo-wad.jar"> |
martin@2870 | 113 |
<fileset dir="${build.wad}" /> |
carlos@0 | 114 |
<manifest> |
ggi@6701 | 115 |
<attribute name="Built-By" value="Openbravo S.L.U." /> |
carlos@0 | 116 |
<!--section name="common/class1.class"> |
juanpablo@213 | 117 |
<attribute name="Sealed" value="false"/> |
juanpablo@213 | 118 |
</section--> |
martin@2870 | 119 |
</manifest> |
martin@2870 | 120 |
</jar> |
martin@2870 | 121 |
</target> |
carlos@0 | 122 |
|
martin@2870 | 123 |
<target name="build" depends="compile, build.jar"> |
martin@2870 | 124 |
</target> |
juanpablo@213 | 125 |
|
martin@2870 | 126 |
<target name="doc" depends="init" description="Generate api"> |
martin@2870 | 127 |
<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 | 128 |
<classpath refid="wad.class.path" /> |
martin@2870 | 129 |
</javadoc> |
martin@2870 | 130 |
</target> |
carlos@0 | 131 |
</project> |