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 | 203195b | 2008-05-16 04:39:32 +0000 | [diff] [blame] | 23 | <property name="bnd.version" value="BND_VERSION"/> |
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 | |
Stuart McCulloch | 0d71077 | 2008-02-19 08:34:01 +0000 | [diff] [blame] | 37 | <target name="package" depends="compile,test,get-bnd" description="Package the bundle"> |
Stuart McCulloch | 203195b | 2008-05-16 04:39:32 +0000 | [diff] [blame] | 38 | <taskdef resource="aQute/bnd/ant/taskdef.properties"> |
| 39 | <classpath> |
| 40 | <pathelement location="${maven.repo.local}/biz/aQute/bnd/${bnd.version}/bnd-${bnd.version}.jar"/> |
| 41 | </classpath> |
| 42 | </taskdef> |
Stuart McCulloch | 0d71077 | 2008-02-19 08:34:01 +0000 | [diff] [blame] | 43 | <pathconvert property="bnd.classpath" refid="build.classpath" pathsep=","/> |
Stuart McCulloch | ee51abf | 2008-02-19 09:49:41 +0000 | [diff] [blame] | 44 | <bnd files="maven-build.bnd" classpath="${maven.build.outputDir},${bnd.classpath}"/> |
Stuart McCulloch | 0d71077 | 2008-02-19 08:34:01 +0000 | [diff] [blame] | 45 | </target> |
| 46 | |
| 47 | </project> |