<?xml version="1.0" encoding="UTF-8"?>
<project name="DMDirc-Parser" default="default" basedir=".">
    <description>Builds, tests, and runs the project DMDirc-Parser.</description>

    <import file="nbproject/build-impl.xml"/>
    <import file="build-ivy.xml"/>
    <import file="build-versioning.xml"/>

    <target name="-pre-init" depends="-init-dependencies"/>
    <target name="-post-compile" depends="-add-version"/>
    <target depends="init,compile,-pre-jar,-do-jar, -post-jar" description="Build JAR." name="jar"/>
    <target name="-do-jar">
        <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.dir}/parser.common.jar"
                basedir="${build.classes.dir}" excludes="com/dmdirc/parser/irc/**">
          <manifest>
             <section name="com.dmdirc.parser">
                <attribute name="Implementation-Title" value="Common parser files"/>
                <attribute name="Implementation-Version" value="${parsers.version.main}"/>
             </section>
          </manifest>
       </jar>
       <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.dir}/parser.irc.jar"
            basedir="${build.classes.dir}" includes="com/dmdirc/parser/irc/**">
          <manifest>
             <section name="com.dmdirc.parser.irc">
                <attribute name="Implementation-Title" value="IRC Parser"/>
                <attribute name="Implementation-Version" value="${parsers.version.irc}"/>
             </section>
          </manifest>
       </jar>
    </target>
    <target name="-post-jar">
        <delete file="${manifest.file}"/>
    </target>
    <target name="-post-test-run">
        <delete file="${manifest.file}"/>
    </target>
</project>
