<?xml version="1.0" encoding="UTF-8"?>
<!--
The contents of this file are subject to the terms of the Common Development
and Distribution License (the License). You may not use this file except in
compliance with the License.

You can obtain a copy of the License at http://www.netbeans.org/cddl.html
or http://www.netbeans.org/cddl.txt.

When distributing Covered Code, include this CDDL Header Notice in each file
and include the License file at http://www.netbeans.org/cddl.txt.
If applicable, add the following below the CDDL Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"

The Original Software is NetBeans. The Initial Developer of the Original
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
Microsystems, Inc. All Rights Reserved.
-->
<project name="default" default="init" basedir=".">
  <import file="default-properties.xml"/>
  <import file="jdk.xml"/>

  <target name="init-tasks" unless="tasks-already-set">
    <taskdef name="jhindexer"
         classname="org.netbeans.nbbuild.JHIndexer"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="makenbm"
         classname="org.netbeans.nbbuild.MakeNBM"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="makejnlp"
         classname="org.netbeans.nbbuild.MakeJNLP"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="makemasterjnlp"
         classname="org.netbeans.nbbuild.MakeMasterJNLP"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="genlist"
         classname="org.netbeans.nbbuild.MakeListOfNBM"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="setcluster"
         classname="org.netbeans.nbbuild.SetCluster"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="getmodulename"
         classname="org.netbeans.nbbuild.GetModuleName"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="createmodulexml"
         classname="org.netbeans.nbbuild.CreateModuleXML"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="locjar"
         classname="org.netbeans.nbbuild.LocalizedJar"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="locjhindexer"
         classname="org.netbeans.nbbuild.LocJHIndexer"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="locmakenbm"
         classname="org.netbeans.nbbuild.LocMakeNBM"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="parseprojectxml"
         classname="org.netbeans.nbbuild.ParseProjectXml"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="jarwithmoduleattributes"
         classname="org.netbeans.nbbuild.JarWithModuleAttributes"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="arch"
         classname="org.netbeans.nbbuild.Arch"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="fixdependencies"
         classname="org.netbeans.nbbuild.FixDependencies"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="sortsuitemodules"
         classname="org.netbeans.nbbuild.SortSuiteModules"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="verifyclasslinkage"
         classname="org.netbeans.nbbuild.VerifyClassLinkage"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <taskdef name="checklicense"
         classname="org.netbeans.nbbuild.CheckLicense"
         classpath="${nb_all}/nbbuild/nbantext.jar"/>
    <property name="tasks-already-set" value="true"/>
  </target>
  
  <target name="init" depends="init-tasks">
    <!-- Gets the module name -->
    <getmodulename name="module.name" root="${nb_all}"/>
    
    <property name="cluster.dir.fallback" value="extra" />
    <setcluster name="cluster.dir" module="${module.name}" list="${clusters.list}" defaultLocation="${cluster.dir.fallback}"/>

    <property name="cluster" location="${netbeans.dest.dir}/${cluster.dir}"/> <!-- #59872 -->

    <!-- Creating the output directory -->
    <mkdir dir="${cluster}"/>

    <!-- Writing the module's cluster to property file -->
    <propertyfile file="${moduleCluster.file}">
      <entry  key="${module.name}.dir" value="$${netbeans.dest.dir}/${cluster.dir}"/>
    </propertyfile>
  </target>
  
</project>
