Line 0
Link Here
|
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- |
3 |
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
4 |
|
5 |
Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved. |
6 |
|
7 |
|
8 |
The contents of this file are subject to the terms of either the GNU |
9 |
General Public License Version 2 only ("GPL") or the Common |
10 |
Development and Distribution License("CDDL") (collectively, the |
11 |
"License"). You may not use this file except in compliance with the |
12 |
License. You can obtain a copy of the License at |
13 |
http://www.netbeans.org/cddl-gplv2.html |
14 |
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the |
15 |
specific language governing permissions and limitations under the |
16 |
License. When distributing the software, include this License Header |
17 |
Notice in each file and include the License file at |
18 |
nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this |
19 |
particular file as subject to the "Classpath" exception as provided |
20 |
by Sun in the GPL Version 2 section of the License file that |
21 |
accompanied this code. If applicable, add the following below the |
22 |
License Header, with the fields enclosed by brackets [] replaced by |
23 |
your own identifying information: |
24 |
"Portions Copyrighted [year] [name of copyright owner]" |
25 |
|
26 |
Contributor(s): |
27 |
|
28 |
The Original Software is NetBeans. The Initial Developer of the Original |
29 |
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun |
30 |
Microsystems, Inc. All Rights Reserved. |
31 |
|
32 |
If you wish your version of this file to be governed by only the CDDL |
33 |
or only the GPL Version 2, indicate your decision by adding |
34 |
"[Contributor] elects to include this software in this distribution |
35 |
under the [CDDL or GPL Version 2] license." If you do not indicate a |
36 |
single choice of license, a recipient has the option to distribute |
37 |
your version of this file under either the CDDL, the GPL Version 2 or |
38 |
to extend the choice of license to its licensees as provided above. |
39 |
However, if you add GPL Version 2 code and therefore, elected the GPL |
40 |
Version 2 license, then the option applies only if the new code is |
41 |
made subject to such option by the copyright holder. |
42 |
--> |
43 |
<project name="nbbuild" default="all" basedir="."> |
44 |
|
45 |
<import file="default.xml"/> |
46 |
|
47 |
<!-- To make people happy who want to do `ant clean all': --> |
48 |
<target name="all" depends="build,commit-validation" description="Build the IDE and run basic validation tests."/> |
49 |
|
50 |
<target name="all-nozip" depends="build-nozip,commit-validation" description="Build the IDE (no ZIP file, unpacked) and run basic validation tests."/> |
51 |
|
52 |
<target name="assure-ant"> |
53 |
<condition property="ant.version.is.good"> |
54 |
<!-- this is in 1.6.3 only --> |
55 |
<!-- actually needed for 'executable' attr on <javadoc>, at least --> |
56 |
<available classname="org.apache.tools.ant.types.mappers.FilterMapper"/> |
57 |
</condition> |
58 |
<fail unless="ant.version.is.good"> |
59 |
You need to have ant 1.6.3 at least to build NetBeans. |
60 |
</fail> |
61 |
</target> |
62 |
|
63 |
<target name="bootstrap" |
64 |
description="Bootstrap NetBeans-specific Ant extensions." |
65 |
depends="-jdk-init,-assure-jdk-1.4,assure-ant"> |
66 |
<echo message="Bootstrapping NetBeans-specific Ant extensions..." |
67 |
/> |
68 |
<property name="ant.jar" value="${ant.home}/lib/ant.jar"/> |
69 |
<path id="bootstrap-cp"> |
70 |
<pathelement location="${ant.jar}"/> |
71 |
<fileset dir=".."> |
72 |
<!-- For JavaHelp indexing: --> |
73 |
<include name="nbbuild/external/jhall*.jar"/> |
74 |
</fileset> |
75 |
</path> |
76 |
<!-- Sanity check: --> |
77 |
<pathconvert pathsep=":" property="class.files.in.antsrc"> |
78 |
<path> |
79 |
<fileset dir="antsrc"> |
80 |
<include name="**/*.class"/> |
81 |
</fileset> |
82 |
</path> |
83 |
</pathconvert> |
84 |
<fail> |
85 |
<condition> |
86 |
<not> |
87 |
<equals arg1="${class.files.in.antsrc}" arg2=""/> |
88 |
</not> |
89 |
</condition> |
90 |
You have stray *.class files in ${basedir}/antsrc which you must remove. |
91 |
Probably you failed to clean your sources before updating them from CVS. |
92 |
</fail> |
93 |
<!-- OK, continue: --> |
94 |
<mkdir dir="build/antclasses"/> |
95 |
<javac srcdir="antsrc" destdir="build/antclasses" deprecation="true" debug="${build.compiler.debug}" source="1.4"> |
96 |
<classpath refid="bootstrap-cp"/> |
97 |
</javac> |
98 |
<jar jarfile="nbantext.jar"> |
99 |
<fileset dir="build/antclasses"/> |
100 |
<fileset dir="antsrc"> |
101 |
<exclude name="**/*.java"/> |
102 |
<exclude name="**/package.html"/> |
103 |
<exclude name="package-list"/> |
104 |
</fileset> |
105 |
</jar> |
106 |
</target> |
107 |
|
108 |
<target name="init-module-list" depends="bootstrap"> |
109 |
<!-- Define modules. --> |
110 |
<resolve name="modules" value="config.modules.${moduleconfig}"/> |
111 |
<resolve name="fixedmodules" value="config.fixedmodules.${moduleconfig}"/> |
112 |
<property name="allmodules" value="${fixedmodules},${modules}"/> |
113 |
</target> |
114 |
|
115 |
<target name="set-buildnumber" unless="buildnumber"> |
116 |
<tstamp> |
117 |
<format property="buildnumber" pattern="yyMMdd"/> |
118 |
</tstamp> |
119 |
<tstamp> |
120 |
<format property="buildday" pattern="d MMM yyyy" locale="en" /> |
121 |
</tstamp> |
122 |
</target> |
123 |
|
124 |
<target name="init" depends="init-module-list,set-buildnumber,init-tasks"> |
125 |
<taskdef name="cleanall" classname="org.netbeans.nbbuild.CleanAll" classpath="nbantext.jar"/> |
126 |
<taskdef name="nbmerge" classname="org.netbeans.nbbuild.NbMerge" classpath="nbantext.jar"/> |
127 |
<taskdef name="for-each" classname="org.netbeans.nbbuild.ForEach" classpath="nbantext.jar"/> |
128 |
<taskdef name="getdependsclusters" classname="org.netbeans.nbbuild.GetDependsClusters" classpath="nbantext.jar"/> |
129 |
<taskdef name="repeat" classname="org.netbeans.nbbuild.Repeat" classpath="nbantext.jar"/> |
130 |
|
131 |
<!-- We need absolute path to ${netbeans.dest} --> |
132 |
<property name="netbeans.dest.abs" location="${netbeans.dest}"/> |
133 |
<!-- Overridable. Note: need not necessarily be a number at all): --> |
134 |
<property name="buildnum" value="dev-${buildnumber}"/> |
135 |
<property name="sanitystart.args" value="-J-Dnetbeans.close=true ${sanitystart.args.additional}"/> |
136 |
|
137 |
<!-- Set up automatic all-* targets: --> |
138 |
<taskdef name="insert-module-all-targets" classname="org.netbeans.nbbuild.InsertModuleAllTargets" classpath="nbantext.jar"/> |
139 |
<insert-module-all-targets/> |
140 |
</target> |
141 |
|
142 |
<target name="all-java/storagebuilder" depends="init"> |
143 |
<antcall target="build-one-cluster-dependencies" inheritall="false"> |
144 |
<param name="one.cluster.dependencies" value="nb.cluster.platform,nb.cluster.ide"/> |
145 |
<param name="one.cluster.name" value="this-cluster"/> |
146 |
</antcall> |
147 |
<echo message="Building java/storagebuilder library..."/> |
148 |
<ant dir="../java/storagebuilder" target="jar"/> |
149 |
</target> |
150 |
|
151 |
<target name="all-ide/branding" depends="init"> |
152 |
<echo message="Building module ide/branding..."/> |
153 |
<getdependsclusters name="dependsClusters" list="${nb.clusters.list}"/> |
154 |
<antcall target="build-one-cluster-dependencies" inheritAll="false"> |
155 |
<param name="one.cluster.dependencies" value="${dependsClusters}"/> |
156 |
<param name="one.cluster.name" value="this-cluster"/> |
157 |
</antcall> |
158 |
<ant dir="../ide/branding" target="netbeans"/> |
159 |
</target> |
160 |
|
161 |
<target name="all-installer" description="Dummy target for build system compatibility"/> |
162 |
|
163 |
<target name="all-tomcatint/tomcat5/bundled" depends="init"> |
164 |
<getdependsclusters name="dependsClusters" list="${nb.clusters.list}"/> |
165 |
<antcall target="build-one-cluster-dependencies" inheritAll="false"> |
166 |
<param name="one.cluster.dependencies" value="${dependsClusters}"/> |
167 |
<param name="one.cluster.name" value="this-cluster"/> |
168 |
</antcall> |
169 |
<!-- XXX this and xtest are clumsy: <antcall target="all-monitor"/> will not work since the subproject used by antcall does *not* have the synthetic targets! --> |
170 |
<ant dir="../monitor"/> |
171 |
<echo message="Building module tomcatint/tomcat5/bundled..."/> |
172 |
<ant dir="../tomcatint/tomcat5/bundled" target="netbeans"/> |
173 |
</target> |
174 |
|
175 |
<target name="all-translatedfiles" depends="init"> |
176 |
<echo message="Building module translatedfiles..."/> |
177 |
<getdependsclusters name="dependsClusters" list="${nb.clusters.list}"/> |
178 |
<antcall target="build-one-cluster-dependencies" inheritAll="false"> |
179 |
<param |
180 |
name="one.cluster.dependencies" |
181 |
value="${dependsClusters}"/> |
182 |
<param name="one.cluster.name" value="this-cluster"/> |
183 |
</antcall> |
184 |
<ant dir="../translatedfiles" target="netbeans"/> |
185 |
</target> |
186 |
|
187 |
<target name="all-xtest" depends="init"> |
188 |
<getdependsclusters name="dependsClusters" list="${clusters.list}"/> |
189 |
<antcall target="build-one-cluster-dependencies" inheritAll="false"> |
190 |
<param name="one.cluster.dependencies" value="${dependsClusters}"/> |
191 |
<param name="one.cluster.name" value="this-cluster"/> |
192 |
</antcall> |
193 |
<ant dir="../xtest/nbjunit"/> |
194 |
<echo message="Building module xtest..."/> |
195 |
<ant dir="../xtest" antfile="build.xml" target="netbeans"/> |
196 |
</target> |
197 |
|
198 |
<!-- this is project is not a netbeans module project, so we do a no-op |
199 |
here. The code in appsrvbridge gets built by XXX --> |
200 |
<target name="all-serverplugins/sun/appsrvbridge" depends="init"> |
201 |
<echo message="Building module serverplugins/sun/appsrvbridge... NO-OP"/> |
202 |
</target> |
203 |
|
204 |
<!-- build NBMs for selected modules --> |
205 |
<target name="build-nbms" depends="init"> |
206 |
<!-- It's good idea to call merge target before this one. |
207 |
NbMerge.java can set property "modules" to the list of realy |
208 |
built modules (excluding fixedmodules which must build everytime). --> |
209 |
<mkdir dir="nbms" /> |
210 |
<property name="nbm.target.dir" location="nbms" /> |
211 |
<for-each startdir=".." target="nbm" locations="${allmodules}"/> |
212 |
</target> |
213 |
<target name="nbm"/><!-- dummy target --> |
214 |
|
215 |
<property name="jnlp.signjar.keystore" location="build/default.keystore" /> |
216 |
<available property="jnlp.signjar.keystore.exists" file="${jnlp.signjar.keystore}" /> |
217 |
<target name="jnlp-generate-keystore" depends="init" unless="jnlp.signjar.keystore.exists" > |
218 |
<property name="jnlp.signjar.alias" value="jnlp" /> |
219 |
<property name="jnlp.signjar.password" value="netbeans" /> |
220 |
<property name="jnlp.signjar.vendor" value="CN=NetBeans, OU=NetBeans, O=netbeans.org, C=US" /> |
221 |
|
222 |
<mkdir dir="${jnlp.signjar.keystore}/../" /> |
223 |
<echo message="Going to create default keystore in ${jnlp.signjar.keystore}" /> |
224 |
<genkey |
225 |
alias="${jnlp.signjar.alias}" |
226 |
keystore="${jnlp.signjar.keystore}" |
227 |
storepass="${jnlp.signjar.password}" |
228 |
dname="${jnlp.signjar.vendor}" |
229 |
/> |
230 |
</target> |
231 |
|
232 |
<target name="build-jnlp" depends="init,jnlp-generate-keystore"> |
233 |
<fail message="Property jnlp.codebase must be set to final location of your JNLP files!" unless="jnlp.codebase" /> |
234 |
<property name="jnlp.dest.dir" location="build/jnlp" /> |
235 |
<mkdir dir="${jnlp.dest.dir}" /> |
236 |
<for-each startdir=".." target="jnlp" locations="${config.modules.jnlp}"/> |
237 |
</target> |
238 |
|
239 |
<target name="set-config-to-javadoc" > |
240 |
<property name="moduleconfig" value="javadoc" /> |
241 |
</target> |
242 |
|
243 |
<!-- build javadoc for selected modules --> |
244 |
<target name="build-javadoc" depends="set-config-to-javadoc,init" description="Builds Javadoc documentation for modules; on branches pass e.g. -Djavadoc.web.root=http://www.netbeans.org/download/release35/javadoc"> |
245 |
<ant dir="." target="merge"> |
246 |
<property name="modules" value="${modules}"/> |
247 |
<property name="fixedmodules" value="${fixedmodules}"/> |
248 |
<property name="merge.dependent.modules" value="true"/> |
249 |
<property name="stop.when.broken.module" value="false"/> |
250 |
</ant> |
251 |
|
252 |
<mkdir dir="build/ModulesExportedInterfaces" /> |
253 |
<property name="export.interfaces" location="build/ModulesExportedInterfaces" /> |
254 |
|
255 |
<mkdir dir="build/APIChanges" /> |
256 |
<property name="export.apichanges" location="build/APIChanges" /> |
257 |
|
258 |
<!-- build javadoc for supported APIs --> |
259 |
<for-each startdir=".." target="javadoc" locations="${fixedmodules}"/> |
260 |
<!-- build javadoc for unsupported APIs --> |
261 |
<for-each startdir=".." target="javadoc" locations="${modules}"/> |
262 |
|
263 |
<antcall inheritall="true" inheritrefs="true" target="javadoc-generate-xml" /> |
264 |
<antcall inheritall="true" inheritrefs="true" target="javadoc-generate-html" /> |
265 |
<antcall inheritall="true" inheritrefs="true" target="javadoc-check-broken-links" /> |
266 |
</target> |
267 |
|
268 |
<target name="javadoc-generate-xml" depends="set-config-to-javadoc,init" > |
269 |
<echo file="build/APIChanges/header.gen" ><?xml version="1.0" encoding="UTF-8"?> |
270 |
<changes> |
271 |
</echo> |
272 |
|
273 |
<echo file="build/APIChanges/footer.gen" > |
274 |
</changes> |
275 |
</echo> |
276 |
|
277 |
<concat destfile="${netbeans.javadoc.dir}/apichanges.xml" > |
278 |
<fileset dir="build/APIChanges" includes="header.gen" /> |
279 |
<fileset dir="build/APIChanges" includes="*" excludes="*.gen" /> |
280 |
<fileset dir="build/APIChanges" includes="footer.gen" /> |
281 |
</concat> |
282 |
|
283 |
|
284 |
<echo file="build/ModulesExportedInterfaces/header.gen" ><?xml version="1.0" encoding="UTF-8"?> |
285 |
<apis> |
286 |
</echo> |
287 |
|
288 |
<echo file="build/ModulesExportedInterfaces/footer.gen" > |
289 |
</apis> |
290 |
</echo> |
291 |
|
292 |
<concat destfile="${netbeans.javadoc.dir}/modules.xml" > |
293 |
<fileset dir="build/ModulesExportedInterfaces" includes="header.gen" /> |
294 |
<fileset dir="build/ModulesExportedInterfaces" includes="*" excludes="*.gen" /> |
295 |
<fileset dir="build/ModulesExportedInterfaces" includes="footer.gen" /> |
296 |
</concat> |
297 |
|
298 |
<taskdef |
299 |
name="javadoc-index" |
300 |
classpath="nbantext.jar" |
301 |
classname="org.netbeans.nbbuild.JavadocIndex" |
302 |
/> |
303 |
|
304 |
|
305 |
<javadoc-index target="${netbeans.javadoc.dir}/allclasses.xml" > |
306 |
<packageslist dir="${netbeans.javadoc.dir}" > |
307 |
<include name="**/allclasses-noframe.html" /> |
308 |
</packageslist> |
309 |
</javadoc-index> |
310 |
</target> |
311 |
|
312 |
|
313 |
<target name="javadoc-generate-html" depends="set-config-to-javadoc,init" > |
314 |
<tstamp> |
315 |
<format property="modules-javadoc-date" pattern="d MMM yyyy" locale="en" /> |
316 |
</tstamp> |
317 |
|
318 |
<style |
319 |
in="${netbeans.javadoc.dir}/modules.xml" |
320 |
out="${netbeans.javadoc.dir}/usecases.html" |
321 |
style="javadoctools/export2usecases.xsl" |
322 |
> |
323 |
<param name="date" expression="${modules-javadoc-date}"/> |
324 |
</style> |
325 |
|
326 |
<style |
327 |
in="${netbeans.javadoc.dir}/apichanges.xml" |
328 |
out="${netbeans.javadoc.dir}/apichanges.html" |
329 |
style="javadoctools/export2apichanges.xsl" |
330 |
> |
331 |
<param name="date" expression="${modules-javadoc-date}"/> |
332 |
<param name="changes-since-year" expression="${previous.release.year}"/> |
333 |
<param name="changes-since-day" expression="${previous.release.day}"/> |
334 |
<param name="changes-since-month" expression="${previous.release.month}"/> |
335 |
<param name="include-introduction" expression="true" /> |
336 |
</style> |
337 |
|
338 |
<copy file="javadoctools/netbeans.css" tofile="${netbeans.javadoc.dir}/netbeans.css" /> |
339 |
<condition property="javadoc.style.sheet.exists" > |
340 |
<available file="${netbeans.javadoc.dir}/org-openide-util/javadoc.css" /> |
341 |
</condition> |
342 |
|
343 |
<fail unless="javadoc.style.sheet.exists" > |
344 |
The org-openide-util/javadoc.css has to exist as we are refering to |
345 |
it from to master module javadoc pages. If it does not anymore, update |
346 |
the javadoctools/export*.xsl templates. |
347 |
</fail> |
348 |
|
349 |
<style |
350 |
in="${netbeans.javadoc.dir}/allclasses.xml" |
351 |
out="${netbeans.javadoc.dir}/allclasses-frame.html" |
352 |
style="javadoctools/export2allclasses.xsl" |
353 |
> |
354 |
</style> |
355 |
|
356 |
<style |
357 |
in="${netbeans.javadoc.dir}/modules.xml" |
358 |
out="${netbeans.javadoc.dir}/overview-frame.html" |
359 |
style="javadoctools/export2allmodules.xsl" |
360 |
> |
361 |
<param name="date" expression="${modules-javadoc-date}"/> |
362 |
</style> |
363 |
|
364 |
<style |
365 |
in="${netbeans.javadoc.dir}/modules.xml" |
366 |
out="${netbeans.javadoc.dir}/layers.html" |
367 |
style="javadoctools/export2layer.xsl" |
368 |
> |
369 |
<param name="date" expression="${modules-javadoc-date}"/> |
370 |
</style> |
371 |
|
372 |
<style |
373 |
in="${netbeans.javadoc.dir}/modules.xml" |
374 |
out="${netbeans.javadoc.dir}/overview-summary.html" |
375 |
style="javadoctools/export2html.xsl" |
376 |
> |
377 |
<param name="date" expression="${modules-javadoc-date}"/> |
378 |
</style> |
379 |
|
380 |
|
381 |
<!-- at the end geneate the index.html so people know where to start --> |
382 |
<echo file="${netbeans.javadoc.dir}/index.html" ><![CDATA[ |
383 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> |
384 |
<HTML><HEAD><TITLE>NetBeans API Index</TITLE> |
385 |
</HEAD> |
386 |
<FRAMESET cols="20%,80%" title="" onLoad="top.loadFrames()"> |
387 |
<FRAMESET rows="30%,70%" title="" onLoad="top.loadFrames()"> |
388 |
<FRAME src="overview-frame.html" name="packageListFrame" title="All Modules"> |
389 |
<FRAME src="allclasses-frame.html" name="packageFrame" title="All classes"> |
390 |
</FRAMESET> |
391 |
<FRAME src="overview-summary.html" name="classFrame" title="Module, package, class and interface descriptions" scrolling="yes"> |
392 |
<NOFRAMES> |
393 |
<H2>Frame Alert</H2> |
394 |
<P> |
395 |
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. |
396 |
Link to<A HREF="overview-summary.html">Non-frame version.</A> |
397 |
</NOFRAMES> |
398 |
</FRAMESET> |
399 |
</HTML> |
400 |
]]></echo> |
401 |
|
402 |
<replace dir="${netbeans.javadoc.dir}"> |
403 |
<include name="*.html"/> |
404 |
<replacefilter token="@JDK@" value="http://java.sun.com/j2se/1.4.2/docs/api"/> |
405 |
<replacefilter token="http://root/" value="." /> |
406 |
<replacefilter token="$${javadoc.web.root}" value="." /> |
407 |
</replace> |
408 |
|
409 |
<echo message="Javadoc index has been generated to ${netbeans.javadoc.dir}/index.html" /> |
410 |
</target> |
411 |
|
412 |
|
413 |
<target name="javadoc-check-broken-links" depends="init" unless="javadoc.skip.brokenlinks.check" > |
414 |
<taskdef name="checklinks" classname="org.netbeans.nbbuild.CheckLinks"> |
415 |
<classpath> |
416 |
<pathelement location="nbantext.jar"/> |
417 |
</classpath> |
418 |
</taskdef> |
419 |
<checklinks basedir="${netbeans.javadoc.dir}" checkexternal="${javadoc.check.external.links}" checkspaces="false" failonerror="true" > |
420 |
<include name="*/overview-summary.html"/> |
421 |
<include name="*/apichanges.html"/> |
422 |
<include name="*/architecture-summary.html"/> |
423 |
<include name="*/**/package-summary.html"/> |
424 |
<include name="*/**/doc-files/**/*.html"/> |
425 |
<include name="*.html" /> |
426 |
</checklinks> |
427 |
</target> |
428 |
|
429 |
<target name="build-messaging" depends="init"> |
430 |
<echo message="Starting a build for NetBeans (build ${buildnum}, config '${moduleconfig}') ..."/> |
431 |
<echo message="Selected modules: ${modules}"/> |
432 |
<echo message="OS: ${os.name} ${os.version} Locale: ${user.language}_${user.region}"/> |
433 |
<echo message="Java: ${nbjdk.home}"/> |
434 |
</target> |
435 |
|
436 |
<!-- Use of nbmerge target has the effect of automatically depending on all-X for every module. --> |
437 |
<!-- It also runs deltree(dir=wherever) and copydir(src=../X/netbeans,dest=wherever) to create the IDE install. --> |
438 |
|
439 |
<target name="build-nozip" depends="clean-cluster-flags,build-clusters" description="Build the IDE but do not create a final ZIP file."> |
440 |
<loadproperties srcFile="${clusters.list.file}" /> |
441 |
|
442 |
<loadproperties srcfile="${netbeans.dest.dir}/moduleCluster.properties" /> |
443 |
|
444 |
<mkdir dir="${netbeans.dest.dir}/bin" /> |
445 |
<copy file="../ide/launcher/unix/netbeans" todir="${netbeans.dest.dir}/bin" /> |
446 |
<chmod file="${netbeans.dest.dir}/bin/netbeans" perm="ugo+rx"/> |
447 |
<copy file="../ide/launcher/windows/netbeans.exe" todir="${netbeans.dest.dir}/bin" /> |
448 |
<copy file="../ide/launcher/windows/nb.exe" todir="${netbeans.dest.dir}/bin" /> |
449 |
<copy file="../ide/launcher/os2/netbeans.cmd" todir="${netbeans.dest.dir}/bin" /> |
450 |
<!-- if anybody knows better place for icons, let me know: jtulach@netbeans.org --> |
451 |
<copy file="../ide/launcher/os2/nbos2icons.zip" todir="${netbeans.dest.dir}/${nb.cluster.nb.dir}/" /> |
452 |
|
453 |
<mkdir dir="${netbeans.dest.dir}/etc" /> |
454 |
<copy file="../ide/launcher/netbeans.conf" todir="${netbeans.dest.dir}/etc" /> |
455 |
|
456 |
<echo message="${netbeans.dest.dir}/${nb.cluster.platform.dir}/lib/nbexec" /> |
457 |
<fixcrlf eol="lf" srcdir="${netbeans.dest.dir}" > |
458 |
<include name="etc/netbeans.conf" /> |
459 |
<include name="bin/netbeans" /> |
460 |
<include name="${nb.cluster.platform.dir}/lib/nbexec" /> |
461 |
</fixcrlf> |
462 |
<fixcrlf eol="crlf" srcdir="${netbeans.dest.dir}" > |
463 |
<include name="bin/netbeans.cmd" /> |
464 |
<include name="${nb.cluster.platform.dir}/lib/nbexec.cmd" /> |
465 |
</fixcrlf> |
466 |
|
467 |
<echo file="${netbeans.dest.dir}/build_info">NetBeans dev build |
468 |
------------------ |
469 |
Number: ${buildnumber} |
470 |
Date: ${buildday} |
471 |
Branding: |
472 |
Branch: trunk |
473 |
Tag: |
474 |
</echo> |
475 |
</target> |
476 |
|
477 |
<target name="build" depends="build-nozip" |
478 |
description="Create a complete build including a ZIP distribution (but do not try it)."> |
479 |
<delete file="NetBeans-${buildnum}.zip"/> |
480 |
<delete file="NetBeans-${buildnum}-build-extra-data.zip"/> |
481 |
|
482 |
<property name="nb-extra-files" value="*.built,test/**,extra/**"/> |
483 |
|
484 |
<!-- package the zip file --> |
485 |
<zip destfile="NetBeans-${buildnum}.zip" update="true" duplicate="preserve"> |
486 |
<zipfileset file="${netbeans.dest.dir}/bin/netbeans" filemode="755" prefix="${netbeans.dest}/bin"/> |
487 |
<zipfileset file="${netbeans.dest.dir}/${nb.cluster.platform.dir}/lib/nbexec" filemode="755" prefix="${netbeans.dest}/${nb.cluster.platform.dir}/lib"/> |
488 |
<zipfileset dir="${netbeans.dest.dir}/${nb.cluster.ide.dir}/ant/bin" filemode="755" prefix="${netbeans.dest}/${nb.cluster.ide.dir}/ant/bin"> |
489 |
<exclude name="*.bat"/> |
490 |
<exclude name="*.cmd"/> |
491 |
</zipfileset> |
492 |
<zipfileset dir="${netbeans.dest.dir}" filemode="755" prefix="${netbeans.dest}"> |
493 |
<include name="**/*.sh"/> |
494 |
</zipfileset> |
495 |
<zipfileset dir="${netbeans.dest.dir}" prefix="${netbeans.dest}" excludes="${nb-extra-files}"> |
496 |
<!-- XXX exclude the temporary cluster for parts of openide --> |
497 |
<exclude name="tmp" /> |
498 |
<exclude name="tmp/**/*" /> |
499 |
</zipfileset> |
500 |
</zip> |
501 |
|
502 |
<!-- package the zip file with extra files not to be included in regular product package--> |
503 |
<!-- |
504 |
<zip destfile="NetBeans-${buildnum}-build-extra-data.zip" update="true" duplicate="preserve"> |
505 |
<zipfileset dir="${netbeans.dest.dir}" prefix="${netbeans.dest}" includes="${nb-extra-files}"/> |
506 |
</zip> |
507 |
--> |
508 |
|
509 |
<echo>Build created; see NetBeans-${buildnum}.zip (in nbbuild/). |
510 |
If you like, you may run the IDE straight from |
511 |
the ${netbeans.dest}/bin/ directory. |
512 |
(For example, type: ant tryme) |
513 |
</echo> |
514 |
</target> |
515 |
|
516 |
<target name="delete-and-merge" depends="merge-delete,merge" /> |
517 |
|
518 |
<target name="merge-delete" depends="init"> |
519 |
<delete dir="${netbeans.dest}" /> |
520 |
</target> |
521 |
|
522 |
<target name="merge" depends="build-messaging"> |
523 |
<mkdir dir="${netbeans.dest.dir}"/> |
524 |
<nbmerge failonerror="${stop.when.broken.modules}" |
525 |
dest="${netbeans.dest}" |
526 |
topdir=".." |
527 |
fixedmodules="${fixedmodules}" |
528 |
modules="${modules}" |
529 |
builtmodulesproperty="${built.modules.property}" |
530 |
targetprefix="all-" |
531 |
mergedependentmodules="${merge.dependent.modules}" > |
532 |
</nbmerge> |
533 |
<chmod perm="ugo+x"> |
534 |
<fileset dir="${netbeans.dest.dir}"> |
535 |
<include name="bin/netbeans"/> |
536 |
<include name="bin/**/*.pl"/> |
537 |
<include name="jakarta-tomcat-*/bin/*.sh"/> |
538 |
</fileset> |
539 |
</chmod> |
540 |
</target> |
541 |
|
542 |
<target name="build-platform" depends="init"> |
543 |
<run-depend-build clusters-to-build="nb.cluster.platform,nb.cluster.harness"/> |
544 |
</target> |
545 |
|
546 |
<target name="build-cluster" depends="init"> |
547 |
<run-depend-build clusters-to-build="${cluster-name}"/> |
548 |
</target> |
549 |
|
550 |
<macrodef name="resolve"> |
551 |
<attribute name="name"/> |
552 |
<attribute name="value"/> |
553 |
<sequential> |
554 |
<property name="@{name}" value="${@{value}}"/> |
555 |
</sequential> |
556 |
</macrodef> |
557 |
|
558 |
<macrodef name="run-depend-build"> |
559 |
<attribute name="clusters-to-build"/> |
560 |
<sequential> |
561 |
<echo>Repeat @{clusters-to-build}</echo> |
562 |
<repeat target="build-one-cluster" name="one.cluster.name" values="@{clusters-to-build}" /> |
563 |
</sequential> |
564 |
</macrodef> |
565 |
|
566 |
<target name="build-clusters" depends="init"> |
567 |
<run-depend-build clusters-to-build="${nb.clusters.list}"/> |
568 |
</target> |
569 |
|
570 |
<target name="build-one-cluster-dependencies-check"> |
571 |
<condition property="${one.cluster.name}-hasNoDependencies"> |
572 |
<equals arg1="${one.cluster.dependencies}" arg2="" trim="true"/> |
573 |
</condition> |
574 |
<echo>Dependency prop :${one.cluster.name}-hasNoDependencies:</echo> |
575 |
<echo>Cluster dep :${one.cluster.dependencies}:</echo> |
576 |
<resolve name="test.prop" value="${one.cluster.name}-hasNoDependencies"/> |
577 |
<echo>Cluster dep prp:${test.prop}:</echo> |
578 |
</target> |
579 |
|
580 |
<target name="build-one-cluster-dependencies" |
581 |
depends="build-one-cluster-dependencies-check" |
582 |
unless="${one.cluster.name}-hasNoDependencies"> |
583 |
<run-depend-build clusters-to-build="${one.cluster.dependencies}"/> |
584 |
</target> |
585 |
|
586 |
<target name="build-one-cluster-check"> |
587 |
<condition property="${one.cluster.name}-is-built"> |
588 |
<available file="${netbeans.dest.dir}/${one.cluster.name}.built"/> |
589 |
</condition> |
590 |
<resolve name="test1.prop" value="${one.cluster.name}-is-built"/> |
591 |
<echo>Cluster ${one.cluster.name} is :${test1.prop}:</echo> |
592 |
</target> |
593 |
|
594 |
<target name="build-one-cluster" unless="${one.cluster.name}-is-built" depends="build-one-cluster-check"> |
595 |
<echo message="Building ${one.cluster.name} modules"/> |
596 |
<resolve name="one-cluster-modules" value="${one.cluster.name}"/> |
597 |
<resolve name="one-cluster-dependencies" value="${one.cluster.name}.depends"/> |
598 |
<echo>${one-cluster-modules}</echo> |
599 |
<echo>Dependencies: ${one-cluster-dependencies}</echo> |
600 |
<insert-module-all-targets/> <!-- we are in a subproject, so need to reinsert the targets... XXX <antcall> and thus <repeat> apparently reparses the Ant script from disk! --> |
601 |
<antcall target="build-one-cluster-dependencies" inheritAll="false"> |
602 |
<param name="one.cluster.dependencies" value="${one-cluster-dependencies}"/> |
603 |
<param name="one.cluster.name" value="${one.cluster.name}"/> |
604 |
</antcall> |
605 |
<mkdir dir="${netbeans.dest.dir}"/> |
606 |
<nbmerge failonerror="${stop.when.broken.modules}" |
607 |
dest="${netbeans.dest.dir}" |
608 |
topdir="${nb_all}" |
609 |
fixedmodules="${one-cluster-modules}" |
610 |
builtmodulesproperty="${built.modules.property}" |
611 |
targetprefix="all-" |
612 |
mergedependentmodules="false"> |
613 |
</nbmerge> |
614 |
<touch file="${netbeans.dest.dir}/${one.cluster.name}.built"/> |
615 |
</target> |
616 |
|
617 |
<target name="zipclusters" depends="init"> |
618 |
<mkdir dir="${netbeans.build.dir}/zips"/> |
619 |
<repeat target="zip-one-cluster" name="one.cluster.name" values="${clusters.list}" /> |
620 |
|
621 |
<!-- package the misc files --> |
622 |
<zip destfile="${netbeans.build.dir}/zips/${clusters.prefix}-misc-${buildnum}.zip" update="true" duplicate="preserve"> |
623 |
<zipfileset dir="${netbeans.dest.dir}" filemode="755"> |
624 |
<include name="bin/netbeans"/> |
625 |
</zipfileset> |
626 |
<zipfileset dir="${netbeans.dest.dir}"> |
627 |
<include name="bin/**"/> |
628 |
<include name="etc/**/"/> |
629 |
</zipfileset> |
630 |
</zip> |
631 |
</target> |
632 |
|
633 |
<target name="zip-one-cluster"> |
634 |
<taskdef name="setclusterpatternset" classname="org.netbeans.nbbuild.SetClusterPatternSet" classpath="nbantext.jar"/> |
635 |
<taskdef name="setcluster" classname="org.netbeans.nbbuild.SetCluster" classpath="nbantext.jar"/> |
636 |
<loadproperties srcFile="${clusters.list.file}" /> |
637 |
<loadproperties srcFile="cluster-description.properties" /> |
638 |
<setcluster cluster="${one.cluster.name}" name="one.cluster.dir" /> |
639 |
|
640 |
<setclusterpatternset cluster="${one.cluster.name}" name="${one.cluster.name}.files" trackingpath="${netbeans.dest.dir}" clusterdir="${one.cluster.dir}"/> |
641 |
|
642 |
<resolve name="zipcluster.file" value="${one.cluster.name}.pkg.filename"/> |
643 |
<zip destfile="${netbeans.build.dir}/zips/${clusters.prefix}-${zipcluster.file}-${buildnum}.zip" update="true" duplicate="preserve"> |
644 |
<zipfileset dir="${netbeans.dest.dir}" filemode="755"> |
645 |
<include name="${one.cluster.dir}/lib/nbexec"/> |
646 |
</zipfileset> |
647 |
<zipfileset dir="${netbeans.dest.dir}" filemode="755"> |
648 |
<include name="${one.cluster.dir}/ant/bin/*"/> |
649 |
<exclude name="${one.cluster.dir}/ant/bin/*.bat"/> |
650 |
<exclude name="${one.cluster.dir}/ant/bin/*.cmd"/> |
651 |
</zipfileset> |
652 |
<zipfileset dir="${netbeans.dest.dir}"> |
653 |
<patternset refID="${one.cluster.name}.files"/> |
654 |
</zipfileset> |
655 |
</zip> |
656 |
</target> |
657 |
|
658 |
<target name="create-rpms-proto"> |
659 |
<mkdir dir="${netbeans.build.dir}/rpms"/> |
660 |
<repeat target="create-one-rpm-proto" name="one.cluster.name" values="${clusters.list}" /> |
661 |
</target> |
662 |
|
663 |
<target name="create-one-rpm-proto"> |
664 |
<taskdef name="setcluster" classname="org.netbeans.nbbuild.SetCluster" classpath="nbantext.jar"/> |
665 |
<loadproperties srcFile="cluster.properties" /> |
666 |
<loadproperties srcFile="cluster-description.properties" /> |
667 |
<setcluster cluster="${one.cluster.name}" name="one.cluster.dir" /> |
668 |
<mkdir dir="${netbeans.build.dir}/rpms"/> |
669 |
|
670 |
<resolve name="pkg.name" value="${one.cluster.name}.pkg.name"/> |
671 |
<resolve name="pkg.version" value="${one.cluster.name}.pkg.version"/> |
672 |
<resolve name="pkg.desc" value="${one.cluster.name}.pkg.desc"/> |
673 |
<resolve name="pkg.vendor" value="${one.cluster.name}.pkg.vendor"/> |
674 |
<resolve name="pkg.email" value="${one.cluster.name}.pkg.email"/> |
675 |
<resolve name="pkg.rpm.name" value="${one.cluster.name}.pkg.rpm.name"/> |
676 |
<resolve name="pkg.rpm.requires" value="${one.cluster.name}.pkg.rpm.requires"/> |
677 |
<resolve name="pkg.rpm.group" value="${one.cluster.name}.pkg.rpm.group"/> |
678 |
<resolve name="pkg.rpm.url" value="${one.cluster.name}.pkg.rpm.url"/> |
679 |
<resolve name="pkg.rpm.copyright" value="${one.cluster.name}.pkg.rpm.copyright"/> |
680 |
<resolve name="pkg.rpm.map" value="${one.cluster.name}.pkg.rpm.map"/> |
681 |
<resolve name="pkg.rpm.prefix" value="${one.cluster.name}.pkg.rpm.prefix"/> |
682 |
|
683 |
<echo file="${netbeans.build.dir}/rpms/${pkg.rpm.name}.spec"> |
684 |
%define global_product_version ${pkg.version} |
685 |
%define global_product_release 00 |
686 |
%define _prefix ${pkg.rpm.prefix} |
687 |
Version: %{global_product_version} |
688 |
Release: %{global_product_release} |
689 |
Group: ${pkg.rpm.group} |
690 |
Copyright: ${pkg.rpm.copyright} |
691 |
Vendor: ${pkg.vendor} |
692 |
URL: ${pkg.rpm.url} |
693 |
Prefix: %_prefix |
694 |
AutoReqProv: no |
695 |
Name: ${pkg.rpm.name} |
696 |
Summary: ${pkg.name} |
697 |
%description |
698 |
${pkg.desc} |
699 |
|
700 |
%files |
701 |
|
702 |
%erpm_map ${pkg.rpm.map} nb_destdir |
703 |
|
704 |
%dir ${pkg.rpm.map} |
705 |
|
706 |
${pkg.rpm.map}/${one.cluster.dir}</echo> |
707 |
</target> |
708 |
|
709 |
<target name="create-svr4s-proto"> |
710 |
<mkdir dir="${netbeans.build.dir}/rpms"/> |
711 |
<repeat target="create-one-svr4-proto" name="one.cluster.name" values="${clusters.list}" /> |
712 |
</target> |
713 |
|
714 |
<target name="create-one-svr4-proto"> |
715 |
<taskdef name="setcluster" classname="org.netbeans.nbbuild.SetCluster" classpath="nbantext.jar"/> |
716 |
<loadproperties srcFile="cluster.properties" /> |
717 |
<loadproperties srcFile="cluster-description.properties" /> |
718 |
<setcluster cluster="${one.cluster.name}" name="one.cluster.dir" /> |
719 |
<mkdir dir="${netbeans.build.dir}/svr4s"/> |
720 |
|
721 |
<resolve name="pkg.name" value="${one.cluster.name}.pkg.name"/> |
722 |
<resolve name="pkg.version" value="${one.cluster.name}.pkg.version"/> |
723 |
<resolve name="pkg.desc" value="${one.cluster.name}.pkg.desc"/> |
724 |
<resolve name="pkg.vendor" value="${one.cluster.name}.pkg.vendor"/> |
725 |
<resolve name="pkg.email" value="${one.cluster.name}.pkg.email"/> |
726 |
<resolve name="pkg.svr4.pkg" value="${one.cluster.name}.pkg.svr4.pkg"/> |
727 |
<resolve name="pkg.svr4.maxinst" value="${one.cluster.name}.pkg.svr4.maxinst"/> |
728 |
<resolve name="pkg.svr4.sunw_pkgvers" value="${one.cluster.name}.pkg.svr4.sunw_pkgvers"/> |
729 |
<resolve name="pkg.svr4.hotline" value="${one.cluster.name}.pkg.svr4.hotline"/> |
730 |
<resolve name="pkg.svr4.classes" value="${one.cluster.name}.pkg.svr4.classes"/> |
731 |
<resolve name="pkg.svr4.basedir" value="${one.cluster.name}.pkg.svr4.basedir"/> |
732 |
<resolve name="pkg.svr4.pkginst" value="${one.cluster.name}.pkg.svr4.pkginst"/> |
733 |
<resolve name="pkg.svr4.category" value="${one.cluster.name}.pkg.svr4.category"/> |
734 |
<echo file="${netbeans.build.dir}/svr4s/${pkg.svr4.pkg}.spec"> |
735 |
PKG=${pkg.svr4.pkg} |
736 |
NAME=${pkg.name} |
737 |
ARCH=sparc |
738 |
VERSION=${pkg.version} |
739 |
MAXINST=${pkg.svr4.maxinst} |
740 |
CATEGORY=${pkg.svr4.category} |
741 |
SUNW_PKGVERS=${pkg.svr4.sunw_pkgvers} |
742 |
DESC=${pkg.desc} |
743 |
VENDOR=${pkg.vendor} |
744 |
HOTLINE=${pkg.svr4.hotline} |
745 |
EMAIL=${pkg.email} |
746 |
CLASSES=${pkg.svr4.classes} |
747 |
BASEDIR=${pkg.svr4.basedir} |
748 |
PKGINST=${pkg.svr4.pkginst}</echo> |
749 |
</target> |
750 |
|
751 |
<target name="sanity-check" depends="testuserdir-delete,sanity-start" description="Test whether the build can start up without problems."/> |
752 |
<target name="-testuserdir-delete-init" depends="init"> |
753 |
<property name="test.user.dir.lock" location="${test.user.dir}/lock"/> |
754 |
<available property="app.running" file="${test.user.dir.lock}"/> |
755 |
</target> |
756 |
<target name="-testuserdir-delete-ok" depends="-testuserdir-delete-init" unless="app.running"> |
757 |
<delete dir="${test.user.dir}"/> |
758 |
</target> |
759 |
<target name="-testuserdir-delete-fail" depends="-testuserdir-delete-init" if="app.running"> |
760 |
<!-- #66799: best to warn about this condition... --> |
761 |
<fail>Will not delete ${test.user.dir} because ${test.user.dir.lock} still exists; kill any running process and delete lock file if necessary</fail> |
762 |
</target> |
763 |
<target name="testuserdir-delete" depends="-testuserdir-delete-ok,-testuserdir-delete-fail"/> |
764 |
<target name="sanity-start" depends="init,maybe-build-nozip,-jdk-init"> |
765 |
<mkdir dir="${test.user.dir}"/> |
766 |
<echo>Starting the IDE as a sanity check...</echo> |
767 |
<echo>WARNING - the sanity-start target is deprecated. Use commit-validation instead.</echo> |
768 |
<!-- XXX better would be to scan start log for stacktraces and just show those; --> |
769 |
<!-- possibly after filtering for duplicates or something like this. --> |
770 |
<!-- Timeout is ten minutes; should be enough for valid start, while preventing --> |
771 |
<!-- a deadlock from hanging an automated build: --> |
772 |
<exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes" timeout="600000"> |
773 |
<arg value="--jdkhome"/> |
774 |
<arg file="${nbjdk.home}"/> |
775 |
<arg value="--userdir"/> |
776 |
<arg file="${test.user.dir}"/> |
777 |
<arg line="${sanitystart.args}"/> |
778 |
</exec> |
779 |
<exec os="Linux SunOS Solaris Mac OS X" dir="." executable="sh" failonerror="yes" timeout="600000"> |
780 |
<arg value="${netbeans.dest.abs}/bin/netbeans"/> |
781 |
<arg value="--jdkhome"/> |
782 |
<arg file="${nbjdk.home}"/> |
783 |
<arg value="--userdir"/> |
784 |
<arg file="${test.user.dir}"/> |
785 |
<arg line="${sanitystart.args}"/> |
786 |
</exec> |
787 |
<echo>Finished starting the IDE, pay attention to any reported errors.</echo> |
788 |
</target> |
789 |
|
790 |
<target name="check-for-build" > |
791 |
<available property="have-build" file="${netbeans.dest.dir}/bin/netbeans"/> |
792 |
</target> |
793 |
<target name="maybe-build-nozip" depends="check-for-build" unless="have-build"> |
794 |
<ant dir="${basedir}" target="build-nozip"/> |
795 |
</target> |
796 |
|
797 |
<target name="nozip-check" |
798 |
depends="build-nozip,sanity-check"> |
799 |
<echo>WARNING - the nozip-check target is deprecated. Use all-nozip instead.</echo> |
800 |
</target> |
801 |
|
802 |
<target name="tryme-setup-debug-args" if="debug.port" > |
803 |
<property name="debug.pause" value="n" /> |
804 |
<property name="debug.server" value="y" /> |
805 |
|
806 |
<property name="tryme.debug.args" value="-J-Xdebug -J-Xnoagent -J-Xrunjdwp:transport=dt_socket,suspend=${debug.pause},server=${debug.server},address=${debug.port}" /> |
807 |
</target> |
808 |
|
809 |
<target name="tryme-debug" depends="-jdk-presetdef-nbjpdastart" description="Start IDE in debugger. May only be called from within IDE."> |
810 |
<nbjpdastart name="NetBeans" addressproperty="debug.port" transport="dt_socket"> |
811 |
<classpath> |
812 |
<fileset dir="${netbeans.dest.dir}"> |
813 |
<include name="**/*.jar"/> |
814 |
</fileset> |
815 |
</classpath> |
816 |
</nbjpdastart> |
817 |
<property name="debug.server" value="n"/> |
818 |
<antcall target="tryme"/> |
819 |
</target> |
820 |
|
821 |
<target name="tryme-profile" depends="-jdk-presetdef-nbprofiledirect" description="Start IDE in debugger. May only be called from within IDE."> |
822 |
<property name="profiler.roots.path" value="profiler.roots.all" /> |
823 |
<fileset id="profiler.roots.all" dir="${netbeans.dest.dir}"> |
824 |
<include name="**/*.jar"/> |
825 |
</fileset> |
826 |
<nbprofiledirect |
827 |
jvmargsprefix="-J" |
828 |
jvmargsproperty="profiler.jvmargs" |
829 |
mainclass="org.netbeans.Main" |
830 |
> |
831 |
<classpath> |
832 |
<fileset dir="${netbeans.dest.dir}"> |
833 |
<include name="**/*.jar"/> |
834 |
</fileset> |
835 |
</classpath> |
836 |
<rootspath> |
837 |
<fileset refid="${profiler.roots.path}" /> |
838 |
</rootspath> |
839 |
</nbprofiledirect> |
840 |
|
841 |
<antcall target="tryme"> |
842 |
<param name="tryme.args" value="${profiler.jvmargs}"/> |
843 |
</antcall> |
844 |
</target> |
845 |
|
846 |
<target name="tryme" depends="init,maybe-build-nozip,tryme-setup-debug-args,-jdk-init" |
847 |
description="Try running the IDE interactively (build it first if needed). |
848 |
It is possible to use -Ddebug.port=3234 -Ddebug.pause=y to start the system in debug mode" |
849 |
> |
850 |
<property name="tryme.debug.args" value="" /> |
851 |
|
852 |
<exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes"> |
853 |
<arg value="--jdkhome"/> |
854 |
<arg file="${nbjdk.home}"/> |
855 |
<arg value="--userdir"/> |
856 |
<arg file="${test.user.dir}"/> |
857 |
<arg line="${tryme.args}"/> |
858 |
<arg line="${tryme.debug.args}" /> |
859 |
</exec> |
860 |
<exec os="Linux SunOS Solaris Mac OS X" dir="." executable="sh" failonerror="yes"> |
861 |
<arg value="${netbeans.dest}/bin/netbeans"/> |
862 |
<arg value="--jdkhome"/> |
863 |
<arg file="${nbjdk.home}"/> |
864 |
<arg value="--userdir"/> |
865 |
<arg file="${test.user.dir}"/> |
866 |
<arg line="${tryme.args}"/> |
867 |
<arg line="${tryme.debug.args}" /> |
868 |
</exec> |
869 |
</target> |
870 |
|
871 |
<target name="l10n-kit" depends="init"> |
872 |
<taskdef name="l10n" classname="org.netbeans.nbbuild.L10nTask" |
873 |
classpath="nbantext.jar"/> |
874 |
<delete dir="${l10n.dist.dir}"/> |
875 |
<mkdir dir="${l10n.dist.dir}"/> |
876 |
<delete dir="tmp"/> |
877 |
<mkdir dir="tmp"/> |
878 |
<property name="nbroot" location=".."/> |
879 |
<l10n topdirs="${nbroot}" modules="${fixedmodules},${modules}" |
880 |
localizablefile="l10n.list" generatedfile="l10n.list.translated" |
881 |
distdir="${l10n.dist.dir}" changedfile="l10n.list.changed" |
882 |
builddir="tmp" buildnumber="${buildnumber}" |
883 |
excludepattern="**/ja/,**/*_ja.*"/> |
884 |
<delete dir="tmp"/> |
885 |
</target> |
886 |
|
887 |
<target name="bootstrap-javadoc" |
888 |
depends="bootstrap" |
889 |
description="Generate Javadoc for Ant extensions."> |
890 |
<!-- XXX this ought to be deleted at some point. --> |
891 |
<!-- Can be done anyway by apisupport/ant, and published as regular module Javadoc --> |
892 |
<!-- by the regular daily Javadoc build process. --> |
893 |
<!-- Then all of this stuff can be deleted from the www part of CVS. --> |
894 |
<mkdir dir="www/nbantext-javadoc"/> |
895 |
<delete> |
896 |
<fileset dir="www/nbantext-javadoc"> |
897 |
<include name="**/*.html"/> |
898 |
</fileset> |
899 |
</delete> |
900 |
<tstamp/> |
901 |
<javadoc sourcepath="antsrc" |
902 |
destdir="www/nbantext-javadoc" |
903 |
packagenames="org.netbeans.nbbuild.*" |
904 |
windowtitle="NetBeans Ant Extensions" |
905 |
doctitle="Extended Ant Tasks for Building NetBeans" |
906 |
nodeprecatedlist="true" |
907 |
notree="true" |
908 |
noindex="true" |
909 |
nohelp="true" |
910 |
nonavbar="true" |
911 |
author="false" |
912 |
version="false" |
913 |
bottom="Built on ${buildday}" |
914 |
> |
915 |
<classpath refid="bootstrap-cp"/> |
916 |
<link href="http://nagoya.apache.org/gump/javadoc/ant/build/javadocs" offline="true" packagelistloc="antsrc"/> |
917 |
</javadoc> |
918 |
</target> |
919 |
|
920 |
<target name="clean-external"> |
921 |
<subant target="clean"> |
922 |
<fileset dir=".."> |
923 |
<include name="*/external/build.xml"/> |
924 |
<include name="contrib/*/external/build.xml"/> |
925 |
</fileset> |
926 |
</subant> |
927 |
</target> |
928 |
|
929 |
<target name="real-clean" depends="clean,clean-external" |
930 |
description="Clean everything possible."> |
931 |
<echo message="Cleaning old builds..."/> |
932 |
<delete> |
933 |
<fileset dir="."> |
934 |
<include name="NetBeans-*.log"/> |
935 |
<include name="NetBeans-*.zip"/> |
936 |
</fileset> |
937 |
</delete> |
938 |
<!-- This step must be last: --> |
939 |
<echo message="Cleaning NetBeans-specific Ant extensions..."/> |
940 |
<delete file="nbantext.jar" quiet="true"/> |
941 |
<delete dir="build/antclasses"/> |
942 |
</target> |
943 |
|
944 |
<target name="ant-clean"> |
945 |
<delete file="nbantext.jar"/> |
946 |
</target> |
947 |
|
948 |
<target name="clean-cluster-flags" unless="do-not-rebuild-clusters"> |
949 |
<mkdir dir="${netbeans.dest.dir}"/> |
950 |
<delete includeEmptyDirs="true"> |
951 |
<fileset dir="${netbeans.dest.dir}"> |
952 |
<include name="*.built"/> |
953 |
</fileset> |
954 |
</delete> |
955 |
</target> |
956 |
|
957 |
<target name="localclean" depends="clean-cluster-flags,init"> |
958 |
<delete dir="${test.user.dir}"/> |
959 |
<delete dir="build"/> |
960 |
<delete file="moduledefs-tmp.properties"/> |
961 |
<delete dir="nbms" /> |
962 |
<delete dir="${netbeans.dest.dir}"/> |
963 |
</target> |
964 |
|
965 |
<!-- more correct but takes too long: <target name="localtest" depends="bootstrap,all-xtest/nbjunit" > --> |
966 |
<target name="localtest" depends="bootstrap"> |
967 |
<ant dir="test" target="cleanresults"/> |
968 |
<ant dir="test" target="runtests"/> |
969 |
</target> |
970 |
<target name="localtest-nb" depends="localtest"> |
971 |
<nbbrowse file="test/results/index.html"/> |
972 |
</target> |
973 |
<target name="localtest-single-nb" depends="bootstrap"> |
974 |
<property name="unit.test.base" location="test/unit/src"/> |
975 |
<pathconvert property="xtest.includes" pathsep=","> |
976 |
<path path="${includes}"/> |
977 |
<mapper type="glob" from="${unit.test.base}${file.separator}*.java" to="*.class"/> |
978 |
</pathconvert> |
979 |
<property name="xtest.attribs" value="empty"/> |
980 |
<ant dir="test" target="cleanresults"/> |
981 |
<ant dir="test" target="runtests"/> |
982 |
<nbbrowse file="test/results/index.html"/> |
983 |
</target> |
984 |
<target name="localtest-single-nb-debug" depends="bootstrap,-jdk-presetdef-nbjpdastart"> |
985 |
<property name="unit.test.base" location="test/unit/src"/> |
986 |
<pathconvert property="xtest.includes" pathsep=","> |
987 |
<path path="${includes}"/> |
988 |
<mapper type="glob" from="${unit.test.base}${file.separator}*.java" to="*.class"/> |
989 |
</pathconvert> |
990 |
<property name="xtest.attribs" value="empty"/> |
991 |
<ant dir="test" target="cleanresults"/> |
992 |
<nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="${test.class}"> |
993 |
<classpath> |
994 |
<!-- |
995 |
<path location="test/work/sys/tests/unit/classes"/> |
996 |
<path location="test/work/sys/tests/"/> |
997 |
<path location="test/unit/src/"/> |
998 |
--> |
999 |
<path location="nbantext.jar"/> |
1000 |
</classpath> |
1001 |
</nbjpdastart> |
1002 |
<ant dir="test" target="runtests"> |
1003 |
<property name="xtest.debug.address" value="${jpda.address}" /> |
1004 |
<property name="xtest.debug.pause" value="false" /> |
1005 |
</ant> |
1006 |
<nbbrowse file="test/results/index.html"/> |
1007 |
</target> |
1008 |
|
1009 |
<target name="cleanall" depends="init"> |
1010 |
<cleanall topdir=".." |
1011 |
modules="${allmodules}" |
1012 |
targetname="clean" |
1013 |
resolvedependencies="${resolve.clean.dependencies}" |
1014 |
deptargetprefix="all-" |
1015 |
failonerror="${stop.when.clean.error}" /> |
1016 |
</target> |
1017 |
|
1018 |
<target name="clean" depends="init,cleanall,localclean" |
1019 |
description="Clean out (almost) all build products."> |
1020 |
<echo message="Run `ant real-clean' if desired."/> |
1021 |
</target> |
1022 |
|
1023 |
<!-- This section contains properties and targets used to build --> |
1024 |
<!-- Solaris packages. --> |
1025 |
|
1026 |
<property name="solpkg-pkgproto" value="pkgproto"/> |
1027 |
<property name="solpkg-pkgmk" value="pkgmk"/> |
1028 |
<property name="solpkg-proto-file" value="prototype"/> |
1029 |
<property name="solpkg-actual-dir" value="to-be-specified"/> |
1030 |
<property name="solpkg-pkg-dir" value="to-be-specified"/> |
1031 |
<property name="solpkg-pkg-dest-dir" value="to-be-specified"/> |
1032 |
|
1033 |
<!-- You can run this target to create the prototype file and create --> |
1034 |
<!-- the package, or if you need to modify the prototype file before --> |
1035 |
<!-- building the package, you can run the two subtargets --> |
1036 |
<!-- separately. --> |
1037 |
<target name="solpkg-build" depends="solpkg-pkgproto,solpkg-pkgmk" |
1038 |
description="Generate a prototype file and create a Solaris package."/> |
1039 |
|
1040 |
<!-- This creates the pkg prototype file for a given directory and --> |
1041 |
<!-- its files. --> |
1042 |
<target name="solpkg-pkgproto" |
1043 |
description="Generate a prototype file."> |
1044 |
<exec executable="rm" failonerror="yes"> |
1045 |
<arg value="-rf"/> |
1046 |
<arg value="${solpkg-proto-file}"/> |
1047 |
</exec> |
1048 |
<exec executable="${solpkg-pkgproto}" output="${solpkg-proto-file}" |
1049 |
failonerror="yes"> |
1050 |
<arg value="${solpkg-actual-dir}=${solpkg-pkg-dir}"/> |
1051 |
</exec> |
1052 |
</target> |
1053 |
|
1054 |
<!-- This creates the Solaris pkg for a given prototype file, pkginfo --> |
1055 |
<!-- file, and directory. --> |
1056 |
<target name="solpkg-pkgmk" |
1057 |
description="Create a Solaris package."> |
1058 |
<exec executable="${solpkg-pkgmk}" failonerror="yes"> |
1059 |
<arg value="-o"/> |
1060 |
<arg value="-f"/> |
1061 |
<arg value="${solpkg-proto-file}"/> |
1062 |
<arg value="-r"/> |
1063 |
<arg value="${solpkg-actual-dir}"/> |
1064 |
<arg value="-d"/> |
1065 |
<arg value="${solpkg-pkg-dest-dir}"/> |
1066 |
</exec> |
1067 |
</target> |
1068 |
|
1069 |
<!-- End of Solaris package section. --> |
1070 |
|
1071 |
|
1072 |
<!-- Localized builds --> |
1073 |
<target name="all-dutch" depends="set-dutch-locale,all"/> |
1074 |
<target name="all-russian" depends="set-russian-locale,all"/> |
1075 |
<target name="all-french" depends="set-french-locale,all"/> |
1076 |
<target name="all-ja-zh" depends="set-ja-zh_CN-locales,all"/> |
1077 |
|
1078 |
<target name="set-ja-zh_CN-locales"> |
1079 |
<property name="locales" value="ja,zh_CN"/> |
1080 |
<property name="locjar.locales" value="${locales}"/> |
1081 |
<property name="locmakenbm.locales" value="${locales}"/> |
1082 |
<property name="locjhindexer.locales" value="${locales}"/> |
1083 |
<property name="localized.build.locales" value="${locales}"/> |
1084 |
</target> |
1085 |
|
1086 |
<target name="set-dutch-locale"> |
1087 |
<property name="locales" value="nl"/> |
1088 |
<property name="locjar.locales" value="${locales}"/> |
1089 |
<property name="locmakenbm.locales" value="${locales}"/> |
1090 |
<property name="locjhindexer.locales" value="${locales}"/> |
1091 |
<property name="localized.build.locales" value="${locales}"/> |
1092 |
</target> |
1093 |
|
1094 |
<target name="set-russian-locale"> |
1095 |
<property name="locales" value="ru"/> |
1096 |
<property name="locjar.locales" value="${locales}"/> |
1097 |
<property name="locmakenbm.locales" value="${locales}"/> |
1098 |
<property name="locjhindexer.locales" value="${locales}"/> |
1099 |
<property name="localized.build.locales" value="${locales}"/> |
1100 |
</target> |
1101 |
|
1102 |
<target name="set-french-locale"> |
1103 |
<property name="locales" value="fr"/> |
1104 |
<property name="locjar.locales" value="${locales}"/> |
1105 |
<property name="locmakenbm.locales" value="${locales}"/> |
1106 |
<property name="locjhindexer.locales" value="${locales}"/> |
1107 |
<property name="localized.build.locales" value="${locales}"/> |
1108 |
</target> |
1109 |
|
1110 |
<!-- end of localized builds --> |
1111 |
|
1112 |
|
1113 |
<target name="print-selected-modules" depends="init" description="Prints list of modules to build in selected moduleconfig."> |
1114 |
<echo message="modules=${allmodules}"/> |
1115 |
</target> |
1116 |
|
1117 |
<target name="print-cvs-modules" depends="init" description="Prints list of cvs modules required to build in selected moduleconfig."> |
1118 |
<taskdef name="printcvsmodules" classname="org.netbeans.nbbuild.PrintCvsModules" classpath="nbantext.jar"/> |
1119 |
<printcvsmodules modules="${fixedmodules},${modules}" targetprefix="all-" /> |
1120 |
</target> |
1121 |
|
1122 |
<target name="check-commit-validation"> |
1123 |
<condition property="run.validation" > |
1124 |
<and> |
1125 |
<available file="../ide/test/build.xml" /> |
1126 |
<available file="../jemmy/build.xml" /> |
1127 |
<available file="../jellytools/build.xml" /> |
1128 |
<available file="../xtest/build.xml" /> |
1129 |
<or> |
1130 |
<not> |
1131 |
<isset property="nb.run.validation"/> |
1132 |
</not> |
1133 |
<istrue value="${nb.run.validation}"/> |
1134 |
</or> |
1135 |
</and> |
1136 |
</condition> |
1137 |
</target> |
1138 |
|
1139 |
<target |
1140 |
name="unit-validation" |
1141 |
description="Invokes all existing unit tests in all IDE modules. |
1142 |
Useful when one wants to deeply verify that his changes |
1143 |
work" |
1144 |
> |
1145 |
<ant dir="../xtest/instance" target="runtests" > |
1146 |
<property name="xtest.config" value="unit-nb" /> |
1147 |
</ant> |
1148 |
</target> |
1149 |
|
1150 |
<target |
1151 |
name="commit-validation" |
1152 |
depends="commit-verification,commitValidation,no-commit-validation" |
1153 |
description="Runs tests to validate IDE before commit." |
1154 |
/> |
1155 |
|
1156 |
<target name="all-commitValidation" description="dummy target for build error recognition facility"/> |
1157 |
|
1158 |
<target |
1159 |
name="commit-verification" |
1160 |
description="Compares result of a build with golden files verifying various aspects of the exported interfaces" |
1161 |
depends=" |
1162 |
all-verification, |
1163 |
check-files-layout, |
1164 |
check-public-packages, |
1165 |
check-friend-packages, |
1166 |
check-shared-packages, |
1167 |
check-modules, |
1168 |
check-dependencies, |
1169 |
check-implementation-dependencies, |
1170 |
check-cluster-dependencies, |
1171 |
check-cluster-implementation-dependencies, |
1172 |
check-clusters-content" |
1173 |
/> |
1174 |
|
1175 |
<!-- JST: One day also add |
1176 |
check-external-libraries |
1177 |
--> |
1178 |
|
1179 |
<target name="all-verification" > |
1180 |
<echo message="Runs verification tests to check the IDE before commit" /> |
1181 |
</target> |
1182 |
|
1183 |
<!-- keep this target name at least for a while for backward compat -jglick --> |
1184 |
<target name="commitValidation" depends="all-commitValidation,check-commit-validation" if="run.validation"> |
1185 |
<property name="xtest.home" location="../xtest"/> |
1186 |
<ant dir="${xtest.home}/instance" target="cleanresults"> |
1187 |
<property name="xtest.config" value="commit-validation-nb"/> |
1188 |
</ant> |
1189 |
<ant dir="${xtest.home}/instance" target="cleantests"> |
1190 |
<property name="xtest.config" value="commit-validation-nb"/> |
1191 |
</ant> |
1192 |
<ant dir="${xtest.home}/instance" target="runtests"> |
1193 |
<property name="xtest.config" value="commit-validation-nb"/> |
1194 |
<property name="xtest.fail.on.failure" value="true"/> |
1195 |
</ant> |
1196 |
</target> |
1197 |
|
1198 |
<target name="no-commit-validation" depends="check-commit-validation" unless="run.validation"> |
1199 |
<echo> |
1200 |
*** WARNING *** |
1201 |
You do not seem to have the modules needed to run the commit validation test suite. |
1202 |
You may not commit any changes into the CVS repository without running these tests. |
1203 |
For more information: http://www.netbeans.org/community/guidelines/commit.html |
1204 |
</echo> |
1205 |
</target> |
1206 |
|
1207 |
<target name="sanity-build-from-source-pkg" depends="build-source"> |
1208 |
<available file="${netbeans.build.dir}/${cluster.name}-src-${buildnum}.zip" |
1209 |
property="pkg.available"/> |
1210 |
<fail message="Source package ${netbeans.build.dir}/${cluster.name}-src-${buildnum}.zip not available" unless="pkg.available"/> |
1211 |
<delete dir="testbuild"/> |
1212 |
<mkdir dir="testbuild"/> |
1213 |
<unzip dest="testbuild" src="${netbeans.build.dir}/${cluster.name}-src-${buildnum}.zip"/> |
1214 |
<property name="one.cluster.name" value="${cluster.name}"/> |
1215 |
<propertyset id="sanity-build"> |
1216 |
<propertyref name="one.cluster.name"/> |
1217 |
</propertyset> |
1218 |
<echoproperties destfile="testbuild/nbbuild/user.properties"> |
1219 |
<propertyset refid="sanity-build"/> |
1220 |
</echoproperties> |
1221 |
|
1222 |
<!-- it should call build of the refered cluster and not just hardcoded platform --> |
1223 |
<ant antfile="testbuild/nbbuild/build.xml" inheritall="false" target="build-one-cluster"> |
1224 |
<property file="testbuild/nbbuild/user.properties"/> |
1225 |
</ant> |
1226 |
<delete dir="testbuild"/> |
1227 |
</target> |
1228 |
|
1229 |
<target name="build-source" |
1230 |
depends="init,set-buildnumber" |
1231 |
description="Packages sources needed to compile given by cluster.name (can be specified by -Dcluster.name=nb.cluster.platform" |
1232 |
if="cluster.name" |
1233 |
> |
1234 |
<property name="buildnum" value="dev-${buildnumber}"/> |
1235 |
<echo message="Packaging sources of ${cluster.name} modules"/> |
1236 |
<resolve name="cluster-modules" value="${cluster.name}"/> |
1237 |
<resolve name="harness-modules" value="nb.cluster.harness"/> |
1238 |
<mkdir dir="${netbeans.build.dir}"/> |
1239 |
<taskdef name="definefileset" classname="org.netbeans.nbbuild.PrintCvsModules" classpath="nbantext.jar"/> |
1240 |
<definefileset modules="${cluster-modules}" targetprefix="all-" id="source-modules" dir=".." /> |
1241 |
<definefileset modules="${cluster-modules}" targetprefix="all-" id="external-modules" dir=".." mode="binaries" /> |
1242 |
<definefileset modules="${harness-modules}" targetprefix="all-" id="harness-source-modules" dir=".." /> |
1243 |
<definefileset modules="${harness-modules}" targetprefix="all-" id="harness-external-modules" dir=".." mode="binaries" /> |
1244 |
<zip zipfile="${netbeans.build.dir}/${cluster.name}-src-${buildnum}.zip" duplicate="preserve"> |
1245 |
<fileset refid="source-modules" /> |
1246 |
<fileset refid="external-modules" /> |
1247 |
<fileset refid="harness-source-modules" /> |
1248 |
<fileset refid="harness-external-modules" /> |
1249 |
</zip> |
1250 |
</target> |
1251 |
|
1252 |
<target name="generate-golden-files-init" depends="init,bootstrap" > |
1253 |
<property name="template.files.dir" location="build/golden" /> |
1254 |
<property name="golden.files.dir" location="../ide/golden" /> |
1255 |
<condition property="golden.files.eol" value="unix" > |
1256 |
<or> |
1257 |
<os family="unix" /> |
1258 |
<os family="mac" /> |
1259 |
</or> |
1260 |
</condition> |
1261 |
<property name="golden.files.eol" value="dos" /> |
1262 |
|
1263 |
<mkdir dir="${template.files.dir}" /> |
1264 |
|
1265 |
<!-- convert the golden files into platform default encoding --> |
1266 |
<fixcrlf srcdir="${golden.files.dir}" destdir="${template.files.dir}" eol="${golden.files.eol}" > |
1267 |
<include name="*txt" /> |
1268 |
</fixcrlf> |
1269 |
|
1270 |
</target> |
1271 |
|
1272 |
|
1273 |
<target name="generate-golden-files" depends="generate-golden-files-init" > |
1274 |
<property name="generated.files.dir" location="build/generated" /> |
1275 |
<mkdir dir="${generated.files.dir}" /> |
1276 |
|
1277 |
<taskdef name="deps" classname="org.netbeans.nbbuild.ModuleDependencies" classpath="nbantext.jar"/> |
1278 |
|
1279 |
<deps> |
1280 |
<input name="platform" > |
1281 |
<jars dir="${netbeans.dest.dir}" > |
1282 |
<include name="${nb.cluster.platform.dir}/**/*.jar" /> |
1283 |
</jars> |
1284 |
</input> |
1285 |
<input name="ide" > |
1286 |
<jars dir="${netbeans.dest.dir}" > |
1287 |
<include name="${nb.cluster.ide.dir}/**/*.jar" /> |
1288 |
</jars> |
1289 |
</input> |
1290 |
<input name="j2ee" > |
1291 |
<jars dir="${netbeans.dest.dir}" > |
1292 |
<include name="${nb.cluster.j2ee.dir}/**/*.jar" /> |
1293 |
</jars> |
1294 |
</input> |
1295 |
<input name="nb" > |
1296 |
<jars dir="${netbeans.dest.dir}" > |
1297 |
<include name="${nb.cluster.nb.dir}/**/*.jar" /> |
1298 |
</jars> |
1299 |
</input> |
1300 |
<input name="harness" > |
1301 |
<jars dir="${netbeans.dest.dir}" > |
1302 |
<include name="${nb.cluster.harness.dir}/**/*.jar" /> |
1303 |
</jars> |
1304 |
</input> |
1305 |
|
1306 |
<output type="group-dependencies" file="${generated.files.dir}/cluster-deps.txt" /> |
1307 |
<output type="group-implementation-dependencies" file="${generated.files.dir}/cluster-impl-deps.txt" /> |
1308 |
<output type="modules" file="${generated.files.dir}/modules.txt" /> |
1309 |
<output type="dependencies" file="${generated.files.dir}/deps.txt" /> |
1310 |
<output type="implementation-dependencies" file="${generated.files.dir}/impl-deps.txt" /> |
1311 |
<output type="public-packages" file="${generated.files.dir}/public-packages.txt" /> |
1312 |
<output type="shared-packages" file="${generated.files.dir}/shared-packages.txt" /> |
1313 |
<output type="friend-packages" file="${generated.files.dir}/friend-packages.txt" /> |
1314 |
<output type="external-libraries" file="${generated.files.dir}/external-libraries.txt" /> |
1315 |
</deps> |
1316 |
</target> |
1317 |
|
1318 |
<target name="check-public-packages" depends="generate-golden-files" > |
1319 |
<property name="check.public.packages.golden" location="${golden.files.dir}/public-packages.txt" /> |
1320 |
<property name="check.public.packages.template" location="${template.files.dir}/public-packages.txt" /> |
1321 |
<property name="check.public.packages.generated" location="${generated.files.dir}/public-packages.txt" /> |
1322 |
|
1323 |
<condition property="check-public-packages-are-they-the-same" > |
1324 |
<filesmatch file1="${check.public.packages.template}" file2="${check.public.packages.generated}" /> |
1325 |
</condition> |
1326 |
|
1327 |
|
1328 |
<exec os="Linux SunOS Solaris " dir="." executable="diff" failonerror="no" timeout="60000" > |
1329 |
<arg value="-U"/> |
1330 |
<arg value="15"/> |
1331 |
<arg value="${check.public.packages.template}" /> |
1332 |
<arg value="${check.public.packages.generated}" /> |
1333 |
</exec> |
1334 |
|
1335 |
<fail unless="check-public-packages-are-they-the-same" >! |
1336 |
*** Public packages has changed! *** |
1337 |
|
1338 |
Differences were found while comparing file |
1339 |
${check.public.packages.template} |
1340 |
with |
1341 |
${check.public.packages.generated} |
1342 |
|
1343 |
This means that the set of public packages changed since the previously known one. |
1344 |
Some packages may have been added, some of them may have been removed |
1345 |
Either by changing manifest of a module or by adding or removing a class file |
1346 |
from a module package. |
1347 |
|
1348 |
|
1349 |
Changing the packages may or may not be ok. It means that an api of |
1350 |
whole product changes and as such it is subject to review. If you passed |
1351 |
your review and want to change the list of public packages, then please |
1352 |
update the golden file at |
1353 |
${check.public.packages.golden} |
1354 |
and run the test once again. |
1355 |
|
1356 |
Read more about the Verification Framework: |
1357 |
http://openide.netbeans.org/proposals/arch/clusters.html#verify |
1358 |
|
1359 |
Look at for information about reviews: |
1360 |
http://openide.netbeans.org/tutorial/review-steps.html |
1361 |
|
1362 |
Check the page about APIs: |
1363 |
http://openide.netbeans.org/tutorial/api-design.html#api |
1364 |
</fail> |
1365 |
</target> |
1366 |
|
1367 |
<target name="check-friend-packages" depends="generate-golden-files" > |
1368 |
<property name="check.friend.packages.golden" location="${golden.files.dir}/friend-packages.txt" /> |
1369 |
<property name="check.friend.packages.template" location="${template.files.dir}/friend-packages.txt" /> |
1370 |
<property name="check.friend.packages.generated" location="${generated.files.dir}/friend-packages.txt" /> |
1371 |
|
1372 |
<condition property="check-friend-packages-are-they-the-same" > |
1373 |
<filesmatch file1="${check.friend.packages.template}" file2="${check.friend.packages.generated}" /> |
1374 |
</condition> |
1375 |
|
1376 |
|
1377 |
<exec os="Linux SunOS Solaris " dir="." executable="diff" failonerror="no" timeout="60000" > |
1378 |
<arg value="-U"/> |
1379 |
<arg value="15"/> |
1380 |
<arg value="${check.friend.packages.template}" /> |
1381 |
<arg value="${check.friend.packages.generated}" /> |
1382 |
</exec> |
1383 |
|
1384 |
<fail unless="check-friend-packages-are-they-the-same" >! |
1385 |
*** Friend packages has changed! *** |
1386 |
|
1387 |
Differences were found while comparing file |
1388 |
${check.friend.packages.template} |
1389 |
with |
1390 |
${check.friend.packages.generated} |
1391 |
|
1392 |
This means that the set of friend packages changed since the previously known one. |
1393 |
Some packages may have been added, some of them may have been removed |
1394 |
Either by changing manifest of a module or by adding or removing a class file |
1395 |
from a module package. |
1396 |
|
1397 |
|
1398 |
Changing the packages may or may not be ok. It means that an api of |
1399 |
whole product changes and as such it is subject to review. If you passed |
1400 |
your review and want to change the list of friend packages, then please |
1401 |
update the golden file at |
1402 |
${check.friend.packages.golden} |
1403 |
and run the test once again. |
1404 |
|
1405 |
Read more about the Verification Framework: |
1406 |
http://openide.netbeans.org/proposals/arch/clusters.html#verify |
1407 |
|
1408 |
Look at for information about reviews: |
1409 |
http://openide.netbeans.org/tutorial/review-steps.html |
1410 |
|
1411 |
Check the page about APIs: |
1412 |
http://openide.netbeans.org/tutorial/api-design.html#api |
1413 |
</fail> |
1414 |
</target> |
1415 |
|
1416 |
<target name="check-shared-packages" depends="generate-golden-files,-jdk-init" unless="have-jdk-1.5" > |
1417 |
<property name="check.shared.packages.golden" location="${golden.files.dir}/shared-packages.txt" /> |
1418 |
<property name="check.shared.packages.template" location="${template.files.dir}/shared-packages.txt" /> |
1419 |
<property name="check.shared.packages.generated" location="${generated.files.dir}/shared-packages.txt" /> |
1420 |
|
1421 |
<condition property="check-shared-packages-are-they-the-same" > |
1422 |
<filesmatch file1="${check.shared.packages.template}" file2="${check.shared.packages.generated}" /> |
1423 |
</condition> |
1424 |
|
1425 |
|
1426 |
<exec os="Linux SunOS Solaris Mac OS X" dir="." executable="diff" failonerror="no" timeout="60000" > |
1427 |
<arg value="-U"/> |
1428 |
<arg value="15"/> |
1429 |
<arg value="${check.shared.packages.template}" /> |
1430 |
<arg value="${check.shared.packages.generated}" /> |
1431 |
</exec> |
1432 |
|
1433 |
<fail unless="check-shared-packages-are-they-the-same" >! |
1434 |
*** Shared packages has changed! *** |
1435 |
|
1436 |
Differences were found while comparing file |
1437 |
${check.shared.packages.template} |
1438 |
with |
1439 |
${check.shared.packages.generated} |
1440 |
|
1441 |
This means that the set of shared packages changed since the previously known one. |
1442 |
Some packages may have been added, some of them may have been removed |
1443 |
Either by changing manifest of a module or by adding or removing a class file |
1444 |
from a module package. |
1445 |
|
1446 |
|
1447 |
Removing shared packages is ok. Adding shared packages is silly, complicates |
1448 |
and slows down module system and startup of the application. Do not do that! |
1449 |
If you are removing a shared package please update |
1450 |
${check.shared.packages.golden} |
1451 |
and run the test once again. |
1452 |
|
1453 |
Read more about the Verification Framework: |
1454 |
http://openide.netbeans.org/proposals/arch/clusters.html#verify |
1455 |
|
1456 |
Look at for information about reviews: |
1457 |
http://openide.netbeans.org/tutorial/review-steps.html |
1458 |
|
1459 |
Check the page about APIs: |
1460 |
http://openide.netbeans.org/tutorial/api-design.html#api |
1461 |
</fail> |
1462 |
</target> |
1463 |
|
1464 |
<target name="check-external-libraries" depends="generate-golden-files" > |
1465 |
<property name="check.external.libraries.golden" location="${golden.files.dir}/external-libraries.txt" /> |
1466 |
<property name="check.external.libraries.template" location="${template.files.dir}/external-libraries.txt" /> |
1467 |
<property name="check.external.libraries.generated" location="${generated.files.dir}/external-libraries.txt" /> |
1468 |
|
1469 |
<condition property="check-external-libraries-are-they-the-same" > |
1470 |
<filesmatch file1="${check.external.libraries.template}" file2="${check.external.libraries.generated}" /> |
1471 |
</condition> |
1472 |
|
1473 |
|
1474 |
<exec os="Linux SunOS Solaris Mac OS X" dir="." executable="diff" failonerror="no" timeout="60000" > |
1475 |
<arg value="-U"/> |
1476 |
<arg value="15"/> |
1477 |
<arg value="${check.external.libraries.template}" /> |
1478 |
<arg value="${check.external.libraries.generated}" /> |
1479 |
</exec> |
1480 |
|
1481 |
<fail unless="check-external-libraries-are-they-the-same" >! |
1482 |
*** List of external libraries has changed! *** |
1483 |
|
1484 |
Differences were found while comparing file |
1485 |
${check.external.libraries.template} |
1486 |
with |
1487 |
${check.external.libraries.generated} |
1488 |
|
1489 |
This means that the set of external libraries (JARs that are not NetBeans |
1490 |
modules or does not have NetBeans-Own-Library: true in manifest) has |
1491 |
changed since the previously known one. Some libraries may have been added, |
1492 |
some of them may have been removed, they MD5 checksum or size has been changed. |
1493 |
|
1494 |
Changing the external libraries is ok, but requires legal approval everytime |
1495 |
new version of a library is put into the product. If you have the approval |
1496 |
want to change the list of external libraries, then please |
1497 |
update the golden file at |
1498 |
${check.external.libraries.golden} |
1499 |
and run the test once again. |
1500 |
|
1501 |
Read more about the Verification Framework: |
1502 |
http://openide.netbeans.org/proposals/arch/clusters.html#verify |
1503 |
|
1504 |
Look at for information about reviews: |
1505 |
http://openide.netbeans.org/tutorial/review-steps.html |
1506 |
|
1507 |
Check the page about APIs: |
1508 |
http://openide.netbeans.org/tutorial/api-design.html#api |
1509 |
</fail> |
1510 |
</target> |
1511 |
|
1512 |
<target name="check-modules" depends="generate-golden-files" > |
1513 |
<property name="check.modules.golden" location="${golden.files.dir}/modules.txt" /> |
1514 |
<property name="check.modules.template" location="${template.files.dir}/modules.txt" /> |
1515 |
<property name="check.modules.generated" location="${generated.files.dir}/modules.txt" /> |
1516 |
|
1517 |
<condition property="check-modules-are-they-the-same" > |
1518 |
<filesmatch file1="${check.modules.template}" file2="${check.modules.generated}" /> |
1519 |
</condition> |
1520 |
|
1521 |
|
1522 |
<exec os="Linux SunOS Solaris Mac OS X" dir="." executable="diff" failonerror="no" timeout="60000" > |
1523 |
<arg value="-U"/> |
1524 |
<arg value="15"/> |
1525 |
<arg value="${check.modules.template}" /> |
1526 |
<arg value="${check.modules.generated}" /> |
1527 |
</exec> |
1528 |
|
1529 |
<fail unless="check-modules-are-they-the-same" >! |
1530 |
*** List of modules has changed! *** |
1531 |
|
1532 |
Differences were found while comparing file |
1533 |
${check.modules.template} |
1534 |
with |
1535 |
${check.modules.generated} |
1536 |
|
1537 |
This means that the set of modules changed since the previously known one. |
1538 |
Adding or removing a module significatly affects the set of APIs the |
1539 |
product offers and as such is subject to review. If you passed |
1540 |
your review and want to change the list of modules, then please |
1541 |
update the golden file at |
1542 |
${check.modules.golden} |
1543 |
and run the test once again. |
1544 |
|
1545 |
Read more about the Verification Framework: |
1546 |
http://openide.netbeans.org/proposals/arch/clusters.html#verify |
1547 |
|
1548 |
Look at for information about reviews: |
1549 |
http://openide.netbeans.org/tutorial/review-steps.html |
1550 |
|
1551 |
Check the page about APIs: |
1552 |
http://openide.netbeans.org/tutorial/api-design.html#api |
1553 |
</fail> |
1554 |
</target> |
1555 |
|
1556 |
<target name="check-dependencies" depends="generate-golden-files" > |
1557 |
<antcall target="check-dependencies-subroutine" > |
1558 |
<param name="check.dependencies.golden" location="${golden.files.dir}/deps.txt" /> |
1559 |
<param name="check.dependencies.template" location="${template.files.dir}/deps.txt" /> |
1560 |
<param name="check.dependencies.generated" location="${generated.files.dir}/deps.txt" /> |
1561 |
</antcall> |
1562 |
</target> |
1563 |
|
1564 |
<target name="check-implementation-dependencies" depends="generate-golden-files" > |
1565 |
<antcall target="check-dependencies-subroutine" > |
1566 |
<param name="check.dependencies.golden" location="${golden.files.dir}/impl-deps.txt" /> |
1567 |
<param name="check.dependencies.template" location="${template.files.dir}/impl-deps.txt" /> |
1568 |
<param name="check.dependencies.generated" location="${generated.files.dir}/impl-deps.txt" /> |
1569 |
</antcall> |
1570 |
</target> |
1571 |
|
1572 |
<target name="check-cluster-dependencies" depends="generate-golden-files" > |
1573 |
<antcall target="check-dependencies-subroutine" > |
1574 |
<param name="check.dependencies.golden" location="${golden.files.dir}/cluster-deps.txt" /> |
1575 |
<param name="check.dependencies.template" location="${template.files.dir}/cluster-deps.txt" /> |
1576 |
<param name="check.dependencies.generated" location="${generated.files.dir}/cluster-deps.txt" /> |
1577 |
</antcall> |
1578 |
</target> |
1579 |
|
1580 |
<target name="check-cluster-implementation-dependencies" depends="generate-golden-files" > |
1581 |
<antcall target="check-dependencies-subroutine" > |
1582 |
<param name="check.dependencies.golden" location="${golden.files.dir}/cluster-impl-deps.txt" /> |
1583 |
<param name="check.dependencies.template" location="${template.files.dir}/cluster-impl-deps.txt" /> |
1584 |
<param name="check.dependencies.generated" location="${generated.files.dir}/cluster-impl-deps.txt" /> |
1585 |
</antcall> |
1586 |
</target> |
1587 |
|
1588 |
<target name="check-dependencies-subroutine" > |
1589 |
<condition property="check-dependencies-are-they-the-same" > |
1590 |
<filesmatch file1="${check.dependencies.template}" file2="${check.dependencies.generated}" /> |
1591 |
</condition> |
1592 |
|
1593 |
|
1594 |
<exec os="Linux SunOS Solaris Mac OS X" dir="." executable="diff" failonerror="no" timeout="60000" > |
1595 |
<arg value="-U"/> |
1596 |
<arg value="15"/> |
1597 |
<arg value="${check.dependencies.template}" /> |
1598 |
<arg value="${check.dependencies.generated}" /> |
1599 |
</exec> |
1600 |
|
1601 |
<fail unless="check-dependencies-are-they-the-same" >! |
1602 |
*** List of dependencies has changed! *** |
1603 |
|
1604 |
Differences were found while comparing file |
1605 |
${check.dependencies.template} |
1606 |
with |
1607 |
${check.dependencies.generated} |
1608 |
|
1609 |
This means that the set of dependencies changed since the previously known one. |
1610 |
Adding a dependency can restrict the ways how a final product can be assembled |
1611 |
and as such it forms an important aspect of API and is subject to review. |
1612 |
If you passed your review or you are sure you want to change the |
1613 |
list of dependencies, then please update the golden file at |
1614 |
${check.dependencies.golden} |
1615 |
and run the test once again. |
1616 |
|
1617 |
Read more about the Verification Framework: |
1618 |
http://openide.netbeans.org/proposals/arch/clusters.html#verify |
1619 |
|
1620 |
Look at for information about reviews: |
1621 |
http://openide.netbeans.org/tutorial/review-steps.html |
1622 |
|
1623 |
Check the page about APIs and dependencies being important: |
1624 |
http://openide.netbeans.org/tutorial/api-design.html#api |
1625 |
</fail> |
1626 |
</target> |
1627 |
|
1628 |
|
1629 |
<target name="generate-files-layout" depends="generate-golden-files-init" > |
1630 |
<property name="generated.files.dir" location="build/generated" /> |
1631 |
<mkdir dir="${generated.files.dir}" /> |
1632 |
|
1633 |
<property name="check.files.layout.golden" location="${golden.files.dir}/files-layout.txt" /> |
1634 |
<property name="check.files.layout.template" location="${template.files.dir}/files-layout.txt" /> |
1635 |
<property name="check.files.layout.generated" location="${generated.files.dir}/files-layout.txt" /> |
1636 |
|
1637 |
<property name="check-file-layout-root" location="${netbeans.dest.dir}" /> |
1638 |
<fileset id="check-file-layout" dir="${check-file-layout-root}" casesensitive="yes" > |
1639 |
<include name="platform*/**" /> |
1640 |
<include name="ide*/**" /> |
1641 |
<include name="enterprise*/**" /> |
1642 |
<include name="nb*/**" /> |
1643 |
<include name="harness*/**" /> |
1644 |
</fileset> |
1645 |
|
1646 |
<pathconvert property="check-file-layout" refid="check-file-layout" dirsep="/" pathsep="," > |
1647 |
<map from="${check-file-layout-root}${file.separator}" to="" /> |
1648 |
</pathconvert> |
1649 |
<mkdir dir="build/generated" /> |
1650 |
<echo message="${check-file-layout}${line.separator}" file="${check.files.layout.generated}" /> |
1651 |
<replace file="${check.files.layout.generated}" token="," value="${line.separator}" /> |
1652 |
<replace file="${check.files.layout.generated}" token="\" value="/" /> |
1653 |
<condition property="check-files-are-they-the-same" > |
1654 |
<filesmatch file1="${check.files.layout.template}" file2="${check.files.layout.generated}" /> |
1655 |
</condition> |
1656 |
|
1657 |
|
1658 |
</target> |
1659 |
|
1660 |
|
1661 |
<target name="check-files-layout" depends="generate-files-layout" > |
1662 |
<exec os="Linux SunOS Solaris Mac OS X" dir="." executable="diff" failonerror="no" timeout="60000" > |
1663 |
<arg value="-U"/> |
1664 |
<arg value="15"/> |
1665 |
<arg value="${check.files.layout.template}" /> |
1666 |
<arg value="${check.files.layout.generated}" /> |
1667 |
</exec> |
1668 |
|
1669 |
<fail unless="check-files-are-they-the-same" >! |
1670 |
*** Layout of files has changed! *** |
1671 |
|
1672 |
Differences were found while comparing file ${check.files.layout.generated} with |
1673 |
${check.files.layout.template} |
1674 |
This means that the layout of files changed since the previously known one. |
1675 |
Some files may have been added, some of them may have been removed or renamed. |
1676 |
|
1677 |
Changing the layout may or may not be ok. If you are sure that you want to |
1678 |
change the layout of files, then update the golden file at |
1679 |
${check.files.layout.golden} |
1680 |
and run the test once again. If you got this warning without intending |
1681 |
to change the layout of files, think twice whether your commit is really |
1682 |
correct and consider asking for a review first. |
1683 |
|
1684 |
Read more about the Verification Framework: |
1685 |
http://openide.netbeans.org/proposals/arch/clusters.html#verify |
1686 |
|
1687 |
Look at for information about reviews: |
1688 |
http://openide.netbeans.org/tutorial/review-steps.html |
1689 |
|
1690 |
Check the page about APIs and files layout being an API: |
1691 |
http://openide.netbeans.org/tutorial/api-design.html#api |
1692 |
</fail> |
1693 |
</target> |
1694 |
|
1695 |
<target name="check-clusters-content" depends="bootstrap,init-tasks"> |
1696 |
<taskdef name="checkcontent" classname="org.netbeans.nbbuild.CheckClustersContent" classpath="nbantext.jar"/> |
1697 |
<checkcontent clusters="${nb.clusters.list}" trackingPath="${netbeans.dest.dir}" kitDestDir="${netbeans.dest.dir}"> |
1698 |
<exclude name="extra/**"/> |
1699 |
<exclude name="testtools/**"/> |
1700 |
<exclude name="bin/**"/> |
1701 |
<exclude name="README.html"/> |
1702 |
<exclude name="CREDITS.html"/> |
1703 |
<exclude name="LICENSE.txt"/> |
1704 |
<exclude name="DISTRIBUTION.txt"/> |
1705 |
<exclude name="THIRDPARTYLICENSE.txt"/> |
1706 |
<exclude name="nb.cluster.*"/> |
1707 |
<exclude name="etc/netbeans.conf"/> |
1708 |
<exclude name="build_info"/> |
1709 |
<exclude name="module_tracking.xml"/> |
1710 |
<exclude name="moduleCluster.properties"/> |
1711 |
<exclude name="netbeans.css"/> |
1712 |
</checkcontent> |
1713 |
</target> |
1714 |
|
1715 |
<target name="check-module-configs" depends="bootstrap" description="Sanity-check build.properties and cluster.properties."> |
1716 |
<taskdef name="checkmoduleconfigs" classname="org.netbeans.nbbuild.CheckModuleConfigs" classpath="nbantext.jar"/> |
1717 |
<checkmoduleconfigs nbroot=".."/> |
1718 |
</target> |
1719 |
|
1720 |
<target name="display-l10n-list-matches" description="Show which files are actually matched by an l10n.list in some module."> |
1721 |
<property name="nbroot" location=".."/> |
1722 |
<input addproperty="module">Select a top-level module (e.g. "java") to display results for:</input> |
1723 |
<property name="listfile" location="${nbroot}/${module}/l10n.list"/> |
1724 |
<echo>${listfile}:1: Matches follow... (click on hyperlinks from IDE!)</echo> |
1725 |
<echo>(warning: 'exclude' directives not honored here yet)</echo><!-- XXX use filtersets or something to fix --> |
1726 |
<apply parallel="false" executable="sh"> |
1727 |
<arg value="-c"/> |
1728 |
<arg value="echo $0:1"/> |
1729 |
<fileset dir="${nbroot}" includesfile="${listfile}"/> |
1730 |
</apply> |
1731 |
</target> |
1732 |
|
1733 |
<target name="increment-spec-versions" depends="bootstrap,init-module-list" description="Increment all standard module specification versions. Pass -Dbranch=true if not on the trunk."> |
1734 |
<property name="branch" value="false"/> |
1735 |
<taskdef name="incrspecvers" classname="org.netbeans.nbbuild.IncrementSpecificationVersions" classpath="nbantext.jar"/> |
1736 |
<incrspecvers nbroot=".." modules="${allmodules}" branch="${branch}"/> |
1737 |
</target> |
1738 |
|
1739 |
</project> |