<?xml version="1.0" encoding="UTF-8"?><!-- -*- sgml-indent-step: 2 -*- -->
<!--
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="openide" default="netbeans" basedir=".">
  <import file="../nbbuild/default.xml"/>

   <!--    
    <property name="netbeans.jalopy.convention" location="convention-netbeans.xml" />
    
   <jalopy fileformat="unix"
            convention="${netbeans.jalopy.convention}"
            history="file"
            historymethod="adler32"
            loglevel="info"
            threads="2"
            destdir="${localdir}"
            classpathref="classpath">
      <fileset dir="src" >
        <selector>
            <and>
                <selector refid="${selector}" />
                <filename name="**/*.java" />
            </and>
        </selector>
      </fileset>
    </jalopy>  
  </target>
  -->

  <target name="netbeans" >
	  <!-- empty target as there are still projects that depend on openide. Fuj! -->
  </target>

  <target name="clean" description="Remove all build products." depends="init">
    <delete dir="build"/>
  </target>

    <!-- support for testing under main trunk version of the ide -->
    <target name="compile-test-single" >
        <property name="build.test.unit.results.dir" location="build/test/results" />
        <ant dir="test" target="buildtests" />
    </target>
    
    <target name="test-single" depends="init" >
        <fail unless="test.includes">Must set test.includes</fail>
        <mkdir dir="${build.test.unit.results.dir}"/>
        <pathconvert property="xtest.includes" >
            <path location="${test.includes}" />
            <chainedmapper>
                <flattenmapper/>
                <globmapper from="*.java" to="*.class" />
            </chainedmapper>
        </pathconvert>
        <ant dir="test" target="runtests" >
            <property name="xtest.attribs" value="empty" />
            <property name="xtest.includes" value="**/${xtest.includes}" />
        </ant>
        <nbbrowse file="test/results/index.html"/>
    </target>
    
    <target name="debug-test-single-nb" depends="init" if="netbeans.home" >
        <fail unless="test.class">Must set test.class</fail>
        
        <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="${test.class}">
            <classpath> 
                <fileset dir="${openide/util.dir}" >
                    <include name="**/*.jar" />
                </fileset>
                <pathelement location="build/test/unit/classes" />
            </classpath>
        </nbjpdastart>
        
        <pathconvert property="xtest.includes"  >
            <path location="${test.class}" />
            <regexpmapper from="^.*\.(.*)" to="\1.class" />
        </pathconvert>
        <ant dir="test" target="runtests" >
            <property name="xtest.attribs" value="empty" />
            <property name="xtest.includes" value="**/${xtest.includes}" />
            <property name="xtest.debug.address" value="${jpda.address}" />
            <property name="xtest.debug.pause" value="false" />
        </ant>
        <nbbrowse file="test/results/index.html"/>
    </target>

    
    <!-- be able to execute all unit tests -->
    <target name="test" >
        <ant dir="test" />
    </target>

</project>
