build.xml
author PGebauer <pgebauer@netbeans.org>
Mon, 19 Dec 2016 12:18:33 +0100
branchdonation_review
changeset 2005 b7c1c51ac6f9
parent 915 3158342e9243
permissions -rw-r--r--
The donation_review branch created.
mzlamal@20
     1
<?xml version="1.0" encoding="UTF-8"?>
mzlamal@20
     2
<!--
mzlamal@20
     3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
mzlamal@20
     4
mzlamal@20
     5
Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
mzlamal@20
     6
mzlamal@20
     7
mzlamal@20
     8
The contents of this file are subject to the terms of either the GNU
mzlamal@20
     9
General Public License Version 2 only ("GPL") or the Common
mzlamal@20
    10
Development and Distribution License("CDDL") (collectively, the
mzlamal@20
    11
"License"). You may not use this file except in compliance with the
mzlamal@20
    12
License. You can obtain a copy of the License at
mzlamal@20
    13
http://www.netbeans.org/cddl-gplv2.html
mzlamal@20
    14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
mzlamal@20
    15
specific language governing permissions and limitations under the
mzlamal@20
    16
License.  When distributing the software, include this License Header
mzlamal@20
    17
Notice in each file and include the License file at
mzlamal@20
    18
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
mzlamal@20
    19
particular file as subject to the "Classpath" exception as provided
mzlamal@20
    20
by Sun in the GPL Version 2 section of the License file that
mzlamal@20
    21
accompanied this code. If applicable, add the following below the
mzlamal@20
    22
License Header, with the fields enclosed by brackets [] replaced by
mzlamal@20
    23
your own identifying information:
mzlamal@20
    24
"Portions Copyrighted [year] [name of copyright owner]"
mzlamal@20
    25
mzlamal@20
    26
Contributor(s):
mzlamal@20
    27
mzlamal@20
    28
The Original Software is NetBeans. The Initial Developer of the Original
mzlamal@20
    29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
mzlamal@20
    30
Microsystems, Inc. All Rights Reserved.
mzlamal@20
    31
mzlamal@20
    32
If you wish your version of this file to be governed by only the CDDL
mzlamal@20
    33
or only the GPL Version 2, indicate your decision by adding
mzlamal@20
    34
"[Contributor] elects to include this software in this distribution
mzlamal@20
    35
under the [CDDL or GPL Version 2] license." If you do not indicate a
mzlamal@20
    36
single choice of license, a recipient has the option to distribute
mzlamal@20
    37
your version of this file under either the CDDL, the GPL Version 2 or
mzlamal@20
    38
to extend the choice of license to its licensees as provided above.
mzlamal@20
    39
However, if you add GPL Version 2 code and therefore, elected the GPL
mzlamal@20
    40
Version 2 license, then the option applies only if the new code is
mzlamal@20
    41
made subject to such option by the copyright holder.
mzlamal@20
    42
-->
mzlamal@20
    43
<!DOCTYPE someant  [
mzlamal@20
    44
  <!ENTITY links SYSTEM "javadoctools/links.xml">
mzlamal@20
    45
  <!ENTITY properties SYSTEM "javadoctools/properties.xml">
mzlamal@20
    46
  <!ENTITY replaces SYSTEM "javadoctools/replaces.xml">
mzlamal@20
    47
  <!ENTITY disallowed-links SYSTEM "javadoctools/disallowed-links.xml">
mzlamal@20
    48
]>
mzlamal@20
    49
mzlamal@20
    50
<project name="ml-build" default="build" basedir=".">
rnovak@417
    51
  <import file="../nbbuild/default.xml"/>
rnovak@417
    52
mzlamal@20
    53
  <target name="assure-ant">
mzlamal@20
    54
      <fail message="You need Ant version 1.7.0 or later to build NetBeans.">
mzlamal@20
    55
          <condition>
mzlamal@20
    56
              <not>
mzlamal@20
    57
                  <antversion atleast="1.7.0"/>
mzlamal@20
    58
              </not>
mzlamal@20
    59
          </condition>
mzlamal@20
    60
      </fail>
mzlamal@20
    61
  </target>
mzlamal@20
    62
mzlamal@20
    63
  <!-- Fallback for ant.core.lib - it is not set in some cases - 124554 -->
mzlamal@20
    64
  <available property="ant.core.lib" value="${ant.home}/lib/ant.jar" file="${ant.home}/lib/ant.jar"/>
mzlamal@20
    65
  <!-- if the previous location is not correct than find the ant.jar from the java.class.path value -->
