blob: a400ce25a3f1471bd2bdb3b23ffd6b56fa3915df [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== -->
<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
<!-- ====================================================================== -->
<project name="ARTIFACT_ID" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Import maven-build.xml into the current project -->
<!-- ====================================================================== -->
<import file="maven-build.xml"/>
<!-- ====================================================================== -->
<!-- Help target -->
<!-- ====================================================================== -->
<target name="help">
<echo message="Please run: $ant -projecthelp"/>
</target>
<property name="bnd.version" value="BND_VERSION"/>
<target name="get-bnd"
depends="test-offline"
description="Download BND tool"
unless="maven.mode.offline">
<mkdir dir="${maven.repo.local}"/>
<mkdir dir="${maven.repo.local}/biz/aQute/bnd/${bnd.version}"/>
<get src="http://www.aqute.biz/repo/biz/aQute/bnd/${bnd.version}/bnd-${bnd.version}.jar"
dest="${maven.repo.local}/biz/aQute/bnd/${bnd.version}/bnd-${bnd.version}.jar"
usetimestamp="true"
ignoreerrors="true"/>
</target>
<target name="package" depends="compile,test,get-bnd" description="Package the bundle">
<taskdef resource="aQute/bnd/ant/taskdef.properties">
<classpath>
<pathelement location="${maven.repo.local}/biz/aQute/bnd/${bnd.version}/bnd-${bnd.version}.jar"/>
</classpath>
</taskdef>
<pathconvert property="bnd.classpath" refid="build.classpath" pathsep=","/>
<bnd files="maven-build.bnd" classpath="${maven.build.outputDir},${bnd.classpath}"/>
</target>
</project>