Source

main-silver / xml.schema / build.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
                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-2002 Sun
Microsystems, Inc. All Rights Reserved.
-->

<project name="xml/schema" 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="nbroot" location="${xml_root}/.."/>
    <property name="nbext_root" location="${nbroot}/nbbuild"/>

    <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"/>
    <taskdef name="for-each" classname="org.netbeans.nbbuild.ForEach" 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="SCHEMA_SPEC_VERS_SUBST" value="${xml.schema.specification.version}"/>
        <filter token="CORE_SPEC_VERS_SUBST" value="${xml.core.specification.version}"/>
        <filter token="TAX_SPEC_VERS_SUBST" value="${xml.tax.specification.version}"/>
        <filter token="BUILD_NUMBER_SUBST" value="${buildnumber}"/>
    </target>

    <target name="compile">
        <echo message="Compiling XML schema 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="${api_root}/src/"/>
                <pathelement location="${xml_root}/core/src/"/>
                <fileset dir="${nbroot}/core/external">
                    <include name="xml-apis*.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/xml-schema.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="netbeans" depends="jars,release">
        <genlist targetname="nbm" outputfiledir="netbeans"/>
    </target>
   
    <target name="javahelp" description="Please use xml/core javahelp target instead." />
 
    <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/xml-schema-test.jar" manifest="manifest-subst.mf" compress="false">
            <fileset dir="src" excludesfile="../../nbbuild/standard-jar-excludes.txt"/>
        </jar>
        <nbinstaller module="test/xml-schema-test.jar" action="reinstall"/>
    </target>
    
    
    <target name="nbm" depends="netbeans">
        <delete dir="Info"/>
        <makenbm file="../xml-schema.nbm"
                 topdir="."
                 needsrestart="false"
                 module="netbeans/modules/xml-schema.jar"
                 homepage="http://xml.${homepage.base}/schema/"
                 distribution="http://${dist.base}/xml-schema.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="../xml-schema.nbm"/>
        <delete dir="netbeans"/>
        <delete dir="Info"/>
        <delete dir="javahelp/org/netbeans/modules/xml/core/docs/JavaHelpSearch"/>

    </target>

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

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

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


    <!-- 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>