mzlamal@20
    66
  <pathconvert property="ant.core.lib">
mzlamal@20
    67
    <mapper type="regexp" from="${path.separator}([^${path.separator}]*ant.jar)${path.separator}" to="\1"/>
mzlamal@20
    68
    <path location="${path.separator}${java.class.path}${path.separator}"/>
mzlamal@20
    69
  </pathconvert>
mzlamal@20
    70
mzlamal@20
    71
  <target name="bootstrap"
mzlamal@20
    72
          description="Bootstrap NetBeans-specific Ant extensions."
mzlamal@20
    73
          depends="assure-ant">
mzlamal@20
    74
    <property file="build.properties"/>
mzlamal@20
    75
    <property name="main.dir" location=".."/>
mzlamal@20
    76
    <property name="jh.jar" value="apisupport.harness/external/jsearch*.jar"/>
mzlamal@20
    77
    <property name="jsearch.jar" value="javahelp/external/jh*.jar"/>
mzlamal@20
    78
mzlamal@20
    79
    <mkdir dir="build/antclasses"/>
mzlamal@20
    80
    <echo message="Bootstrapping NetBeans-specific Ant extensions..."/>
mzlamal@20
    81
    <path id="bootstrap-cp">
mzlamal@20
    82
     <pathelement location="${ant.core.lib}"/>
mzlamal@20
    83
     <fileset dir="${main.dir}">
mzlamal@20
    84
        <!-- For JavaHelp indexing: -->
mzlamal@20
    85
        <include name="${jh.jar}"/>
mzlamal@20
    86
        <!-- For JavaHelp link checking: -->
mzlamal@20
    87
        <include name="${jsearch.jar}"/>
mzlamal@20
    88
      </fileset>
jglick@1651
    89
     <pathelement location="${nbantext.jar}"/>
mzlamal@20
    90
    </path>
mzlamal@20
    91
    <!-- Sanity check: -->
mzlamal@20
    92
    <pathconvert pathsep=":" property="class.files.in.antsrc">
mzlamal@20
    93
        <path>
mzlamal@20
    94
            <fileset dir="antsrc">
mzlamal@20
    95
                <include name="**/*.class"/>
mzlamal@20
    96
            </fileset>
mzlamal@20
    97
        </path>
mzlamal@20
    98
    </pathconvert>
mzlamal@20
    99
    <fail>
mzlamal@20
   100
        <condition>
mzlamal@20
   101
            <not>
mzlamal@20
   102
                <equals arg1="${class.files.in.antsrc}" arg2=""/>
mzlamal@20
   103
            </not>
mzlamal@20
   104
        </condition>
mzlamal@20
   105
        You have stray *.class files in ${basedir}/antsrc which you must remove.
mzlamal@20
   106
        Probably you failed to clean your sources before updating. Try: ant hg-clean
mzlamal@20
   107
    </fail>
mzlamal@20
   108
    <!-- OK, continue: -->
mzlamal@20
   109
    <javac srcdir="antsrc" destdir="build/antclasses" deprecation="true" debug="true" source="1.5" target="1.5">
mzlamal@20
   110
      <classpath refid="bootstrap-cp"/>
mzlamal@20
   111
      <compilerarg line="-Xlint -Xlint:-serial"/>
mzlamal@20
   112
    </javac>
mzlamal@20
   113
    <jar jarfile="l10nantext.jar">
mzlamal@20
   114
      <fileset dir="build/antclasses"/>
mzlamal@20
   115
      <fileset dir="antsrc">
mzlamal@20
   116
        <exclude name="**/*.java"/>
mzlamal@20
   117
        <exclude name="**/package.html"/>
mzlamal@20
   118
        <exclude name="package-list"/>
mzlamal@20
   119
      </fileset>
mzlamal@20
   120
    </jar>
mzlamal@20
   121
  </target>
mzlamal@20
   122
mzlamal@20
   123
  <target name="-hg-check-can-clean">
mzlamal@20
   124
    <available property="can.hg.clean" type="dir" file="../.hg"/>
mzlamal@20
   125
  </target>
mzlamal@20
   126
  <target name="-hg-clean-alternative" depends="-hg-check-can-clean" unless="can.hg.clean">
mzlamal@20
   127
    <antcall target="-real-clean"/>
mzlamal@20
   128
  </target>
mzlamal@20
   129
  <target name="hg-clean" depends="-hg-clean-alternative" if="can.hg.clean"
mzlamal@20
   130
          description="Clean everything possible.">
mzlamal@20
   131
    <antcall target="-do-hg-clean">
