File felix-osgi-compendium-build.xml of Package felix-osgi-compendium

<?xml version="1.0" encoding="UTF-8"?>

<project name="org.osgi.compendium" default="package" basedir=".">

  <!-- ====================================================================== -->
  <!-- Build environment properties                                           -->
  <!-- ====================================================================== -->

  <property file="build.properties"/>

  <property name="project.groupId" value="org.apache.felix"/>
  <property name="project.artifactId" value="org.osgi.compendium"/>
  <property name="project.version" value="1.4.0"/>
  <property name="project.name" value="OSGi R4 Compendium Bundle"/>
  <property name="project.description" value="OSGi Service Platform Release 4 Compendium Interfaces and Classes."/>
  <property name="project.organization.name" value="OSGi Alliance"/>

  <property name="compiler.source" value="1.7"/>
  <property name="compiler.target" value="${compiler.source}"/>

  <property name="build.finalName" value="${project.artifactId}-${project.version}"/>
  <property name="build.dir" value="target"/>
  <property name="build.outputDir" value="${build.dir}/classes"/>
  <property name="build.srcDir" value="src/main/java"/>
  <property name="build.resourceDir.0" value="src/main/resources"/>
  <property name="build.resourceDir.1" value="."/>

  <property name="reporting.outputDirectory" value="${build.dir}/site"/>

  <!-- ====================================================================== -->
  <!-- Defining classpaths                                                    -->
  <!-- ====================================================================== -->

  <path id="build.classpath">
    <fileset dir="lib">
      <!-- org.osgi.core javax.servlet-api org.osgi.foundation  -->
      <include name="**/*"/>
    </fileset>
  </path>

  <!-- ====================================================================== -->
  <!-- Cleaning up target                                                     -->
  <!-- ====================================================================== -->

  <target name="clean" description="Clean the output directory">
    <delete dir="${build.dir}"/>
  </target>

  <!-- ====================================================================== -->
  <!-- Compilation target                                                     -->
  <!-- ====================================================================== -->

  <target name="compile" description="Compile the code">
    <mkdir dir="${build.outputDir}"/>
    <javac destdir="${build.outputDir}"
           nowarn="false"
           debug="true"
           optimize="false"
           deprecation="true"
           target="${compiler.target}"
           verbose="false"
           fork="false"
           encoding="UTF-8"
           source="${compiler.source}">
      <src>
        <pathelement location="${build.srcDir}"/>
      </src>
      <classpath refid="build.classpath"/>
    </javac>
    <copy todir="${build.outputDir}">
      <fileset dir="${build.resourceDir.0}"/>
    </copy>
    <mkdir dir="${build.outputDir}/META-INF"/>
    <copy todir="${build.outputDir}/META-INF">
      <fileset dir="${build.resourceDir.1}">
        <include name="LICENSE*"/>
        <include name="NOTICE*"/>
      </fileset>
    </copy>
  </target>

  <!-- ====================================================================== -->
  <!-- Javadoc target                                                         -->
  <!-- ====================================================================== -->

  <target name="javadoc" description="Generates the Javadoc of the application">
    <javadoc sourcepath="${build.srcDir}"
             packagenames="*"
             destdir="${reporting.outputDirectory}/apidocs"
             access="protected"
             source="${compiler.source}"
             verbose="false"
             version="true"
             use="true"
             author="true"
             splitindex="false"
             nodeprecated="false"
             nodeprecatedlist="false"
             notree="false"
             noindex="false"
             nohelp="false"
             nonavbar="false"
             serialwarn="false"
             encoding="UTF-8"
             linksource="false"
             breakiterator="false">
      <classpath refid="build.classpath"/>
    </javadoc>
  </target>

  <!-- ====================================================================== -->
  <!-- Package target                                                         -->
  <!-- ====================================================================== -->

  <target name="package" depends="compile" description="Package the application">
    <jar jarfile="${build.dir}/${build.finalName}.jar"
         compress="true"
         index="false"
         basedir="${build.outputDir}"
         excludes="**/package.html">
      <manifest>
        <attribute name="Bundle-Category" value="osgi"/>
        <attribute name="Bundle-Copyright" value="Copyright (c) OSGi Alliance (2000, 2009). All Rights Reserved."/>
        <attribute name="Bundle-Description" value="${project.description}"/>
        <attribute name="Bundle-ManifestVersion" value="2"/>
        <attribute name="Bundle-Name" value="${project.name}"/>
        <attribute name="Bundle-SymbolicName" value="${project.artifactId}"/>
        <attribute name="Bundle-Vendor" value="${project.organization.name}"/>
        <attribute name="Bundle-Version" value="4.1.0"/>
        <attribute name="DynamicImport-Package" value="*"/>
        <attribute name="Export-Package" value="info.dmtree.notification;version=&quot;1.0&quot;,info.dmtree.notification.spi;version=&quot;1.0&quot;;uses:=&quot;info.dmtree.notification&quot;,info.dmtree.registry;version=&quot;1.0&quot;;uses:=&quot;info.dmtree.notification&quot;,info.dmtree.security;version=&quot;1.0&quot;,info.dmtree.spi;version=&quot;1.0&quot;,org.osgi.service.application;version=&quot;1.1&quot;,org.osgi.service.cm;version=&quot;1.3&quot;,org.osgi.service.component;version=&quot;1.1&quot;,org.osgi.service.deploymentadmin;version=&quot;1.1&quot;,org.osgi.service.deploymentadmin.spi;version=&quot;1.0.1&quot;;uses:=&quot;org.osgi.service.deploymentadmin&quot;,org.osgi.service.device;version=&quot;1.1&quot;,org.osgi.service.event;version=&quot;1.2&quot;,org.osgi.service.http;version=&quot;1.2.1&quot;,org.osgi.service.io;version=&quot;1.0&quot;,org.osgi.service.log;version=&quot;1.3&quot;,org.osgi.service.metatype;version=&quot;1.1&quot;,org.osgi.service.monitor;version=&quot;1.0&quot;,org.osgi.service.prefs;version=&quot;1.1.1&quot;,org.osgi.service.provisioning;version=&quot;1.2&quot;,org.osgi.service.upnp;version=&quot;1.1&quot;,org.osgi.service.useradmin;version=&quot;1.1&quot;,org.osgi.service.wireadmin;version=&quot;1.0&quot;,org.osgi.util.gsm;version=&quot;1.0.1&quot;,org.osgi.util.measurement;version=&quot;1.0.1&quot;,org.osgi.util.mobile;version=&quot;1.0&quot;,org.osgi.util.position;version=&quot;1.0.1&quot;;uses:=&quot;org.osgi.util.measurement&quot;,org.osgi.util.tracker;version=&quot;1.4&quot;,org.osgi.util.xml;version=&quot;1.0.1&quot;"/>
        <attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
        <attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
        <attribute name="JavaPackages-Version" value="${project.version}"/>
        <attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compiler.target}))&quot;"/>
      </manifest>
    </jar>
  </target>

  <!-- ====================================================================== -->
  <!-- A dummy target for the package named after the type it creates         -->
  <!-- ====================================================================== -->

  <target name="jar" depends="package" description="Builds the jar for the application"/>

</project>