<?xml version="1.0" encoding="UTF-8"?>
<project default="xar" name="ART">
    <property name="project.title" value="Advanced Requirements Tooling"/>
    <property name="project.version" value="2.2.23-beta.1"/>
    <property name="project.abbrev" value="ART"/>
    <property name="project.app" value="ART"/>
    <property name="project.uri" value="http://art-decor.org/ns/art"/>
    <property name="project.description" value="The ART web application is the main web application of ART-DECOR. It contains required logic for CRUD operations on DECOR files and various other related parts."/>
    <property name="project.author" value="ART-DECOR Expert Group"/>
    <property name="project.website" value="https://art-decor.org"/>
    <property name="project.status" value="beta"/>
    <property name="project.license" value="GNU-LGPL"/>
    <property name="project.copyright" value="true"/>
    <property name="repo.type" value="application"/>
    <property name="repo.target" value="art"/>
    <property name="repo.prepare.script" value="pre-install.xql"/>
    <property name="repo.finish.script" value="post-install.xql"/>
    <!-- Do not forget to uncomment the <note>..</note> line in repo.xml.tmpl if you want to use this variable -->
    <property name="repo.finish.note" value=""/>
    <property name="project.uri.releasenotes" value="https://docs.art-decor.org/documentation/releasenotes/"/>
    <property name="build.dir" value="build"/>
    <target name="xar">
        <mkdir dir="${build.dir}"/>
        <copy file="expath-pkg.xml.tmpl" tofile="expath-pkg.xml" filtering="true" overwrite="true">
            <filterset>
                <filter token="project.title" value="${project.title}"/>
                <filter token="project.version" value="${project.version}"/>
                <filter token="project.abbrev" value="${project.abbrev}"/>
                <filter token="project.uri" value="${project.uri}"/>
            </filterset>
        </copy>
        <!--<copy file="changelog.xml.tmpl" tofile="changelog.xml" filtering="true" overwrite="true" failonerror="false">
            <filterset>
                <filter token="project.version" value="${project.version}"/>
                <filter token="project.uri.releasenotes" value="${project.uri.releasenotes}"/>
            </filterset>
        </copy>
        <loadresource property="project.changelog" encoding="utf-8" failonerror="false">
            <file file="changelog.xml"/>
        </loadresource>-->
        <copy file="repo.xml.tmpl" tofile="repo.xml" filtering="true" overwrite="true">
            <filterset>
                <filter token="project.version" value="${project.version}"/>
                
                <filter token="project.description" value="${project.description}"/>
                <filter token="project.author" value="${project.author}"/>
                <filter token="project.website" value="${project.website}"/>
                <filter token="project.status" value="${project.status}"/>
                <filter token="project.license" value="${project.license}"/>
                <filter token="project.copyright" value="${project.copyright}"/>
                <filter token="repo.type" value="${repo.type}"/>
                <filter token="repo.target" value="${repo.target}"/>
                <filter token="repo.prepare.script" value="${repo.prepare.script}"/>
                <filter token="repo.finish.script" value="${repo.finish.script}"/>
                <filter token="repo.finish.note" value="${repo.finish.note}"/>
                <!--<filter token="project.changelog" value="${project.changelog}"/>-->
                <filter token="project.version" value="${project.version}"/>
                <filter token="project.uri.releasenotes" value="${project.uri.releasenotes}"/>
            </filterset>
        </copy>
        <zip basedir="." destfile="${build.dir}/${project.app}-${project.version}.xar" excludes="${build.dir}/* *.tmpl"/>
    </target>
</project>