mzlamal@20
   132
      <!-- <include name="."/> does not seem to work in a dirset -->
mzlamal@22
   133
      <param name="basedir" location="."/>
mzlamal@20
   134
    </antcall>
mzlamal@20
   135
  </target>
mzlamal@20
   136
  <target name="-do-hg-clean">
mzlamal@20
   137
    <echo>Cleaning untracked files in ${basedir}...</echo>
mzlamal@20
   138
    <exec executable="hg" failonerror="yes" outputproperty="hg.unknown.files">
mzlamal@20
   139
      <arg value="--cwd"/>
mzlamal@20
   140
      <arg file="."/>
mzlamal@20
   141
      <arg value="status"/>
mzlamal@20
   142
      <arg value="--unknown"/>
mzlamal@20
   143
      <arg value="--no-status"/>
mzlamal@20
   144
    </exec>
mzlamal@20
   145
    <fail message="Will not run clean; checkout contains unknown and not ignored files (did you forget to hg add?):&#10;${hg.unknown.files}">
mzlamal@20
   146
        <condition>
mzlamal@20
   147
            <not>
mzlamal@20
   148
                <equals arg1="${hg.unknown.files}" arg2=""/>
mzlamal@20
   149
            </not>
mzlamal@20
   150
        </condition>
mzlamal@20
   151
    </fail>
mzlamal@20
   152
    <exec executable="hg" failonerror="yes">
mzlamal@20
   153
      <arg value="--cwd"/>
mzlamal@20
   154
      <arg file="."/>
mzlamal@20
   155
      <arg value="--config"/>
mzlamal@20
   156
      <arg value="extensions.purge="/>
mzlamal@20
   157
      <arg value="--verbose"/>
mzlamal@20
   158
      <arg value="clean"/>
mzlamal@20
   159
      <arg value="--all"/>
mzlamal@20
   160
      <arg value="--exclude"/>
mzlamal@20
   161
      <!-- Do not use **/nbproject/private/ as this will match some test/{results,work} dirs: -->
mzlamal@20
   162
      <arg value="glob:{*/nbproject/private/**,*/*/nbproject/private/**,**/user.build.properties,nbbuild/misc/build-site-local.sh}"/>
mzlamal@20
   163
    </exec>
mzlamal@20
   164
  </target>
mzlamal@20
   165
mzlamal@20
   166
 <target name="build" depends="bootstrap">
mzlamal@20
   167
    <taskdef name="jhindexer"
mzlamal@20
   168
         classname="org.netbeans.nbbuild.JHIndexer"
jglick@1651
   169
         classpath="${nbantext.jar}"/>
mzlamal@20
   170
    <taskdef name="locjhindexer"
mzlamal@20
   171
         classname="org.netbeans.nbbuild.LocJHIndexer"
jglick@1651
   172
         classpath="${nbantext.jar}"/>
rnovak@489
   173
    <taskdef name="repeat"
rnovak@489
   174
         classname="org.netbeans.nbbuild.Repeat"
jglick@1651
   175
         classpath="${nbantext.jar}"/> 
mzlamal@20
   176
mzlamal@20
   177
     <property name="locjhindexer.jhall" value="${main.dir}/${jh.jar}"/>
mzlamal@47
   178
     <property name="locales" value="ja,zh_CN,pt_BR"/>
mzlamal@24
   179
     <property name="dist.dir" location="dist"/>
mzlamal@85
   180
     <property name="nbms.dist.dir" location="nbms"/>
mzlamal@85
   181
     <property name="nbms.dir" location="../nbbuild/nbms"/>
mzlamal@85
   182
     <property name="keystore" location=""/>
mzlamal@85
   183
     <property name="storepass" value=""/>
mzlamal@85
   184
     <property name="nbm_alias" value="nb_ide"/>
mzlamal@24
   185
     
mzlamal@20
   186
     <taskdef name="package-build" classname="org.netbeans.l10n.Package">
mzlamal@20
   187
        <classpath>
mzlamal@20
   188
            <pathelement path="l10nantext.jar"/>
jglick@1651
   189
            <pathelement path="${nbantext.jar}"/>
mzlamal@20
   190
        </classpath>
mzlamal@20
   191
     </taskdef>
mzlamal@85
   192
     <package-build src="src" locales="${locales}" dist="${dist.dir}" nbms="${nbms.dir}" nbmsDist="${nbms.dist.dir}" 
mzlamal@573
   193
                    keystore="${keystore}" storepass="${storepass}" alias="${nbm_alias}">
mzlamal@573
   194
            <classpath>
