Stuart McCulloch | 0d71077 | 2008-02-19 08:34:01 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | |
| 3 | <!-- ====================================================================== --> |
| 4 | <!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. --> |
| 5 | <!-- ====================================================================== --> |
| 6 | |
| 7 | <project name="ARTIFACT_ID" default="package" basedir="."> |
| 8 | |
| 9 | <!-- ====================================================================== --> |
| 10 | <!-- Import maven-build.xml into the current project --> |
| 11 | <!-- ====================================================================== --> |
| 12 | |
| 13 | <import file="maven-build.xml"/> |
| 14 | |
| 15 | <!-- ====================================================================== --> |
| 16 | <!-- Help target --> |
| 17 | <!-- ====================================================================== --> |
| 18 | |
| 19 | <target name="help"> |
| 20 | <echo message="Please run: $ant -projecthelp"/> |
| 21 | </target> |
| 22 | |
Stuart McCulloch | ee51abf | 2008-02-19 09:49:41 +0000 | [diff] [blame] | 23 | <property name="bnd.version" value="0.0.238"/> |
Stuart McCulloch | 0d71077 | 2008-02-19 08:34:01 +0000 | [diff] [blame] | 24 | |
| 25 | <target name="get-bnd" |
| 26 | depends="test-offline" |
| 27 | description="Download BND tool" |
| 28 | unless="maven.mode.offline"> |
| 29 | <mkdir dir="${maven.repo.local}"/> |
| 30 | <mkdir dir="${maven.repo.local}/biz/aQute/bnd/${bnd.version}"/> |
| 31 | <get src="http://www.aqute.biz/repo/biz/aQute/bnd/${bnd.version}/bnd-${bnd.version}.jar" |
| 32 | dest="${maven.repo.local}/biz/aQute/bnd/${bnd.version}/bnd-${bnd.version}.jar" |
| 33 | usetimestamp="true" |
| 34 | ignoreerrors="true"/> |
| 35 | </target> |
| 36 | |
| 37 | <taskdef resource="aQute/bnd/ant/taskdef.properties"> |
| 38 | <classpath> |
| 39 | <pathelement location="${maven.repo.local}/biz/aQute/bnd/${bnd.version}/bnd-${bnd.version}.jar"/> |
| 40 | </classpath> |
| 41 | </taskdef> |
| 42 | |
| 43 | <target name="package" depends="compile,test,get-bnd" description="Package the bundle"> |
| 44 | <pathconvert property="bnd.classpath" refid="build.classpath" pathsep=","/> |
Stuart McCulloch | ee51abf | 2008-02-19 09:49:41 +0000 | [diff] [blame] | 45 | <bnd files="maven-build.bnd" classpath="${maven.build.outputDir},${bnd.classpath}"/> |
Stuart McCulloch | 0d71077 | 2008-02-19 08:34:01 +0000 | [diff] [blame] | 46 | </target> |
| 47 | |
| 48 | </project> |