Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 198 lines (183 sloc) 7.274 kb
7582569 @eigood The build.xml files are now much smaller and simpler; they reuse a
eigood authored
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Licensed to the Apache Software Foundation (ASF) under one
4 or more contributor license agreements. See the NOTICE file
5 distributed with this work for additional information
6 regarding copyright ownership. The ASF licenses this file
7 to you under the Apache License, Version 2.0 (the
8 "License"); you may not use this file except in compliance
9 with the License. You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing,
14 software distributed under the License is distributed on an
15 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 KIND, either express or implied. See the License for the
17 specific language governing permissions and limitations
18 under the License.
19 -->
8907c57 @eigood Slight tweak, so that ofbiz.home.dir is defined by macros.xml, so it
eigood authored
20 <project name="Ant - Macros">
acf6d75 @JacquesLeRoux A Jacopo's patch
JacquesLeRoux authored
21 <property name="minimumantversion" value="1.9.0"/>
22
23 <antversion property="antversion" atleast="${minimumantversion}"/>
24 <fail unless="antversion" message="Please upgrade ant to at least ${minimumantversion}. Current ant version is ${ant.version}"/>
8bbe3c1 @eigood Add an ant version check, to make certain at least 1.7.1 is being used.
eigood authored
25
79f7a0b @adrian-crum Updated build files to use/require Java 7.
adrian-crum authored
26 <condition property="javaatleast17">
c6f7bd1 @eigood FIX: Add a check for java being at least 1.6.
eigood authored
27 <not>
79f7a0b @adrian-crum Updated build files to use/require Java 7.
adrian-crum authored
28 <matches pattern="^1\.[0-6]($|\..*)" string="${ant.java.version}"/>
c6f7bd1 @eigood FIX: Add a check for java being at least 1.6.
eigood authored
29 </not>
30 </condition>
acf6d75 @JacquesLeRoux A Jacopo's patch
JacquesLeRoux authored
31 <fail unless="javaatleast17" message="Please upgrade java to at least 1.7. Current Java version is ${ant.java.version}"/>
c6f7bd1 @eigood FIX: Add a check for java being at least 1.6.
eigood authored
32
8907c57 @eigood Slight tweak, so that ofbiz.home.dir is defined by macros.xml, so it
eigood authored
33 <dirname property="ofbiz.home.dir" file="${ant.file.Ant - Macros}"/>
7582569 @eigood The build.xml files are now much smaller and simpler; they reuse a
eigood authored
34 <macrodef name="iterate">
35 <attribute name="filelist" default="subdirs"/>
36 <attribute name="target" default=""/>
37 <attribute name="inheritall" default="false"/>
38 <sequential>
39 <subant target="@{target}" inheritall="@{inheritall}">
40 <filelist refid="@{filelist}"/>
41 </subant>
42 </sequential>
43 </macrodef>
44
2afa986 @eigood Use pattern sets in <javac/>, to include/exclude files, and modify
eigood authored
45 <patternset id="src.inc.set">
46 <include name="**/*.java"/>
47 </patternset>
48 <patternset id="src.exc.set"/>
ec47511 @eigood Finish feature integration; the ofbiz-jjtree task now works.
eigood authored
49
054b566 @eigood Define a groovy classpath, for use by <script> and <scriptdef>.
eigood authored
50 <path id="groovy.class.path">
9201534 @eigood Fix groovy.class.path, and define groovyc taskdef and default-groovyc
eigood authored
51 <pathelement location="${ofbiz.home.dir}/framework/base/lib/commons/commons-cli-1.0.jar"/>
52 <pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/antlr-2.7.6.jar"/>
53 <pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/asm-3.2.jar"/>
cb47067 @jacopoc Upgrade to the latest official major version of Groovy: 2.2.1
jacopoc authored
54 <pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/groovy-all-2.2.1.jar"/>
78c16f2 @eigood Make it work with clean global ant. Now both ./ant and a system
eigood authored
55 </path>
36d6870 @eigood Use a script instead of a class for <if>; no longer have to compile anyt...
eigood authored
56 <path id="rhino.class.path">
57 <pathelement location="${ofbiz.home.dir}/extension/rhino/lib/js-1.7.R1.jar"/>
58 </path>
290e17e @eigood Add a target for per-component quick testing. Can only deal with tests
eigood authored
59 <path id="junit.class.path">
60 <fileset dir="${ofbiz.home.dir}/framework/base/lib/scripting/" includes="*.jar"/>
d73085c @eigood Upgrade ant to 1.7.1.
eigood authored
61 <pathelement location="${ofbiz.home.dir}/framework/base/lib/ant/ant-apache-bsf-1.7.1.jar"/>
290e17e @eigood Add a target for per-component quick testing. Can only deal with tests
eigood authored
62 </path>
f64dba1 @eigood Fix detection of cobertura, for compilation of the hook used by the
eigood authored
63 <path id="cobertura.class.path">
64 <pathelement location="${ofbiz.home.dir}/framework/base/lib/cobertura-1.9.4.1.jar" />
65 <pathelement location="${ofbiz.home.dir}/framework/base/lib/log4j-1.2.17.jar" />
66 <pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/asm-3.2.jar" />
67 <pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/jakarta-oro-2.0.8.jar" />
68 </path>
b1f2c26 @eigood Another minor optimization; no longer need to specify classpathref in
eigood authored
69 <path id="local.class.path"/>
7582569 @eigood The build.xml files are now much smaller and simpler; they reuse a
eigood authored
70 <presetdef name="default-javac">
2afa986 @eigood Use pattern sets in <javac/>, to include/exclude files, and modify
eigood authored
71 <javac debug="on" deprecation="on" destdir="${build.dir}/classes" srcdir="${src.dir}" classpathref="local.class.path">
72 <patternset refid="src.inc.set"/>
73 <patternset refid="src.exc.set"/>
74 </javac>
7582569 @eigood The build.xml files are now much smaller and simpler; they reuse a
eigood authored
75 </presetdef>
76
79f7a0b @adrian-crum Updated build files to use/require Java 7.
adrian-crum authored
77 <presetdef name="javac17">
78 <default-javac compiler="javac1.7" target="1.7" source="1.7" encoding="UTF-8" includeantruntime="false">
7e0f4f3 @JacquesLeRoux Add -Xlint:-path to javac16 target
JacquesLeRoux authored
79 <compilerarg value="-Xlint:-path"/>
201c831 @eigood BUILD: Added an -X:lint:unchecked line, uncommented. This line should b...
eigood authored
80 <!--
81 Please leave this line here. It makes it easier to enable/disable it.
82 <compilerarg value="-Xlint:unchecked"/>
83 -->
689f7e4 @eigood Add a java16 preset def.
eigood authored
84 </default-javac>
85 </presetdef>
86
44f7103 @eigood Add a default-javadoc presetdef.
eigood authored
87 <presetdef name="default-javadoc">
1b549f1 Made working correctly ant build target docs and docs-all for javadoc do...
Marco Risaliti authored
88 <javadoc classpathref="local.class.path"
89 destdir="${build.dir}/javadocs"
50fe1a8 @adrian-crum Updated JavaDocs project title.
adrian-crum authored
90 windowtitle="Apache Open for Business - ${desc}"
1b549f1 Made working correctly ant build target docs and docs-all for javadoc do...
Marco Risaliti authored
91 useexternalfile="yes"
e83d99a Try increasing the maxmemory parameter for javadoc build as suggested by...
Marco Risaliti authored
92 maxmemory="512M"
1b549f1 Made working correctly ant build target docs and docs-all for javadoc do...
Marco Risaliti authored
93 encoding="UTF-8"
94 packagenames="org.ofbiz.*">
95 <fileset dir="${basedir}" defaultexcludes="yes">
96 <include name="**/*.java"/>
97 <exclude name="**/ControlApplet.java"/>
98 <exclude name="**/ShipmentScaleApplet.java"/>
99 <exclude name="**/test/"/>
100 <exclude name="**/cybersource/"/>
101 <exclude name="**/PayPalServices.java"/>
102 <exclude name="**/ideal/"/>
103 <exclude name="**/orbital/"/>
104 <exclude name="**/securepay/"/>
105 <exclude name="**/verisign/"/>
106 <exclude name="**/JREntityListIteratorDataSource.java"/>
107 <exclude name="**/JRMapCollectionDataSource.java"/>
108 <exclude name="**/openoffice/"/>
109 <exclude name="**/JasperReportsXmlViewHandler.java"/>
110 <exclude name="**/JasperReportsJXlsViewHandler.java"/>
111 <exclude name="**/JasperReportsPoiXlsViewHandler.java"/>
112 </fileset>
e844d75 @jacopoc Some minor changes for r.1605524: Updated build files to use/require Jav...
jacopoc authored
113 <link href="http://java.sun.com/javase/7/docs/api/" offline="true" packagelistLoc="${ofbiz.home.dir}/tools/api-java17"/>
1b549f1 Made working correctly ant build target docs and docs-all for javadoc do...
Marco Risaliti authored
114 </javadoc>
44f7103 @eigood Add a default-javadoc presetdef.
eigood authored
115 </presetdef>
116
b50989a @eigood Create a main-jar macro.
eigood authored
117 <macrodef name="main-jar">
118 <attribute name="jarfile" default="${build.dir}/lib/${name}.jar"/>
119 <element name="main-pattern" optional="true"/>
120 <element name="main-elements" optional="true"/>
121 <sequential>
122 <jar jarfile="@{jarfile}">
123 <fileset dir="${build.dir}/classes">
6f1f984 @eigood Add <test-jar> macro.
eigood authored
124 <exclude name="**/test"/>
125 <exclude name="**/test/*"/>
b50989a @eigood Create a main-jar macro.
eigood authored
126 <main-pattern/>
127 </fileset>
128 <fileset dir="${src.extra.dir}">
6f1f984 @eigood Add <test-jar> macro.
eigood authored
129 <and>
130 <not>
131 <or>
132 <filename name="**/test"/>
133 <filename name="**/test/*"/>
134 </or>
135 </not>
136 <selector refid="src-extra-set"/>
137 </and>
b50989a @eigood Create a main-jar macro.
eigood authored
138 </fileset>
139 <!-- now add the NOTICE and LICENSE files to allow the jar file to be distributed alone -->
140 <zipfileset dir="${ofbiz.home.dir}" prefix="META-INF" includes="NOTICE,LICENSE"/>
141 <main-elements/>
142 </jar>
143 </sequential>
144 </macrodef>
145
6f1f984 @eigood Add <test-jar> macro.
eigood authored
146 <macrodef name="test-jar">
147 <attribute name="jarfile" default="${build.dir}/lib/${name}-test.jar"/>
148 <element name="test-selector" optional="true"/>
149 <element name="test-elements" optional="true"/>
150 <sequential>
151 <jar jarfile="@{jarfile}">
152 <fileset dir="${build.dir}/classes">
153 <or>
154 <filename name="**/test"/>
155 <filename name="**/test/*"/>
156 <test-selector/>
157 </or>
158 </fileset>
159 <fileset dir="${src.dir}">
160 <and>
161 <filename name="**/test/*"/>
162 <or>
163 <test-selector/>
164 <selector refid="src-extra-set"/>
165 </or>
166 </and>
167 </fileset>
168 <zipfileset dir="${ofbiz.home.dir}" prefix="META-INF" includes="NOTICE,LICENSE"/>
169 <test-elements/>
170 </jar>
171 </sequential>
172 </macrodef>
173
9201534 @eigood Fix groovy.class.path, and define groovyc taskdef and default-groovyc
eigood authored
174 <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovy.class.path"/>
175
176 <presetdef name="default-groovyc">
177 <groovyc destdir="${build.dir}/classes" srcdir="${src.dir}">
178 <classpath>
179 <path refid="local.class.path"/>
180 <pathelement path="${build.dir}/classes"/>
181 </classpath>
182 </groovyc>
183 </presetdef>
716c70d @JacquesLeRoux Adds ant-contrib-1.0b3.jar
JacquesLeRoux authored
184 <taskdef resource="net/sf/antcontrib/antlib.xml">
185 <classpath>
186 <pathelement location="${ofbiz.home.dir}/framework/base/lib/ant/ant-contrib-1.0b3.jar"/>
187 </classpath>
188 </taskdef>
0078920 @eigood Add javacc, with support script.
eigood authored
189
bd5fab6 @eigood OPTIMIZE: For all <subant> calls that need to deal with possible
eigood authored
190 <presetdef name="externalsubant">
07bf329 @eigood FEATURE: Export ofbiz.home.dir to external projects, so that they can
eigood authored
191 <subant inheritall="false">
192 <propertyset>
193 <propertyref name="ofbiz.home.dir"/>
194 </propertyset>
195 </subant>
bd5fab6 @eigood OPTIMIZE: For all <subant> calls that need to deal with possible
eigood authored
196 </presetdef>
7582569 @eigood The build.xml files are now much smaller and simpler; they reuse a
eigood authored
197 </project>
Something went wrong with that request. Please try again.