jglick@1651
   195
                <pathelement location="${nbantext.jar}"/>
mzlamal@573
   196
                <fileset dir="${main.dir}">
mzlamal@573
   197
                    <include name="apisupport.harness/external/jsearch*.jar"/>
mzlamal@573
   198
                </fileset>
mzlamal@573
   199
                <fileset dir="${netbeans.dest.dir}">
mzlamal@573
   200
                    <include name="harness/jsearch*.jar"/>
mzlamal@573
   201
                </fileset>
mzlamal@573
   202
            </classpath>
mzlamal@573
   203
     </package-build>
rnovak@489
   204
     <repeat target="copy-docs-for-locale" name="one.locale" values="${locales}"/>
rnovak@489
   205
 </target>
rnovak@489
   206
rnovak@489
   207
 <target name="copy-docs-for-locale" if="one.locale"> 
mzlamal@89
   208
     <copy todir="${dist.dir}" flatten="true">
mzlamal@47
   209
         <fileset dir="src">
rnovak@489
   210
            <include name="*/other/ide.branding/release-toplevel/*_${one.locale}.html"/>
mzlamal@47
   211
         </fileset>
mzlamal@47
   212
     </copy>
masaki@915
   213
     <copy todir="${dist.dir}/nb" flatten="true">
mzlamal@47
   214
         <fileset dir="src">
rnovak@489
   215
            <include name="*/other/ide.branding/release/*_${one.locale}.pdf"/>
mzlamal@47
   216
         </fileset>
mzlamal@47
   217
     </copy>
mzlamal@20
   218
 </target>
mzlamal@20
   219
rnovak@417
   220
 <target name="build-community-nbms" depends="bootstrap,init-tasks">
rnovak@417
   221
      <taskdef name="repeat" classname="org.netbeans.nbbuild.Repeat"
jglick@1651
   222
               classpath="${nbantext.jar}"/>
rnovak@417
   223
rnovak@417
   224
      <pathconvert property="dlocales" setonempty="false">
rnovak@417
   225
          <path path="${locales}"/>
rnovak@417
   226
          <chainedmapper>
rnovak@417
   227
          <filtermapper>
rnovak@417
   228
              <replacestring from="," to="_"/>
rnovak@417
   229
              <replacestring from="-" to="_"/>
rnovak@417
   230
          </filtermapper>
rnovak@417
   231
          <flattenmapper/>
rnovak@417
   232
          </chainedmapper>
rnovak@417
   233
      </pathconvert>
rnovak@417
   234
rnovak@417
   235
      <property name="netbeans.dest.dir.ml" location="nbms/community/${dlocales}"/>
rnovak@417
   236
      <mkdir dir="${netbeans.dest.dir.ml}"/>
rnovak@417
   237
rnovak@417
   238
      <property name="netbeans.build.dir.ml" location="build/community"/>
rnovak@417
   239
      <delete dir="${netbeans.build.dir.ml}"/>
rnovak@417
   240
      <mkdir dir="${netbeans.build.dir.ml}"/>
rnovak@417
   241
rnovak@417
   242
      <tstamp>
rnovak@417
   243
          <format property="spec.version" pattern="yyyy.M.d.kmm" locale="en" />
rnovak@417
   244
      </tstamp>
rnovak@417
   245
      <delete file="build/ml/cluster-nbms-ml.properties"/>
rnovak@417
   246
rnovak@417
   247
      <pathconvert property="base.dir" pathsep=",">
rnovak@417
   248
          <path>
rnovak@417
   249
              <pathelement location="dist"/>
rnovak@417
   250
          </path>
rnovak@417
   251
      </pathconvert>
rnovak@417
   252
rnovak@417
   253
      <echo>Base dir: ${base.dir}</echo>
rnovak@417
   254
rnovak@417
   255
      <pathconvert property="comm.clusters.list" pathsep=",">
rnovak@417
   256
          <path>
rnovak@417
   257
              <dirset dir="dist" id="cluster.dirs">
rnovak@417
   258
                  <include name="*"/>
rnovak@417
   259
                  <exclude name="nb*.*"/>
rnovak@417
   260
              </dirset>
rnovak@417
   261
          </path>
rnovak@417
   262
          <map from="${base.dir}/" to=""/>
rnovak@417
   263
      </pathconvert>
rnovak@417
   264
rnovak@417
   265
      <echo>Cluster dirs: ${comm.clusters.list}</echo>
rnovak@417
   266
      <condition property="is.localized" value="true">
rnovak@417
   267
          <not>
rnovak@417
   268
             <equals arg1="${comm.clusters.list}" arg2="" trim="true"/>
