CBL-Mariner/SPECS-EXTENDED/osgi-core/osgi-core-build.xml

130 lines
7.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project name="osgi.core" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property name="compiler.source" value="1.6"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="project.artifactId" value="osgi.core"/>
<property name="project.groupId" value="org.osgi"/>
<property name="project.version" value="7.0.0"/>
<property name="project.description" value="OSGi Core Release 7, Interfaces and Classes for use in compiling bundles."/>
<property name="project.organization.name" value="OSGi Alliance"/>
<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" value="src/main/resources"/>
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</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"
encoding="UTF-8"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
</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}"
encoding="UTF-8"
verbose="false"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
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-Description" value="${project.description}"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="${project.artifactId}"/>
<attribute name="Bundle-SymbolicName" value="${project.artifactId}"/>
<attribute name="Bundle-Vendor" value="${project.organization.name}"/>
<attribute name="Bundle-Version" value="${project.version}"/>
<attribute name="Export-Package" value="org.osgi.util.tracker;version=&quot;1.5.2&quot;;uses:=&quot;org.osgi.framework&quot;,org.osgi.resource;version=&quot;1.0&quot;,org.osgi.resource.dto;version=&quot;1.0&quot;;uses:=&quot;org.osgi.dto&quot;,org.osgi.dto;version=&quot;1.1&quot;,org.osgi.framework;version=&quot;1.9&quot;,org.osgi.framework.namespace;version=&quot;1.1&quot;;uses:=&quot;org.osgi.resource&quot;,org.osgi.framework.hooks.resolver;version=&quot;1.0&quot;;uses:=&quot;org.osgi.framework.wiring&quot;,org.osgi.framework.hooks.weaving;version=&quot;1.1&quot;;uses:=&quot;org.osgi.framework.wiring&quot;,org.osgi.framework.hooks.service;version=&quot;1.1&quot;;uses:=&quot;org.osgi.framework&quot;,org.osgi.framework.hooks.bundle;version=&quot;1.1&quot;;uses:=&quot;org.osgi.framework&quot;,org.osgi.framework.wiring;version=&quot;1.2&quot;;uses:=&quot;org.osgi.framework,org.osgi.resource&quot;,org.osgi.framework.wiring.dto;version=&quot;1.3&quot;;uses:=&quot;org.osgi.dto,org.osgi.resource.dto&quot;,org.osgi.framework.startlevel;version=&quot;1.0&quot;;uses:=&quot;org.osgi.framework&quot;,org.osgi.framework.startlevel.dto;version=&quot;1.0&quot;;uses:=&quot;org.osgi.dto&quot;,org.osgi.framework.dto;version=&quot;1.8&quot;;uses:=&quot;org.osgi.dto&quot;,org.osgi.framework.launch;version=&quot;1.2&quot;;uses:=&quot;org.osgi.framework&quot;,org.osgi.service.resolver;version=&quot;1.1&quot;;uses:=&quot;org.osgi.resource&quot;,org.osgi.service.url;version=&quot;1.0&quot;,org.osgi.service.packageadmin;version=&quot;1.2&quot;;uses:=&quot;org.osgi.framework&quot;,org.osgi.service.startlevel;version=&quot;1.1&quot;;uses:=&quot;org.osgi.framework&quot;,org.osgi.service.permissionadmin;version=&quot;1.2&quot;,org.osgi.service.condpermadmin;version=&quot;1.1.1&quot;;uses:=&quot;org.osgi.framework,org.osgi.service.permissionadmin&quot;"/>
<attribute name="Import-Package" value="javax.security.auth.x500,org.osgi.dto;version=&quot;[1.1,2)&quot;,org.osgi.framework;version=&quot;[1.9,1.10)&quot;,org.osgi.framework.wiring;version=&quot;[1.2,2)&quot;,org.osgi.resource;version=&quot;[1.0,2)&quot;,org.osgi.resource.dto;version=&quot;[1.0,2)&quot;,org.osgi.service.permissionadmin;version=&quot;[1.2,2)&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>