<?xml version="1.0" encoding="UTF-8"?> <!-- -*- sgml-indent-step: 2 -*- -->
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.


The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common
Development and Distribution License("CDDL") (collectively, 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-gplv2.html
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
specific language governing permissions and limitations under the
License.  When distributing the software, include this License Header
Notice in each file and include the License file at
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
particular file as subject to the "Classpath" exception as provided
by Sun in the GPL Version 2 section of the License file that
accompanied this code. If applicable, add the following below the
License Header, with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"

Contributor(s):

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.

If you wish your version of this file to be governed by only the CDDL
or only the GPL Version 2, indicate your decision by adding
"[Contributor] elects to include this software in this distribution
under the [CDDL or GPL Version 2] license." If you do not indicate a
single choice of license, a recipient has the option to distribute
your version of this file under either the CDDL, the GPL Version 2 or
to extend the choice of license to its licensees as provided above.
However, if you add GPL Version 2 code and therefore, elected the GPL
Version 2 license, then the option applies only if the new code is
made subject to such option by the copyright holder.
-->
<project name="Generate Dependencies for NetBeans Releases" default="ideX" basedir=".">

    <property name="nbroot" location="../../../.."/>
    <property name="netbeans.dest.dir" location="${nbroot}/nbbuild/netbeans"/>
    <property name="generated.files.dir" location="ideX"/>


    <target name="ideX">
        <taskdef name="deps" classname="org.netbeans.nbbuild.ModuleDependencies" classpath="${nbroot}/nbbuild/nbantext.jar"/>
        <mkdir dir="${generated.files.dir}"/>

        <selector id="apisupport">
            <filename name="ide*/**/*apisupport*.jar"/>
        </selector>
        <selector id="java">
            <and>
                <or>
                    <filename name="ide*/**/*java*.jar"/>
                    <filename name="ide*/**/*mdr*.jar"/>
                    <filename name="ide*/**/*jmi*.jar"/>
                    <filename name="ide*/**/org-openide-src.jar"/>
                    <filename name="ide*/**/org-netbeans-modules-junit.jar"/>
                    <filename name="ide*/**/org-netbeans-modules-clazz.jar"/>
                    <!-- o.n.m.db uses classfile just in one small place, otherwise would remove:
                    <filename name="ide*/**/org-netbeans-modules-classfile.jar"/>
                    -->
                    <filename name="ide*/**/org-netbeans-modules-beans.jar"/>
                    <filename name="ide*/**/org-netbeans-modules-form.jar"/>
                    <filename name="ide*/**/org-netbeans-modules-swingapp.jar"/>
                    <filename name="ide*/**/org-netbeans-modules-i18n.jar"/>
                    <filename name="ide*/**/org-netbeans-modules-i18n-form.jar"/>
                    <filename name="ide*/**/org-netbeans-modules-refactoring.jar"/>
                    <filename name="ide*/**/org-netbeans-modules-dbschema.jar"/>
                    <filename name="ide*/**/org-apache-tools-ant-module.jar"/>
                    <filename name="ide*/**/org-netbeans-modules-ant-*.jar"/>
                    <filename name="ide*/**/org-netbeans-modules-project-ant.jar"/>
                    <filename name="ide*/**/org-netbeans-modules-properties*.jar"/>
                    <!-- XXX the dep of derby on o.n.m.java.platform would be easy to remove -->
                    <filename name="ide*/**/org-netbeans-modules-derby.jar"/>
                    <filename name="ide*/**/*jpda*.jar"/>
                    <filename name="ide*/**/*websvc*.jar"/>
                    <filename name="ide*/**/*j2ee*.jar"/>
                    <!-- XXX o.n.m.defaults is suspect; contains some Java-specific bindings -->
                    <!-- XXX o.n.m.usersguide has no obvious home, since refers to features in all clusters -->
                </or>
                <not>
                    <selector refid="apisupport"/>
                </not>
            </and>
        </selector>
        
        <deps>
          <input name="platform">
            <jars dir="${netbeans.dest.dir}">
              <include name="platform*/**/*.jar"/>
            </jars>
          </input>
          <input name="harness">
            <jars dir="${netbeans.dest.dir}">
              <include name="harness/**/*.jar"/>
            </jars>
          </input>
          <input name="ide">
            <jars dir="${netbeans.dest.dir}">
                <selector>
                  <and>
                    <filename name="ide*/**/*.jar"/>
                    <none>
                      <selector refid="java"/>
                      <selector refid="apisupport"/>
                    </none>
                  </and>
                </selector>
            </jars>
          </input>
          <input name="java">
            <jars dir="${netbeans.dest.dir}">
                <selector refid="java"/>
            </jars>
          </input>
          <input name="apisupport">
            <jars dir="${netbeans.dest.dir}">
                <selector>
                  <selector refid="apisupport"/>
                </selector>
            </jars>
          </input>

          <output type="modules" file="${generated.files.dir}/modules.txt" />
          <output type="dependencies" file="${generated.files.dir}/deps.txt" />
          <output type="group-dependencies" file="${generated.files.dir}/cluster-deps.txt" />
          <output type="group-implementation-dependencies" file="${generated.files.dir}/cluster-impl-deps.txt" />
          <output type="implementation-dependencies" file="${generated.files.dir}/impl-deps.txt" />
          <output type="public-packages" file="${generated.files.dir}/public-packages.txt" />
          <output type="shared-packages" file="${generated.files.dir}/shared-packages.txt" />
          <output type="friend-packages" file="${generated.files.dir}/friend-packages.txt" />
        </deps>
    </target>
</project>