rnovak@417
   269
          </not>
rnovak@417
   270
      </condition>
rnovak@417
   271
      <echo>IS localized: ${is.localized}</echo>
rnovak@417
   272
rnovak@417
   273
      <antcall target="build-all-nbm-ml"/>
rnovak@417
   274
  </target>
rnovak@417
   275
rnovak@417
   276
  <target name="build-all-nbm-ml" if="is.localized">
rnovak@417
   277
      <repeat target="build-one-nbm-ml" name="one.cluster.dir.ml" values="${comm.clusters.list}"/>
rnovak@417
   278
      <antcall target="build-one-nbm-ml" inheritall="false">
rnovak@417
   279
          <param name="is.kit" value="true"/>
rnovak@417
   280
          <param name="locales" value="${locales}"/>
rnovak@417
   281
          <param name="dlocales" value="${dlocales}"/>
rnovak@621
   282
          <param name="one.cluster.dir.ml" value="nb6.7"/>
rnovak@417
   283
          <param name="nb.cluster.nb" value="${nb.cluster.nb}"/>
rnovak@417
   284
          <param name="comm.clusters.list" value="${comm.clusters.list}"/>
rnovak@417
   285
          <param name="spec.version" value="${spec.version}"/>
rnovak@417
   286
          <param name="netbeans.dest.dir.ml" value="${netbeans.dest.dir.ml}"/>
rnovak@417
   287
          <param name="netbeans.build.dir.ml" value="${netbeans.build.dir.ml}"/>
rnovak@417
   288
          <param name="buildnumber" value="${buildnumber}"/>
rnovak@417
   289
      </antcall>
rnovak@417
   290
  </target>
rnovak@417
   291
rnovak@417
   292
rnovak@417
   293
  <target name="-create-cluster-ml-nbm-metadata" unless="is.kit">
rnovak@417
   294
      <echo file="build/ml/nbms/tmp/manifest.mf">OpenIDE-Module: ${code.name}
rnovak@417
   295
OpenIDE-Module-Localizing-Bundle: ${code.name.base.slashes}/Bundle.properties
rnovak@417
   296
OpenIDE-Module-Specification-Version: ${spec.version}
rnovak@417
   297
</echo>
rnovak@417
   298
      <echo file="build/ml/nbms/classes/${code.name.base.slashes}/Bundle.properties">
rnovak@621
   299
OpenIDE-Module-Name=NetBeans 6.7 ${one.cluster.dir.ml} cluster localization (${locales})
rnovak@417
   300
OpenIDE-Module-Display-Category=Localization
rnovak@621
   301
OpenIDE-Module-Short-Description=NetBeans 6.7 ${one.cluster.dir.ml} cluster localization (${locales})
rnovak@621
   302
OpenIDE-Module-Long-Description=Delivers ${locales} localization for all modules in ${one.cluster.dir.ml} cluster of NetBeans 6.7
rnovak@417
   303
</echo>
rnovak@417
   304
  </target>
rnovak@417
   305
 
rnovak@417
   306
    <target name="-prepare-localizing-bundles" if="one.kit.locale">
rnovak@417
   307
       <echo file="build/ml/nbms/classes/${code.name.base.slashes}/Bundle_${one.kit.locale}.properties">
rnovak@621
   308
OpenIDE-Module-Name=NetBeans 6.7 ${one.kit.locale} localization plugin
rnovak@417
   309
OpenIDE-Module-Display-Category=Localization
rnovak@621
   310
OpenIDE-Module-Short-Description=NetBeans 6.7 ${one.kit.locale} localization plugin
rnovak@621
   311
OpenIDE-Module-Long-Description=Delivers ${one.kit.locale} localization of whole NetBeans 6.7
rnovak@417
   312
</echo>
rnovak@417
   313
       <!-- try to look for Bundle properties file provided by translation team -->
rnovak@417
   314
       <copy file="l10n_uc_kits/${code.name.base.slashes}/../${one.kit.locale}/Bundle.properties"
rnovak@417
   315
             tofile="build/ml/nbms/classes/${code.name.base.slashes}/Bundle_${one.kit.locale}.properties"
rnovak@417
   316
             overwrite="true"
rnovak@417
   317
             failonerror="false"/>
rnovak@417
   318
       <!-- enforce display category to be "Localization", the same for all umbrella kit NBMs -->
rnovak@417
   319
       <propertyfile file="build/ml/nbms/classes/${code.name.base.slashes}/Bundle_${one.kit.locale}.properties">
