The donation_review branch created.
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
3 <!-- for some information on what you could do (e.g. targets to override). -->
4 <!-- If you delete this file and reopen the project it will be recreated. -->
5 <project name="UML" basedir=".">
6 <description>Builds the module suite UML.</description>
7 <property name="zip.name" value="netbeans-7.3.1-201305291404-javase.zip"/>
8 <property name="zip.url" value="http://download.netbeans.org/netbeans/7.3.1/final/zip/"/>
9 <!--Delete old copies of platforms-->
11 <fileset dir=".hg" includes="**/*.zip" excludes="${zip.name}"/>
13 <get src="${zip.url}${zip.name}" dest=".hg" skipexisting="true" verbose="true"/>
14 <!--Only overwrite if newer-->
15 <unzip src=".hg/${zip.name}" dest=".hg" overwrite="false"/>
16 <condition property="isNetbeans">
18 <isset property="Hudson"/>
21 <import file="nbproject/build-impl.xml"/>
22 <property file="nbproject/project.properties"/>
25 <antcall target="keystore"/>
26 <antcall target="suite.nbms"/>
29 <target name="keystore" unless="isNetbeans">
30 <!--Create/Update keystore-->
31 <delete file="${keystore.location}${keystore.name}"/>
32 <mkdir dir="${keystore.location}"/>
33 <genkey alias="${keystore.alias}" storepass="${keystore.password}"
34 dname="${keystore.dname}"
35 keystore="${keystore.location}${keystore.name}"/>
36 <!--Update keystore info in projects-->
37 <antcall target="update-keystore-info"/>
40 <target name="update-keystore-info" depends="init-netbeans, init-hudson" unless="isNetbeans">
41 <for list="${modules}" delimiter=":" param="cur" trim="true">
43 <mkdir dir="@{cur}/nbproject/"/>
44 <!--Place the information in the properties file-->
45 <propertyfile file="@{cur}/nbproject/project.properties">
46 <entry key="keystore" value="../${keystore.location}${keystore.name}"/>
47 <entry key="nbm_alias" value="${keystore.alias}"/>
49 <mkdir dir="@{cur}/nbproject/private/"/>
50 <!--Place the password in the private properties file-->
51 <propertyfile file="@{cur}/nbproject/private/private.properties">
52 <entry key="storepass" value="${keystore.password}"/>
58 <target name="getAntContribJar">
59 <fileset id="ant-contrib-jar" dir="${suite.dir}/tools">
60 <include name="ant-contrib-*.jar" />
62 <pathconvert property="ant-contrib-jar" refid="ant-contrib-jar" pathsep="," />
63 <basename property="ant-contrib-filename" file="${ant-contrib-jar}"/>
66 <target name="init-netbeans" depends="getAntContribJar" if="isNetbeans">
67 <echo>Configuring ant-contrib for Netbeans use...</echo>
68 <property name="ant-contrib-loc" value="${suite.dir}/tools/${ant-contrib-filename}"/>
69 <available file="${ant-contrib-loc}" property="ant-contrib.present"/>
70 <fail unless="ant-contrib.present" message="The ant-contrib jar doesn't exist at: ${ant-contrib-loc}, can't build. Check your settings!" />
71 <!--We are in not Hudson-->
72 <taskdef resource="net/sf/antcontrib/antcontrib.properties">
74 <pathelement location="${ant-contrib-loc}"/>
79 <target name="init-hudson" depends="getAntContribJar" unless="isNetbeans">
80 <echo>Configuring ant-contrib for Hudson use...</echo>
81 <!--Import Hudson environment variables-->
82 <property environment="env"/>
83 <copy file="${suite.dir}/tools/${ant-contrib-filename}" todir="${env.ANT_HOME}/lib/"/>
84 <property name="ant-contrib-loc" value="${env.ANT_HOME}/lib/${ant-contrib-filename}"/>
85 <available file="${ant-contrib-loc}" property="ant-contrib.present"/>
86 <fail unless="ant-contrib.present" message="The ant-contrib jar doesn't exist at: ${ant-contrib-loc}, can't build. Check your settings!" />
87 <!--Define it. For some reason the approach in init-netbeans doesn't work in Hudson.-->
88 <taskdef name="for" classname="net.sf.antcontrib.logic.ForTask">
90 <pathelement location="${ant-contrib-loc}"/>
93 <taskdef name="propertyregex" classname="net.sf.antcontrib.property.RegexTask">
95 <pathelement location="${ant-contrib-loc}"/>
98 <taskdef name="if" classname="net.sf.antcontrib.logic.IfTask">
100 <pathelement location="${ant-contrib-loc}"/>
105 <target name="merge-javadoc" depends="init-hudson, init-netbeans" description="Merges javadocs from modules into one">
106 <property name="merged.javadoc.dir" value="build/javadoc"/>
107 <!--Creade merged javadoc folder-->
108 <mkdir dir="${merged.javadoc.dir}"/>
109 <!--Creade index file-->
110 <echo file="${merged.javadoc.dir}/index.html">
112 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
115 <title>Main Index</title>
116 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
122 <for list="${modules}" delimiter=":" param="cur" trim="true">
124 <echo>Checking @{cur}</echo>
125 <available file="@{cur}/build/javadoc/" property="@{cur}.javadoc.present"/>
127 <equals arg1="${@{cur}.javadoc.present}" arg2="true"/>
129 <copy todir="${merged.javadoc.dir}/@{cur}">
130 <fileset dir="@{cur}/build/javadoc/"/>
136 <dirset id="dist.contents" dir="build/javadoc" includes="*"/>
137 <property name="prop.dist.contents" refid="dist.contents"/>
138 <for list="${prop.dist.contents}" delimiter=";" param="cur" trim="true">
140 <echo file="${merged.javadoc.dir}/index.html" append="true">
141 <![CDATA[<li><a href="]]>
143 <!-- Extract from project.xml-->
144 <xmlproperty file="@{cur}/nbproject/project.xml" prefix="@{cur}"/>
145 <!--Replace dots for dashes-->
146 <propertyregex property="@{cur}.pack.name"
147 input="${@{cur}.project.configuration.data.code-name-base}"
150 casesensitive="false" />
151 <!--If the package name has no dots the variable is not defined-->
154 <isset property="@{cur}.pack.name"/>
157 <property name="@{cur}.pack.name" value="@{cur}"/>
160 <echo file="${merged.javadoc.dir}/index.html" append="true">
161 @{cur}/${@{cur}.pack.name}/index.html"
163 <echo file="${merged.javadoc.dir}/index.html" append="true">
166 <echo file="${merged.javadoc.dir}/index.html" append="true">
169 <echo file="${merged.javadoc.dir}/index.html" append="true">
170 <![CDATA[</a></li>]]>
174 <echo file="${merged.javadoc.dir}/index.html" append="true">
181 <target name="fix-dependencies" depends="-init">
182 <subant target="fix-dependencies" buildpath="${modules.sorted}" inheritrefs="false" inheritall="false"/>