<?xml version="1.0" encoding="UTF-8"?>
<project name="jogamp-archivetasks" basedir=".">
    <dirname property="jogamp-archivetasks.basedir" file="${ant.file.jogamp-archivetasks}"/>
    <taskdef resource="net/sf/antcontrib/antlib.xml">
      <classpath> 
        <pathelement location="${jogamp-archivetasks.basedir}/lib/ant-contrib-1.0b3.jar"/> 
      </classpath>
    </taskdef>

    <macrodef name="archive.7z">
      <attribute name="basedir" />
      <attribute name="destfile" />
      <attribute name="includes" />
      <sequential>
       <var name="destfile.path" unset="true"/>
       <property name="destfile.path" location="@{destfile}"/> <!-- absolute path -->
       <delete file="${destfile.path}" quiet="true" failonerror="false" />
       <exec executable="7z"
             searchpath="true"
             dir="@{basedir}"
             spawn="false"
             failifexecutionfails="true"
             failonerror="true">
         <arg line="a -r ${destfile.path} @{includes}"/>
       </exec>
      </sequential>
    </macrodef>  
</project>