rnovak@417
   320
         <entry key="OpenIDE-Module-Display-Category" value="Localization"/>
rnovak@417
   321
       </propertyfile>
rnovak@417
   322
    </target>
rnovak@417
   323
rnovak@417
   324
    <target name="-create-kit-ml-nbm-metadata" if="is.kit">
rnovak@417
   325
      <echo file="build/ml/nbms/tmp/manifest.mf">OpenIDE-Module: ${code.name}
rnovak@417
   326
OpenIDE-Module-Localizing-Bundle: ${code.name.base.slashes}/Bundle.properties
rnovak@417
   327
OpenIDE-Module-Specification-Version: ${spec.version}
rnovak@417
   328
OpenIDE-Module-Module-Dependencies: ${kit.deps}
rnovak@417
   329
</echo>
rnovak@417
   330
       <!-- prepare localization jarfiles - it's just for localized info.xml files inf NBMs -->
rnovak@417
   331
<!--
rnovak@417
   332
       <repeat target="-prepare-localizing-bundles" name="one.kit.locale" values="${locales}"/>
rnovak@417
   333
       <property name="locjar.locales" value="${locales}"/>
rnovak@417
   334
       <locjar jarfile="${cluster}/${module.jar}"
rnovak@417
   335
               basedir="build/ml/nbms/classes"
rnovak@417
   336
               compress="false"/>
rnovak@417
   337
       <delete>
rnovak@417
   338
           <fileset dir="build/ml/nbms/classes/${code.name.base.slashes}" includes="Bundle_*.properties"/>
rnovak@417
   339
       </delete>
rnovak@417
   340
-->
rnovak@417
   341
rnovak@417
   342
       <!-- create default Bundle properties -->
rnovak@417
   343
       <echo file="build/ml/nbms/classes/${code.name.base.slashes}/Bundle.properties">
rnovak@621
   344
OpenIDE-Module-Name=NetBeans 6.7 ${locales} localization kit
rnovak@417
   345
OpenIDE-Module-Display-Category=Localization
rnovak@621
   346
OpenIDE-Module-Short-Description=NetBeans 6.7 ${locales} localization kit
rnovak@621
   347
OpenIDE-Module-Long-Description=Delivers ${locales} localization of whole NetBeans 6.7
rnovak@417
   348
</echo>
rnovak@417
   349
       <!-- try to look for Bundle properties file provided by translation team -->
rnovak@417
   350
       <copy file="../translatedfiles/src/nbbuild/${code.name.base.slashes}/Bundle.properties"
rnovak@417
   351
             tofile="build/ml/nbms/classes/${code.name.base.slashes}/Bundle.properties"
rnovak@417
   352
             overwrite="true"
rnovak@417
   353
             failonerror="false"/>
rnovak@417
   354
       <!-- enforce display category to be "Localization", the same for all umbrella kit NBMs -->
rnovak@417
   355
       <propertyfile file="build/ml/nbms/classes/${code.name.base.slashes}/Bundle.properties">
rnovak@417
   356
         <entry key="OpenIDE-Module-Display-Category" value="Localization"/>
rnovak@417
   357
       </propertyfile>
rnovak@417
   358
  </target>
rnovak@417
   359
rnovak@417
   360
  <target name="-check-ml-nbm-props">
rnovak@417
   361
      <condition property="run.ml.nbm.build" value="true">
rnovak@417
   362
          <and>
rnovak@417
   363
              <isset property="locales"/>
rnovak@417
   364
              <isset property="dlocales"/>
rnovak@417
   365
              <isset property="one.cluster.dir.ml"/>
rnovak@417
   366
              <isset property="comm.clusters.list"/>
rnovak@417
   367
              <isset property="spec.version"/>
rnovak@417
   368
              <isset property="netbeans.dest.dir.ml"/>
rnovak@417
   369
              <isset property="netbeans.build.dir.ml"/>
rnovak@417
   370
          </and>
rnovak@417
   371
      </condition>
rnovak@417
   372
  </target>
rnovak@417
   373
rnovak@417
   374
  <target name="build-one-nbm-ml" depends="init-tasks,-check-ml-nbm-props" if="run.ml.nbm.build">
rnovak@417
   375
      <property file="build/ml/cluster-nbms-ml.properties"/>
rnovak@417
   376
rnovak@417
   377
      <echo>Cluster dir: ${one.cluster.dir.ml}</echo>
rnovak@417
   378
rnovak@417
   379
      <pathconvert property="cluster.package.dir" setonempty="false">
rnovak@417
   380
          <path path="${one.cluster.dir.ml}"/>
