You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.xml 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?xml version="1.0"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one
  4. or more contributor license agreements. See the NOTICE file
  5. distributed with this work for additional information
  6. regarding copyright ownership. The ASF licenses this file
  7. to you under the Apache License, Version 2.0 (the
  8. "License"); you may not use this file except in compliance
  9. with the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing,
  12. software distributed under the License is distributed on an
  13. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. KIND, either express or implied. See the License for the
  15. specific language governing permissions and limitations
  16. under the License.
  17. -->
  18. <!-- POI OSGi Bundle System -->
  19. <project name="POI OSGi Bundle" default="bundle" basedir=".." xmlns:mvn="antlib:org.apache.maven.artifact.ant">
  20. <description>The Apache POI OSGi Bundle System.</description>
  21. <property name="bundle.lib" location="osgi/lib"/>
  22. <!-- TODO Import these from the parent build file -->
  23. <property name="repository.m2" value="http://repo1.maven.org"/>
  24. <property name="version.id" value="4.0.1-SNAPSHOT"/>
  25. <property name="dist.dir" value="build/dist"/>
  26. <!-- jars in the /lib directory, see the fetch-bundle-jars target-->
  27. <property name="bundle.bnd.jar" location="${bundle.lib}/bnd-1.50.0.jar"/>
  28. <property name="bundle.bnd.url" value="${repository.m2}/maven2/biz/aQute/bnd/1.50.0/bnd-1.50.0.jar"/>
  29. <import file="../build.xml"/>
  30. <target name="check-bundle-jars">
  31. <condition property="jars.bundle.present">
  32. <available file="${bundle.bnd.jar}"/>
  33. </condition>
  34. </target>
  35. <target name="fetch-bundle-jars" unless="jars.bundle.present">
  36. <mkdir dir="${bundle.lib}"/>
  37. <antcall target="downloadfile">
  38. <param name="sourcefile" value="${bundle.bnd.url}"/>
  39. <param name="destfile" value="${bundle.bnd.jar}"/>
  40. </antcall>
  41. </target>
  42. <!--
  43. <target name="bundle" depends="init, check-bundle-jars, fetch-bundle-jars, jar">
  44. -->
  45. <target name="bundle" depends="init, check-bundle-jars, fetch-bundle-jars">
  46. <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${bundle.bnd.jar}"/>
  47. <mkdir dir="build/osgi"/>
  48. <bnd
  49. classpath="${dist.dir}/poi-${version.id}-${DSTAMP}.jar,${dist.dir}/poi-scratchpad-${version.id}-${DSTAMP}.jar,${dist.dir}/poi-ooxml-${version.id}-${DSTAMP}.jar"
  50. eclipse="false"
  51. failok="false"
  52. exceptions="true"
  53. output="build/osgi"
  54. files="test.bnd"/>
  55. <!-- TODO Include the settings from http://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/poi-3.9/pom.xml -->
  56. <!-- TODO Make this actually spit out an OSGi Jar -->
  57. </target>
  58. </project>