<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="com.jme3.gde.core" default="netbeans" basedir=".">
    <description>Builds, tests, and runs the project com.jme3.gde.core.</description>
    <import file="nbproject/build-impl.xml"/>
    <path id="ant-import.classpath">
        <fileset dir="../ant-lib/" includes="*.jar"/>
    </path>
    <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="ant-import.classpath"/>
    <taskdef resource="com/jme/ant/ant-jme.properties" classpath="../ant-lib/ant-jme.jar"/>

    <!--target name="init" depends="basic-init,files-init,build-init,-javac-init,update-help-sets">
    </target-->

    <target name="update-help-sets" description="Updates the help pages from the wiki">
        <property file="javahelp/wiki_help.properties"/>
        <echo file="javahelp/${javahelp_path}wiki-map.xml"
            message='&lt;!DOCTYPE map PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Map Version 2.0//EN" "http://java.sun.com/products/javahelp/map_2_0.dtd">&#13;&lt;map version="2.0">&#13;'/>
        <foreach target="-update-single-helpset" list="${wiki_pages}" delimiter="," param="page_name" inheritall="true"/>
        <echo file="javahelp/${javahelp_path}wiki-map.xml" append="true"
            message='&lt;/map>&#13;'/>
    </target>

    <target name="-update-single-helpset">
        <!-- prepare variables -->
        <propertyregex property="page_path"
             input="${page_name}"
             regexp=":"
             replace="/"
             global="true"/>
        <propertyregex property="page_classpath"
             input="${page_name}"
             regexp=":"
             replace="."
             global="true"/>
        <!-- download html file -->
        <touch file="javahelp/${javahelp_path}${page_path}.html" mkdirs="true"/>
        <get src="${wiki_url}${page_name}?do=export_xhtmlbody"
             dest="javahelp/${javahelp_path}${page_path}.html"/>
        <!-- download images from page (custom task) -->
        <loadwikiimages file="javahelp/${javahelp_path}${page_path}.html"
             target="javahelp/${javahelp_path}"
             host="http://jmonkeyengine.org"/>
        <!-- fix links in wiki (custom task) -->
        <fixwikilinks file="javahelp/${javahelp_path}${page_path}.html"
             helppath="${javahelp_path}"/>
        <!-- append link to online wiki page -->
        <echo file="javahelp/${javahelp_path}${page_path}.html" append="true"
             message='&lt;p>&lt;em>&lt;a href="${wiki_url}${page_name}?do=export_xhtmlbody">view online version&lt;/a>&lt;/em>&lt;/p>'/>
        <!-- add entry to map -->
        <echo file="javahelp/${javahelp_path}wiki-map.xml" append="true"
             message='&lt;mapID target="${page_classpath}" url="${page_path}.html"/>&#13;'/>
    </target>
</project>