rnovak@417
   381
          <chainedmapper>
rnovak@417
   382
          <filtermapper>
rnovak@417
   383
              <replacestring from="," to="_"/>
rnovak@417
   384
              <replacestring from="-" to="_"/>
rnovak@417
   385
              <replacestring from="." to="_"/>
rnovak@417
   386
          </filtermapper>
rnovak@417
   387
          <flattenmapper/>
rnovak@417
   388
          </chainedmapper>
rnovak@417
   389
      </pathconvert>
rnovak@417
   390
      <property name="cluster" location="${netbeans.build.dir.ml}/${one.cluster.dir.ml}"/>
rnovak@417
   391
rnovak@417
   392
      <delete dir="build/ml/nbms"/>
rnovak@417
   393
      <delete dir="${netbeans.build.dir.ml}"/>
rnovak@417
   394
      <mkdir dir="${netbeans.build.dir.ml}/${one.cluster.dir.ml}"/>
rnovak@417
   395
      <copy todir="${netbeans.build.dir.ml}/${one.cluster.dir.ml}">
rnovak@417
   396
          <fileset dir="dist/${one.cluster.dir.ml}"/>
rnovak@417
   397
      </copy>
rnovak@417
   398
rnovak@417
   399
      <condition property="code.name.base" value="org.netbeans.localization.${cluster.package.dir}.${dlocales}">
rnovak@417
   400
          <not>
rnovak@417
   401
              <isset property="is.kit"/>
rnovak@417
   402
          </not>
rnovak@417
   403
      </condition>
rnovak@417
   404
      <condition property="code.name.base" value="org.netbeans.localization.kit.${cluster.package.dir}.${dlocales}">
rnovak@417
   405
          <isset property="is.kit"/>
rnovak@417
   406
      </condition>
rnovak@417
   407
rnovak@417
   408
      <pathconvert property="code.name.base.slashes" setonempty="false">
rnovak@417
   409
          <path path="${code.name.base}"/>
rnovak@417
   410
          <chainedmapper>
rnovak@417
   411
              <flattenmapper/>
rnovak@417
   412
              <filtermapper>
rnovak@417
   413
                  <replacestring from="." to="/"/>
rnovak@417
   414
              </filtermapper>
rnovak@417
   415
          </chainedmapper>
rnovak@417
   416
      </pathconvert>
rnovak@417
   417
      <pathconvert property="code.name.base.dashes" setonempty="false">
rnovak@417
   418
          <path path="${code.name.base}"/>
rnovak@417
   419
          <chainedmapper>
rnovak@417
   420
              <flattenmapper/>
rnovak@417
   421
              <filtermapper>
rnovak@417
   422
                  <replacestring from="." to="-"/>
rnovak@417
   423
              </filtermapper>
rnovak@417
   424
          </chainedmapper>
rnovak@417
   425
      </pathconvert>
rnovak@417
   426
      <property name="public.packages" value="${code.name.base}.*"/>
rnovak@417
   427
      <property name="code.name" value="${code.name.base}/1"/>
rnovak@417
   428
      <mkdir dir="build/ml/nbms/classes/${code.name.base.slashes}"/>
rnovak@417
   429
      <mkdir dir="build/ml/nbms/tmp"/>
rnovak@417
   430
      <antcall target="-create-cluster-ml-nbm-metadata"/>
rnovak@417
   431
      <antcall target="-create-kit-ml-nbm-metadata"/>
rnovak@417
   432
      <property name="is.autoload" value="false"/>
rnovak@417
   433
      <property name="is.eager" value="false"/>
rnovak@417
   434
      <condition property="module.jar.dir" value="modules">
rnovak@417
   435
          <!-- set module.jar.dir property only when building kit NBM - leads to               AutoUpdate-Show-In-Client manifest attribute is set to true -->
rnovak@417
   436
          <isset property="is.kit"/>
rnovak@417
   437
      </condition>
rnovak@417
   438
      <property name="module.jar" value="modules/${code.name.base.dashes}.jar"/>      <mkdir dir="${cluster}/modules"/>
rnovak@417
   439
      <jarwithmoduleattributes jarfile="${cluster}/${module.jar}"
rnovak@417
   440
          compress="${build.package.compress}"
rnovak@417
   441
          index="${build.package.index}"
rnovak@417
   442
          manifest="build/ml/nbms/tmp/manifest.mf">
rnovak@417
   443
          <fileset dir="build/ml/nbms/classes"/>
rnovak@417
   444
      </jarwithmoduleattributes>
