Sophie

Sophie

distrib > Mandriva > mes5 > x86_64 > by-pkgid > 5d14bd0f38dfee1941f003828c13af85 > files > 15

javacvs-5.0-3.0.2mdv2009.0.src.rpm

<?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-2005 Sun
Microsystems, Inc. All Rights Reserved.
-->
<project name="projectized" basedir=".">

    <import file="../default.xml"/>
    <import file="common.xml"/>

    <target name="common-init" depends="default.init"/>
    <target name="init" depends="basic-init,files-init,build-init"/>
    
    <target name="build-init" depends="basic-init">
<!--
        <parseprojectxml project="." publicpackagesproperty="public.packages" friendsproperty="friends" javadocpackagesproperty="module.javadoc.packages" idedependenciesproperty="ide.dependencies" moduledependenciesproperty="module.dependencies" moduleclasspathproperty="module.classpath" domainproperty="nbm.domain" classpathextensionsproperty="class.path.extensions"/>
-->
        <condition property="is.regular">
            <not>
                <or>
                    <isset property="is.autoload"/>
                    <isset property="is.eager"/>
                    <equals arg1="${module.jar.dir}" arg2="core"/>
                    <equals arg1="${module.jar.dir}" arg2="lib"/>
                </or>
            </not>
        </condition>
        <property name="build.compiler.debug" value="true"/>
        <property name="build.compiler.debuglevel" value="source,lines,vars"/>
        <property name="build.compiler.deprecation" value="true"/>
        <property name="build.sysclasspath" value="ignore"/>
        <property name="build.compiler.optimize" value="off"/>
        <property name="build.package.compress" value="false"/>
        <property name="build.package.index" value="false"/>
        <property name="manifest.mf" location="manifest.mf"/>
        <property name="src.dir" location="src"/>
        <property name="build.classes.dir" location="build/classes"/>
        <property name="nbm" value="${code.name.base.dashes}.nbm"/>
        <property name="nbm.homepage" value="http://${nbm.domain}.${homepage.base}/"/>
        <property name="nbm.distribution" value="http://${dist.base}/${nbm}"/>
        <property name="nbm.module.author" value=""/>
        <property name="nbm.release.date" value=""/>
        <property name="nbm.needs.restart" value="false"/>
        <property name="nbm.is.global" value=""/>
        <path id="cp">
            <pathelement path="${module.classpath}"/>
            <pathelement path="${cp.extra}"/>
        </path>
        <property name="build.javahelp.dir" location="build/javahelp"/>
        <property name="javahelp.base" value="${code.name.base.slashes}/docs"/>
        <property name="javahelp.search" value="JavaHelpSearch"/>
        <property name="javahelp.excludes" value="credits.html"/>
    </target>
    
    <target name="test-lib-init" depends="init">
        <!-- xtest.home is set externally when run using XTest. -->
        <property name="xtest.home" location="${nb_all}/xtest"/>
        <path id="test.unit.lib.cp">
            <!-- XXX check if these files exist, and if not, run xtest/build.xml -->
            <pathelement location="${xtest.home}/lib/junit.jar"/>
            <pathelement location="${xtest.home}/lib/nbjunit.jar"/>
            <pathelement location="${xtest.home}/lib/nbjunit-ide.jar"/>
            <pathelement location="${xtest.home}/lib/insanelib.jar"/>
        </path>
    </target>

    <target name="javadoc" depends="build-init">
        <fail unless="javadoc.title">Must set javadoc.title</fail>
        <property name="javadoc.check.failonerror" value="false" />
        <!-- This should become an import at some point, perhaps: -->
        <ant dir="${nb_all}/nbbuild/javadoctools" antfile="template.xml" target="javadoc">
            <property name="javadoc.base" location="."/>
            <property name="javadoc.name" value="${code.name.base.dashes}" />
            <property name="javadoc.packages" value="${module.javadoc.packages}"/>
            <property name="javadoc.classpath" refid="cp"/>
            <property name="javadoc.manifest" location="${manifest.mf}"/>
            <property name="javadoc.project" location="nbproject/project.xml"/>
        </ant>
    </target>
    
    <target name="javadoc-nb" depends="init,javadoc" if="netbeans.home">
        <nbbrowse file="${netbeans.javadoc.dir}/${code.name.base.dashes}/index.html"/>
    </target>
    
    <!-- apisupport/project could calls this for the debug action. -->
    <!-- You can also call it directly from the nbbuild/misc pseudoproject. -->
    <target name="debug" depends="netbeans">
        <ant dir="${nb_all}/nbbuild" target="tryme-debug"/>
    </target>
    
    <target name="profile" depends="netbeans" >
        <fileset id="profiler.roots.module" dir="${cluster}">
            <include name="${module.jar}"/>
        </fileset>
        <ant dir="${nb_all}/nbbuild" target="tryme-profile" >
            <property name="profiler.roots.path" value="profiler.roots.module" />
            <reference refid="profiler.roots.module" />
        </ant>
    </target>
    
    <target name="reload" depends="netbeans">
        <ant dir="${nb_all}/nbbuild" target="tryme">
            <property name="tryme.debug.args" value="--reload ${cluster}/${module.jar}"/>
        </ant>
    </target>
    
    <target name="reload-in-ide" depends="netbeans">
        <nbinstaller module="${cluster}/${module.jar}" action="reinstall"/>
    </target>
    
    <target name="javahelp" depends="init" if="has.javahelp">
        <mkdir dir="${build.javahelp.dir}/${javahelp.base}/${javahelp.search}"/>
        <copy todir="${build.javahelp.dir}">
            <fileset dir="javahelp"/>
        </copy>
        <jhindexer basedir="${build.javahelp.dir}/${javahelp.base}"
                   db="${build.javahelp.dir}/${javahelp.base}/${javahelp.search}">
            <classpath>
                <fileset dir="${nb_all}/nbbuild/external">
                    <include name="jhall*.jar"/>
                </fileset>
            </classpath>
            <include name="**/*.html"/>
            <exclude name="${javahelp.search}/"/>
            <exclude name="${javahelp.excludes}"/>
        </jhindexer>
        <!-- Add ide.css for easy previewing only; usersguide provides it in distro: -->
        <!-- (XXX maybe the viewer task can automagically do this...) -->
        <mkdir dir="${build.javahelp.dir}/org/netbeans/modules/usersguide"/>
        <copy tofile="${build.javahelp.dir}/org/netbeans/modules/usersguide/ide.css"
              file="${nb_all}/usersguide/javahelp/org/netbeans/modules/usersguide/ide.css"
              failonerror="false"/>
        <mkdir dir="${cluster}/${javahelp.jar.dir}"/>
        <jar jarfile="${cluster}/${javahelp.jar}" compress="true">
            <fileset dir="${build.javahelp.dir}">
                <!-- XXX this does not exclude the folder, unfortunately... -->
                <exclude name="org/netbeans/modules/usersguide/ide.css"/>
            </fileset>
        </jar>
    </target>

    <target name="check-javahelp" depends="javahelp" description="Validate helpset for various errors." if="has.javahelp">
        <fail unless="javahelp.hs">Must set javahelp.hs property</fail>
        <taskdef name="checkhelpsets" classname="org.netbeans.nbbuild.CheckHelpSets">
            <classpath>
                <pathelement location="${nb_all}/nbbuild/nbantext.jar"/>
                <fileset dir="${nb_all}/nbbuild/external">
                    <include name="jhall*.jar"/>
                </fileset>
            </classpath>
        </taskdef>
        <checkhelpsets>
            <!-- XXX need to check against real files (since there may be some processing) but should use a link mapper: -->
            <fileset dir="${build.javahelp.dir}">
                <include name="${javahelp.base}/${javahelp.hs}"/>
            </fileset>
        </checkhelpsets>
    </target>

    <!-- XXX need target to preview javahelp in a viewer like this: -->
    <!--
    HelpSet hs = new HelpSet(someClassLoader, f.toURI().toURL());
    String title = hs.getTitle();
    if (title == null) {
        title = f.getAbsolutePath();
    }
    JDialog dlg = new JDialog(WindowManager.getDefault().getMainWindow(), title, false);
    dlg.getContentPane().add(new JHelp(hs), BorderLayout.CENTER);
    dlg.setSize(920, 660); // match min size of IDE's viewer
    dlg.pack();
    dlg.addWindowListener(this);
    dlg.show();
    synchronized (this) {
        wait();
    }
    // ...
    public synchronized void windowClosing(WindowEvent ev) {
        notify();
    }
    -->

</project>