1. netbeans
  2. main-silver

Source

main-silver / xsl / build.xml

<?xml version="1.0"?>
<!--
                Sun Public License Notice

The contents of this file are subject to the Sun Public License
Version 1.0 (the "License"). You may not use this file except in
compliance with the License. A copy of the License is available at
http://www.sun.com/

The Original Code is NetBeans. The Initial Developer of the Original
Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
Microsystems, Inc. All Rights Reserved.
-->

<project name="xml/xsl" default="netbeans" basedir=".">

    <property name="xml_root" location=".."/>
    <property name="api_root" location="${xml_root}/api"/>
    <property name="tax_root" location="${xml_root}/tax"/>
    <property name="tax_lib_root" location="${tax_root}/lib"/>
    <property name="core_root" location="${xml_root}/core"/>

    <property name="nbroot" location="${xml_root}/.."/>
    <property name="nbext_root" location="${nbroot}/nbbuild"/>
    <property name="libs_root" location="${nbroot}/libs"/>

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

    <taskdef name="jhindexer" classname="org.netbeans.nbbuild.JHIndexer" classpath="${nbext_root}/nbantext.jar"/>
    <taskdef name="makenbm" classname="org.netbeans.nbbuild.MakeNBM" classpath="${nbext_root}/nbantext.jar"/>
    <taskdef name="genlist" classname="org.netbeans.nbbuild.MakeListOfNBM" classpath="${nbext_root}/nbantext.jar"/>
    <taskdef name="locjar" classname="org.netbeans.nbbuild.LocalizedJar" classpath="${nbext_root}/nbantext.jar"/>

    <property name="build.compiler.debug" value="on"/>


    <target name="init">
        <property file="${xml_root}/spec-vers.properties"/>
        <filter  token="API_SPEC_VERS_SUBST" value="${xml.api.specification.version}"/>
        <filter  token="XSL_SPEC_VERS_SUBST" value="${xml.xsl.specification.version}"/>
        <filter token="CORE_SPEC_VERS_SUBST" value="${xml.core.specification.version}"/>
        <filter token="BUILD_NUMBER_SUBST" value="${buildnumber}"/>
        <property name="xml.implementation.version" value="${buildnumber}"/>
        <filter token="XML_BUILD_NUMBER_SUBST"  value="${xml.implementation.version}"/>
        <ant dir="${nbroot}/xml/external" target="unscramble"/>
        <ant dir="${nbroot}/libs/external" target="unscramble"/>
    </target>

    <target name="compile">
        <property file="${libs_root}/public.properties"/>

        <echo message="Compiling XSL module classes..."/>
        <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
            <classpath>
                <pathelement location="${nbroot}/openide/openide-13javac-workaround.jar"/>
                <pathelement location="${nbroot}/openide/netbeans/lib/openide.jar"/>
                <pathelement location="${nbroot}/openide/loaders/netbeans/lib/openide-loaders.jar"/>
                <pathelement location="${nbroot}/openide/execution/netbeans/modules/autoload/openide-execution.jar"/>
                <pathelement location="${core_root}/src/"/>
                <pathelement location="${api_root}/src/"/>
                <!--Servlet API-->
                <pathelement location="${nbroot}/httpserver/external/servlet-2.2.jar"/>
                <fileset dir="${nbroot}/libs/external">
                    <include name="xalan*.jar"/>
                </fileset>
            </classpath>
        </javac>
    </target>

    <target name="jars" depends="init,compile">
        <mkdir dir="netbeans/modules"/>

        <copy file="manifest.mf" tofile="manifest-subst.mf" filtering="on"/>
        <locjar jarfile="netbeans/modules/xsl.jar"
                manifest="manifest-subst.mf"
                compress="false">
            <fileset dir="src" excludesfile="${nbroot}/nbbuild/standard-jar-excludes.txt"/>
            <locale name="ja"/>
        </locjar>    
    </target>

    <target name="release">
    </target>

    <target name="javahelp">
        <!-- It is a part of core module now. -->
    </target>

    <target name="netbeans" depends="jars,release,javahelp">
        <genlist targetname="nbm" outputfiledir="netbeans"/>
    </target>

    <target name="reload" depends="init,compile" description="Test module inside running IDE (API Support with Ant required).">
        <mkdir dir="test"/>

        <copy file="manifest.mf" tofile="manifest-subst.mf" filtering="on"/>
        <jar jarfile="test/xsltest.jar" manifest="manifest-subst.mf" compress="false">
            <fileset dir="src" excludesfile="../../nbbuild/standard-jar-excludes.txt"/>
        </jar>
        <nbinstaller module="test/xsltest.jar" action="reinstall"/>
    </target>
    
    
    <target name="nbm" depends="netbeans">
        <delete dir="Info"/>
        <makenbm file="../xsl.nbm"
                 topdir="."
                 needsrestart="false"
                 module="netbeans/modules/xsl.jar"
                 homepage="http://xml.${homepage.base}/xsl/"
                 distribution="http://${dist.base}/xsl.nbm">
            <license file="${license.file}"/>
            <signature keystore="${keystore}" storepass="${storepass}" alias="${nbm_alias}"/>
        </makenbm>
    </target>

    <target name="clean">
        <delete>
            <fileset dir="src">
                <include name="**/*.class"/>
            </fileset>
        </delete>
        <delete file="manifest-subst.mf"/>
        <delete file="../xsl.nbm"/>
        <delete dir="netbeans"/>
        <delete dir="Info"/>
    </target>

    <target name="real-clean" depends="clean">
        <delete dir="javadoc"/>

        <ant dir="test" target="realclean"/>
    </target>

    <target name="all" depends="clean,nbm"/>

    <target name="javadoc">
    </target>


    <!-- This target compile all XML sub-modules. -->
    <target name="all-xml">
        <echo message="Compile all XML sub-modules ..."/>
        <ant dir=".." target="clean"/>
        <ant dir=".." target="compile"/>
    </target>

    <target name="test">
        <ant dir="test"/>
    </target>

</project>