rnovak@417
   445
      <createmodulexml xmldir="${cluster}/config/Modules">
rnovak@417
   446
          <enabled dir="${cluster}">
rnovak@417
   447
              <include name="${module.jar}"/>
rnovak@417
   448
          </enabled>
rnovak@417
   449
      </createmodulexml>
rnovak@417
   450
      <patternset id="module.files">
rnovak@417
   451
          <!-- include name="${module.jar}"/ -->
rnovak@417
   452
          <include name="**/*.jar"/>
rnovak@417
   453
          <include name="config/Modules/${code.name.base.dashes}.xml"/>
rnovak@417
   454
      </patternset>
rnovak@417
   455
      <property name="module.files.toString" refid="module.files"/>
rnovak@417
   456
      <echo level="verbose">Basic matching module files (${code.name.base.dashes}): ${module.files.toString}</echo>
rnovak@417
   457
      <genlist outputfiledir="${cluster}" module="${module.jar}">
rnovak@417
   458
          <fileset dir="${cluster}">
rnovak@417
   459
              <patternset refid="module.files"/>
rnovak@417
   460
          </fileset>
rnovak@417
   461
      </genlist>
rnovak@417
   462
      <property name="license.file.override" location="build/ml/nbms/license"/>
rnovak@417
   463
      <property name="extra.license.files" value=""/>
jglick@1651
   464
      <taskdef name="releasefileslicense" classname="org.netbeans.nbbuild.extlibs.ReleaseFilesLicense" classpath="${nbantext.jar}"/>
rnovak@417
   465
      <releasefileslicense license="${license.file.override}" standardlicense="${nb_all}/nbbuild/standard-nbm-license.txt" extralicensefiles="${extra.license.files}"/>
jglick@1651
   466
      <taskdef name="makenbm" classname="org.netbeans.nbbuild.MakeNBM" classpath="${nbantext.jar}"/>
rnovak@417
   467
      <property name="nbm_alias" value="nb_ide"/>
rnovak@417
   468
      <makenbm file="build/ml/${code.name.base.dashes}.nbm"
rnovak@417
   469
               productdir="${cluster}"
rnovak@417
   470
               module="${module.jar}"
rnovak@417
   471
               homepage="http://translatedfiles.netbeans.org/"
rnovak@417
   472
               distribution="http://translatedfiles.netbeans.org/"
rnovak@417
   473
               needsrestart="true"
rnovak@417
   474
               global="true"
rnovak@417
   475
               targetcluster="${one.cluster.dir.ml}"
rnovak@417
   476
               releasedate=""
rnovak@417
   477
               moduleauthor="">
rnovak@417
   478
          <license file="${license.file.override}"/>
rnovak@417
   479
          <signature keystore="${keystore}" storepass="${storepass}" alias="${nbm_alias}"/>
rnovak@417
   480
      </makenbm>
rnovak@417
   481
      <move todir="${netbeans.dest.dir.ml}" file="build/ml/${code.name.base.dashes}.nbm"/>
rnovak@417
   482
      <property file="build/ml/cluster-nbms-ml.properties"/>
rnovak@417
   483
      <condition property="new.kit.deps" value="${code.name} &gt; ${spec.version}">
rnovak@417
   484
          <and>
rnovak@417
   485
              <not>
rnovak@417
   486
                  <isset property="kit.deps"/>
rnovak@417
   487
              </not>
rnovak@417
   488
              <not>
rnovak@417
   489
                  <isset property="is.kit"/>
rnovak@417
   490
              </not>
rnovak@417
   491
          </and>
rnovak@417
   492
      </condition>
rnovak@417
   493
      <condition property="new.kit.deps" value="${kit.deps},${code.name} &gt; ${spec.version}">
rnovak@417
   494
          <and>
rnovak@417
   495
              <isset property="kit.deps"/>
rnovak@417
   496
              <not>
rnovak@417
   497
                  <isset property="is.kit"/>
rnovak@417
   498
              </not>
rnovak@417
   499
          </and>
rnovak@417
   500
      </condition>
rnovak@417
   501
      <condition property="new.kit.deps" value="${kit.deps}">
rnovak@417
   502
          <isset property="is.kit"/>
rnovak@417
   503
      </condition>
rnovak@417
   504
      <propertyfile file="build/ml/cluster-nbms-ml.properties">
rnovak@417
   505
          <entry key="kit.deps" value="${new.kit.deps}"/>
rnovak@417
   506
      </propertyfile>
rnovak@417
   507
rnovak@417
   508
 </target>
rnovak@417
   509
mzlamal@24
   510
</project>