1. netbeans
  2. main-silver

Source

main-silver / testtools / build.xml

<?xml version='1.0' encoding='ISO-8859-1' ?>
<!--
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="testtools" default="netbeans" basedir=".">
  <import file="../nbbuild/default.xml"/>

  <property name="nbroot" value=".."/>
  <property name="nbext" value="${nbroot}/nbbuild"/>
  <property name="nbm_alias" value="nb_ide"/>
  <property name="homepage.base" value="netbeans.org"/>
  <property name="dist.base" value="www.netbeans.org/download/nbms/40"/>
  <property name="license.file" value="${nbext}/standard-nbm-license.txt"/>
  <property name="build.compiler.debug" value="true"/>

    <target name="init" depends="default.init">
      <patternset id="testtools.files">
        <!-- All files created for NBM -->
        <include name="config/Modules/org-netbeans-modules-testtools.xml"/>
        <include name="modules/org-netbeans-modules-testtools.jar"/>
        <include name="modules/docs/testtools.jar"/>
      </patternset>
    </target>
    
  <target name="compile" depends="init">
    <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
      <classpath>
        <pathelement location="${openide.dir}/core/openide.jar" />
        <pathelement location="${openide/loaders.dir}/core/openide-loaders.jar" />
        <pathelement location="${openide/compiler.dir}/modules/autoload/openide-compiler.jar" />
        <pathelement location="${openide/execution.dir}/modules/org-openide-execution.jar" />
        <pathelement location="${openide/execution/deprecated.dir}/modules/org-openide-execution-deprecated.jar" />
        
        <pathelement location="${core.dir}/core/core.jar" />
        <pathelement location="${core/windows.dir}/modules/org-netbeans-core-windows.jar" />
        <pathelement location="${java.dir}/modules/org-netbeans-modules-java.jar" />
        <pathelement location="${java/srcmodel.dir}/modules/org-openide-src.jar" />
        <pathelement location="${ant.dir}/modules/org-apache-tools-ant-module.jar" />
	<fileset dir="${nbroot}/ant/external">
          <!-- For 1.6: -->
          <include name="lib/ant.jar"/>
	</fileset>
        <pathelement location="${nbroot}/jemmy/jemmy.jar" />
        <pathelement location="${nbroot}/jellytools/jelly2-nb.jar" />
        <pathelement location="${jemmysupport.dir}/modules/org-netbeans-modules-jemmysupport.jar" />
        <pathelement location="${tools.jar}"/>
        <fileset dir="${nbroot}/libs/xerces/external">
          <include name="xerces*.jar"/>
        </fileset>
      </classpath>
      <!-- XXX temporarily build only generator. Other stuff need to be updated. -->
      <include name="**/generator/**"/>
    </javac>
  </target>

  <target name="timestamp" unless="buildnumber">
    <tstamp>
        <format property="buildnumber" pattern="yyyyMMddHHmm"/>
    </tstamp>
  </target>

  <target name="jars" depends="compile,timestamp">
    <filter token="BUILD_NUMBER_SUBST" value="${buildnumber}"/>
    <copy file="manifest.mf" tofile="manifest-subst.mf" filtering="on"/>
    <jar jarfile="${cluster}/modules/org-netbeans-modules-testtools.jar"
         manifest="manifest-subst.mf"
         basedir="src"
	 excludes="**/*.java,**/*.form"
	 compress="false">
    </jar>
  </target>

  <target name="netbeans" depends="jars,javahelp">
    <createmodulexml xmldir="${cluster}/config/Modules">
      <enabled dir="${cluster}">
        <include name="modules/org-netbeans-modules-testtools.jar"/>
      </enabled>
    </createmodulexml>
    <genlist outputfiledir="${cluster}" module="modules/org-netbeans-modules-testtools.jar">
      <fileset dir="${cluster}">
        <patternset refID="testtools.files"/>
      </fileset>
    </genlist>
  </target>

  <target name="nbm" depends="netbeans">
    <makenbm file="testtools.nbm"
             productdir="${cluster}"
             module="modules/org-netbeans-modules-testtools.jar"
             homepage="http://testtools.${homepage.base}"
	         distribution="http://${dist.base}/testtools.nbm">
      <license file="${license.file}"/>
