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@6702
|
15 |
* The Initial Developer of the Original Code is Openbravo SLU
|
antonio@7592
|
16 |
* All portions are Copyright (C) 2005-2010 Openbravo SLU
|
carlos@0
|
17 |
* All Rights Reserved.
|
ggi@6702
|
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@6158
|
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}">
|
martin@2870
|
62 |
<arg line="'${base.config}'/Openbravo.properties .xsql ./src/org '${build.wad.sqlc}'" />
|
martin@2870
|
63 |
<classpath refid="wad.class.path" />
|
antonio@7592
|
64 |
<syspropertyset>
|
antonio@7592
|
65 |
<propertyref name="java.security.egd" />
|
antonio@7592
|
66 |
</syspropertyset>
|
carlos@0
|
67 |
</java>
|
asier@6121
|
68 |
|
asier@6121
|
69 |
<java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
|
asier@6121
|
70 |
<arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.wad.sqlc}'/src */src-wad" />
|
asier@6121
|
71 |
<classpath refid="wad.class.path" />
|
antonio@7592
|
72 |
<syspropertyset>
|
antonio@7592
|
73 |
<propertyref name="java.security.egd" />
|
antonio@7592
|
74 |
</syspropertyset>
|
asier@6121
|
75 |
</java>
|
carlos@0
|
76 |
</target>
|
carlos@0
|
77 |
|
carlos@0
|
78 |
<target name="compileSqlc" depends="sqlc">
|
antonio@7480
|
79 |
<javac srcdir="${build.wad.sqlc}/src" includes="**/*.java" destdir="${build.wad}" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" fork="true" >
|
martin@2870
|
80 |
<classpath refid="wad.class.path" />
|
carlos@0
|
81 |
</javac>
|
carlos@0
|
82 |
</target>
|
carlos@0
|
83 |
|
martin@2870
|
84 |
<target name="compile" depends="compileSqlc">
|
antonio@7480
|
85 |
<javac srcdir="${main.dir}" includes="src-wad/src/**/*.java,modules/*/src-wad/**/*.java" destdir="${build.wad}" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" fork="true" >
|
martin@2870
|
86 |
<classpath refid="wad.class.path" />
|
carlos@0
|
87 |
</javac>
|
carlos@0
|
88 |
<copy todir="${build.wad}" encoding="UTF-8">
|
martin@2870
|
89 |
<fileset dir="${build.wad.src}" includes="**/*xml" />
|
martin@2870
|
90 |
<fileset dir="${build.wad.src}" includes="**/*html" />
|
carlos@0
|
91 |
</copy>
|
martin@6158
|
92 |
<copy todir="${build.wad}" encoding="UTF-8">
|
martin@6158
|
93 |
<fileset dir="${base.modules}">
|
martin@6158
|
94 |
<include name="*/src-wad/**/*" />
|
martin@6158
|
95 |
<exclude name="*/src-wad/**/*.java" />
|
martin@6158
|
96 |
<exclude name="*/src-wad/**/*.xsql" />
|
martin@6158
|
97 |
</fileset>
|
martin@6158
|
98 |
<mapper type="regexp" from="(.*\${file.separator}src-wad)(.*)" to="\2" />
|
martin@6158
|
99 |
</copy>
|
carlos@0
|
100 |
</target>
|
juanpablo@213
|
101 |
|
juanpablo@213
|
102 |
<target name="build.jar">
|
carlos@0
|
103 |
<jar destfile="${build.wad.lib}/openbravo-wad.jar">
|
martin@2870
|
104 |
<fileset dir="${build.wad}" />
|
carlos@0
|
105 |
<manifest>
|
ggi@6702
|
106 |
<attribute name="Built-By" value="Openbravo S.L.U." />
|
carlos@0
|
107 |
<!--section name="common/class1.class">
|
juanpablo@213
|
108 |
<attribute name="Sealed" value="false"/>
|
juanpablo@213
|
109 |
</section-->
|
martin@2870
|
110 |
</manifest>
|
martin@2870
|
111 |
</jar>
|
martin@2870
|
112 |
</target>
|
carlos@0
|
113 |
|
martin@2870
|
114 |
<target name="build" depends="compile, build.jar">
|
martin@2870
|
115 |
</target>
|
juanpablo@213
|
116 |
|
martin@2870
|
117 |
<target name="doc" depends="init" description="Generate api">
|
martin@2870
|
118 |
<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
|
119 |
<classpath refid="wad.class.path" />
|
martin@2870
|
120 |
</javadoc>
|
martin@2870
|
121 |
</target>
|
carlos@0
|
122 |
</project>
|