<?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="Arch Questions and Answers Generator" default="answer" basedir=".">
  <!-- modify this property to point to root of NetBeans CVS 
       so necessary files in the build system may be found -->
  <property name="ide.root" value="../.." />

  <!-- directory for the generated file. Usually may stay untouched -->
  <property name="arch.outputdir" value="." />
  
  <!-- Uncomment following line to add missing questions into your sample file
  <property name="arch.generate" value="true" /> 
  -->
  
  <taskdef name="arch" classname="org.netbeans.nbbuild.Arch" classpath="${ide.root}/nbbuild/nbantext.jar"/>
  <taskdef name="iz" classname="org.netbeans.nbbuild.PlansPreprocess" classpath="${ide.root}/nbbuild/nbantext.jar"/>
  
  <target 
    name="answer" 
    depends="dialogs, modules, filesystems, datasystems, nodes, explorer, actions, windowsystem, utilities, io, editor, compiler, propertysheet, editor, settings, masterfs, execution,registry,convertor" 
    description="Generates HTML file with answers to architecture questions"
  />
  <target 
    name="promoD" 
    depends="dialogs, modules, filesystems, datasystems, nodes, explorer, actions, windowsystem, utilities, io, editor, propertysheet, settings, execution, masterfs" 
  />
  
  <target name="modules"  >
    <arch answers="arch-openide-modules.xml" output="${arch.outputdir}/openide-modules.html" />
  </target>
  
  <target name="dialogs"  >
    <arch answers="arch-openide-dialogs.xml" output="${arch.outputdir}/openide-dialogs.html" />
  </target>

  <target name="filesystems"  >
    <arch answers="arch-openide-filesystems.xml" output="${arch.outputdir}/openide-filesystems.html" />
  </target>
  
  <target name="settings"  >
    <arch answers="arch-openide-settings.xml" output="${arch.outputdir}/openide-settings.html" />
  </target>
  
  <target name="datasystems"  >
    <arch answers="arch-openide-datasystems.xml" output="${arch.outputdir}/openide-datasystems.html" />
  </target>
  
  <target name="nodes"  >
    <arch answers="arch-openide-nodes.xml" output="${arch.outputdir}/openide-nodes.html" />
  </target>

  <target name="explorer"  >
    <arch answers="arch-openide-explorer.xml" output="${arch.outputdir}/openide-explorer.html" />
  </target>
    
  <target name="actions"  >
    <arch answers="arch-openide-actions.xml" output="${arch.outputdir}/openide-actions.html" />
  </target>
  
  <target name="windowsystem"  >
    <arch answers="arch-openide-windowsystem.xml" output="${arch.outputdir}/openide-windowsystem.html" />
  </target>
  
  <target name="utilities"  >
    <arch answers="../util/arch.xml" output="${arch.outputdir}/openide-utilities.html" />
  </target>
  
  <target name="io"  >
    <arch answers="arch-openide-io.xml" output="${arch.outputdir}/openide-io.html" />
  </target>

  <target name="execution"  >
    <arch answers="arch-openide-execution.xml" output="${arch.outputdir}/openide-execution.html" />
  </target>
    
  <target name="compiler"  >
    <arch answers="arch-openide-compiler.xml" output="${arch.outputdir}/openide-compiler.html" />
  </target>
  
  <target name="editor"  >
    <arch answers="arch-openide-editor.xml" output="${arch.outputdir}/openide-editor.html" />
  </target>
  
  <target name="propertysheet"  >
    <arch answers="arch-openide-propertysheet.xml" output="${arch.outputdir}/openide-propertysheet.html" />
  </target>
  
  <target name="masterfs"  >
    <arch answers="arch-openide-masterfs.xml" output="${arch.outputdir}/openide-masterfs.html" />
  </target>
  
  <target name="registry"  >
    <arch answers="arch-openide-registry.xml" output="${arch.outputdir}/openide-registry.html" />
  </target>
  

  <target name="looks"  >
    <arch answers="arch-openide-looks.xml" output="${arch.outputdir}/openide-looks.html" />
  </target>
  

  <target name="convertor"  >
    <arch answers="arch-openide-convertor.xml" output="${arch.outputdir}/openide-convertor.html" />
  </target>
  

  <target name="generate-status" description="Generates an HTML page with status information about the arch efforts" >
    <property name="http.proxyHost" value="" />
    <property name="http.proxyPort" value="-1" />    
    <property name="target" value="../www/proposals/arch/status.html" />
    
    <echo file="root.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<module-requirements name="openide">
  <requirement issue="32053" />
  <requirement issue="32054" />
  <requirement issue="32080" />
  <requirement issue="32081" />
</module-requirements>
    ]]></echo>
    <iz 
        src="root.xml" 
        target="status.xml" 
        nicknames="${ide.root}/nbbuild/plans/nicknames.txt" 
        proxyport="${http.proxyPort}" proxyhost="${http.proxyHost}"
    />
    
    <delete file="root.xml" />
    <style in="status.xml" out="${target}" style="status.xsl" />
    <delete file="status.xml" />
  </target>
  
  <target name="clean">
    <delete>
      <fileset dir="${arch.outputdir}" >
        <include name="*.html" />
      </fileset>
    </delete>
  </target>    
</project>
