osgi-compendium/osgi-compendium-build.xml

136 lines
12 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project name="osgi.cmpn" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="compiler.source" value="1.8"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="project.artifactId" value="osgi.cmpn"/>
<property name="project.groupId" value="org.osgi"/>
<property name="project.version" value="7.0.0"/>
<property name="project.description" value="OSGi Compendium 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"
encoding="UTF-8"
optimize="false"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
<copy todir="${build.outputDir}">
<fileset dir="${build.resourceDir}"/>
</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-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.application;uses:=&quot;org.osgi.framework&quot;;version=&quot;1.0&quot;,org.osgi.namespace.contract;uses:=&quot;org.osgi.resource&quot;;version=&quot;1.0&quot;,org.osgi.namespace.extender;uses:=&quot;org.osgi.resource&quot;;version=&quot;1.0.1&quot;,org.osgi.namespace.service;uses:=&quot;org.osgi.resource&quot;;version=&quot;1.0&quot;,org.osgi.namespace.unresolvable;uses:=&quot;org.osgi.resource&quot;;version=&quot;1.0&quot;,org.osgi.service.application;uses:=&quot;org.osgi.framework&quot;;version=&quot;1.1&quot;,org.osgi.service.async.delegate;uses:=&quot;org.osgi.util.promise&quot;;version=&quot;1.0&quot;,org.osgi.service.async;uses:=&quot;org.osgi.framework,org.osgi.util.promise&quot;;version=&quot;1.0&quot;,org.osgi.service.blueprint.container;uses:=&quot;org.osgi.framework,org.osgi.service.blueprint.reflect&quot;;version=&quot;1.0.2&quot;,org.osgi.service.blueprint.reflect;version=&quot;1.0.1&quot;,org.osgi.service.cm.annotations;version=&quot;1.6.0&quot;,org.osgi.service.cm;uses:=&quot;org.osgi.framework&quot;;version=&quot;1.6.0&quot;,org.osgi.service.component.annotations;version=&quot;1.4.0&quot;,org.osgi.service.component.propertytypes;version=&quot;1.4.0&quot;,org.osgi.service.component.runtime.dto;uses:=&quot;org.osgi.dto,org.osgi.framework.dto&quot;;version=&quot;1.4.0&quot;,org.osgi.service.component.runtime;uses:=&quot;org.osgi.framework,org.osgi.service.component.runtime.dto,org.osgi.util.promise&quot;;version=&quot;1.4.0&quot;,org.osgi.service.component;uses:=&quot;org.osgi.framework&quot;;version=&quot;1.4.0&quot;,org.osgi.service.configurator.annotations;version=&quot;1.0&quot;,org.osgi.service.configurator.namespace;uses:=&quot;org.osgi.resource&quot;;version=&quot;1.0&quot;,org.osgi.service.configurator;version=&quot;1.0&quot;,org.osgi.service.coordinator;uses:=&quot;org.osgi.framework&quot;;version=&quot;1.0.2&quot;,org.osgi.service.deploymentadmin.spi;uses:=&quot;org.osgi.framework,org.osgi.service.deploymentadmin&quot;;version=&quot;1.0.1&quot;,org.osgi.service.deploymentadmin;uses:=&quot;org.osgi.framework,org.osgi.service.deploymentadmin.spi&quot;;version=&quot;1.1&quot;,org.osgi.service.device;uses:=&quot;org.osgi.framework&quot;;version=&quot;1.1&quot;,org.osgi.service.dmt.notification.spi;uses:=&quot;org.osgi.service.dmt.notification&quot;;version=&quot;2.0&quot;,org.osgi.service.dmt.notification;uses:=&quot;org.osgi.service.dmt&quot;;version=&quot;2.0&quot;,org.osgi.service.dmt.security;version=&quot;2.0&quot;,org.osgi.service.dmt.spi;uses:=&quot;org.osgi.service.dmt&quot;;version=&quot;2.0&quot;,org.osgi.service.dmt;version=&quot;2.0.2&quot;,org.osgi.service.event.annotations;version=&quot;1.4.0&quot;,org.osgi.service.event.propertytypes;version=&quot;1.4.0&quot;,org.osgi.service.event;uses:=&quot;org.osgi.framework&quot;;version=&quot;1.4.0&quot;,org.osgi.service.jdbc;uses:=&quot;javax.sql&quot;;version=&quot;1.0&quot;,org.osgi.service.jndi;uses:=&quot;javax.naming,javax.naming.directory&quot;;version=&quot;1.0&quot;,org.osgi.service.log.admin;uses:=&quot;org.osgi.service.log&quot;;version=&quot;1.0&quot;,org.osgi.service.log.stream;uses:=&quot;org.osgi.service.log,org.osgi.util.pushstream&quot;;version=&quot;1.0&quot;,org.osgi.service.log;uses:=&quot;org.osgi.framework&quot;;version=&quot;1.4&quot;,org.osgi.service.metatype.annotations;version=&quot;1.4.0&quot;,org.osgi.service.metatype;uses:=&quot;org.osgi.framework&quot;;version=&quot;1.4.0&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.remoteserviceadmin.namespace;uses:=&quot;org.osgi.resource&quot;;version=&quot;1.0.0&quot;,org.osgi.service.remoteserviceadmin;uses:=&quot;org.osgi.framework&quot;;version=&quot;1.1.0&quot;,org.osgi.service.repository;uses:=&quot;org.osgi.resource,org.osgi.util.promise&quot;;version=&quot;1.1&quot;,org.osgi.service.rest.client;uses:=&quot;org.osgi.framework.dto,org.osgi.framework.startlevel.dto&quot;;version=&quot;1.0.0&quot;,org.osgi.service.rest;version=&quot;1.0.0&quot;,org.osgi.service.serviceloader;uses:=&quot;org.osgi.resource&quot;;version=&quot;1.0&quot;,org.osgi.service.subsystem;uses:=&quot;org.osgi.framework,org.osgi.resource&quot;;version=&quot;1.1&quot;,org.osgi.service.transaction.control.jdbc;uses:=&quot;javax.sql,org.osgi.service.jdbc,org.osgi.service.transaction.control&quot;;version=&quot;1.0.0&quot;,org.osgi.service.transaction.control.recovery;uses:=&quot;javax.transaction.xa&quot;;version=&quot;1.0.0&quot;,org.osgi.service.transaction.control;uses:=&quot;javax.transaction.xa&quot;;version=&quot;1.0.0&quot;,org.osgi.service.upnp;version=&quot;1.2&quot;,org.osgi.service.useradmin;uses:=&quot;org.osgi.framework&quot;;version=&quot;1.1&quot;,org.osgi.service.wireadmin;uses:=&quot;org.osgi.framework&quot;;version=&quot;1.0.1&quot;,org.osgi.util.converter;uses:=&quot;org.osgi.util.function&quot;;version=&quot;1.0&quot;,org.osgi.util.function;version=&quot;1.1&quot;,org.osgi.util.measurement;version=&quot;1.0.2&quot;,org.osgi.util.position;uses:=&quot;org.osgi.util.measurement&quot;;version=&quot;1.0.1&quot;,org.osgi.util.promise;uses:=&quot;org.osgi.util.function&quot;;version=&quot;1.1&quot;,org.osgi.util.pushstream;uses:=&quot;org.osgi.util.function,org.osgi.util.promise&quot;;version=&quot;1.0&quot;,org.osgi.util.xml;uses:=&quot;javax.xml.parsers,org.osgi.framework&quot;;version=&quot;1.0.1&quot;"/>
<attribute name="Import-Package" value="java.io,java.lang,java.lang.annotation,java.lang.invoke,java.lang.reflect,java.net,java.security,java.security.cert,java.sql,java.text,java.time,java.util,java.util.concurrent,java.util.concurrent.atomic,java.util.concurrent.locks,java.util.function,java.util.regex,java.util.stream,java.util.zip,javax.naming,javax.naming.directory,javax.sql,javax.transaction.xa,javax.xml.parsers,org.osgi.dto;version=&quot;[1.1,2)&quot;,org.osgi.framework.dto;version=&quot;[1.8,2)&quot;,org.osgi.framework.startlevel.dto;version=&quot;[1.0,2)&quot;,org.osgi.framework;version=&quot;[1.10,2)&quot;,org.osgi.resource;version=&quot;[1.0,2)&quot;,org.osgi.service.blueprint.reflect;version=&quot;[1.0,2)&quot;,org.osgi.service.component.runtime.dto;version=&quot;[1.4,2)&quot;,org.osgi.service.deploymentadmin.spi;version=&quot;[1.0,2)&quot;,org.osgi.service.deploymentadmin;version=&quot;[1.1,2)&quot;,org.osgi.service.dmt.notification;version=&quot;[2.0,3)&quot;,org.osgi.service.dmt;version=&quot;[2.0,3)&quot;,org.osgi.service.jdbc;version=&quot;[1.0,2)&quot;,org.osgi.service.log;version=&quot;[1.4,2)&quot;,org.osgi.service.transaction.control;version=&quot;[1.0,2)&quot;,org.osgi.util.function;version=&quot;[1.1,2)&quot;,org.osgi.util.measurement;version=&quot;[1.0,2)&quot;,org.osgi.util.promise;version=&quot;[1.1,2)&quot;,org.osgi.util.pushstream;version=&quot;[1.0,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>