<!--      <signature keystore="${keystore}" storepass="${storepass}" alias="${nbm_alias}"/> -->
    </makenbm>
  </target>

  <target name="clean" depends="init">
    <delete>
      <fileset dir="src">
        <include name="**/*.class"/>
        <include name="**/*.jar"/>
      </fileset>	
    </delete>
    <delete file="manifest-subst.mf"/>
    <delete file="testtools-bundle.zip"/>
    <delete>
      <fileset dir="." includes="*.nbm"/>
      <fileset dir="${cluster}">
          <patternset refID="testtools.files"/>
      </fileset>
    </delete>
    <delete dir="javahelp/org/netbeans/modules/testtools/docs/JavaHelpSearch2"/>
    <delete dir="javahelp/org/netbeans/modules/usersguide"/>
  </target>

  <!-- Create zip archive from all nbm files. -->
  <target name="zip">
     <ant dir="${nbroot}/junit/" target="nbm"/>
     <copy file="${nbroot}/junit/junit.nbm" tofile="junit.nbm" filtering="off"/>
     <ant dir="${nbroot}/xtest/" target="nbm"/>
     <copy file="${nbroot}/xtest/xtest.nbm" tofile="xtest.nbm" filtering="off"/>
     <ant dir="${nbroot}/jemmy/" target="nbm"/>
     <copy file="${nbroot}/jemmy/jemmy.nbm" tofile="jemmy.nbm" filtering="off"/>
     <ant dir="${nbroot}/jemmysupport/" target="nbm"/>
     <copy file="${nbroot}/jemmysupport/jemmysupport.nbm" tofile="jemmysupport.nbm" filtering="off"/>
     <ant dir="${nbroot}/jellytools/" target="nbm"/>
     <copy file="${nbroot}/jellytools/jellytools.nbm" tofile="jellytools.nbm" filtering="off"/>
     <antcall target="nbm"/>
     <zip zipfile="testtools-bundle.zip"
          basedir="."
          includes="*.nbm"
          compress="true"/>
  </target>

  <target name="realclean" depends="clean">
    <ant dir="${nbroot}/jemmy" antfile="build.xml" target="clean"/>
    <ant dir="${nbroot}/jemmysupport" antfile="build.xml" target="clean"/>
    <ant dir="${nbroot}/jellytools" antfile="build.xml" target="clean"/>
    <ant dir="${nbroot}/xtest" antfile="build.xml" target="clean"/>
    <ant dir="${nbroot}/junit" antfile="build.xml" target="clean"/>
  </target>

  <target name="javahelp">
    <mkdir dir="javahelp/org/netbeans/modules/testtools/docs/JavaHelpSearch2"/>
    <jhindexer basedir="javahelp/org/netbeans/modules/testtools/docs/"
               db="javahelp/org/netbeans/modules/testtools/docs/JavaHelpSearch2">
      <classpath>
        <fileset dir="../apisupport/harness/external">
          <include name="jsearch*.jar"/>
        </fileset>
      </classpath>
      <include name="**/*.html"/>
      <exclude name="JavaHelpSearch2/"/>
      <exclude name="credits.html"/>
    </jhindexer>
    <mkdir dir="javahelp/org/netbeans/modules/usersguide"/>
    <copy file="${nbroot}/usersguide/javahelp/org/netbeans/modules/usersguide/ide.css" tofile="javahelp/org/netbeans/modules/usersguide/ide.css"/>
    <mkdir dir="${cluster}/modules/docs"/>
    <jar jarfile="${cluster}/modules/docs/testtools.jar" compress="true">
        <fileset dir="javahelp" excludesfile="${nbext}/standard-jar-excludes.txt" excludes="org/netbeans/modules/usersguide/"/>
    </jar>
  </target>


</project>