130 lines
7.6 KiB
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="1.5.2";uses:="org.osgi.framework",org.osgi.resource;version="1.0",org.osgi.resource.dto;version="1.0";uses:="org.osgi.dto",org.osgi.dto;version="1.1",org.osgi.framework;version="1.9",org.osgi.framework.namespace;version="1.1";uses:="org.osgi.resource",org.osgi.framework.hooks.resolver;version="1.0";uses:="org.osgi.framework.wiring",org.osgi.framework.hooks.weaving;version="1.1";uses:="org.osgi.framework.wiring",org.osgi.framework.hooks.service;version="1.1";uses:="org.osgi.framework",org.osgi.framework.hooks.bundle;version="1.1";uses:="org.osgi.framework",org.osgi.framework.wiring;version="1.2";uses:="org.osgi.framework,org.osgi.resource",org.osgi.framework.wiring.dto;version="1.3";uses:="org.osgi.dto,org.osgi.resource.dto",org.osgi.framework.startlevel;version="1.0";uses:="org.osgi.framework",org.osgi.framework.startlevel.dto;version="1.0";uses:="org.osgi.dto",org.osgi.framework.dto;version="1.8";uses:="org.osgi.dto",org.osgi.framework.launch;version="1.2";uses:="org.osgi.framework",org.osgi.service.resolver;version="1.1";uses:="org.osgi.resource",org.osgi.service.url;version="1.0",org.osgi.service.packageadmin;version="1.2";uses:="org.osgi.framework",org.osgi.service.startlevel;version="1.1";uses:="org.osgi.framework",org.osgi.service.permissionadmin;version="1.2",org.osgi.service.condpermadmin;version="1.1.1";uses:="org.osgi.framework,org.osgi.service.permissionadmin""/>
|
|
<attribute name="Import-Package" value="javax.security.auth.x500,org.osgi.dto;version="[1.1,2)",org.osgi.framework;version="[1.9,1.10)",org.osgi.framework.wiring;version="[1.2,2)",org.osgi.resource;version="[1.0,2)",org.osgi.resource.dto;version="[1.0,2)",org.osgi.service.permissionadmin;version="[1.2,2)""/>
|
|
<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:="(&(osgi.ee=JavaSE)(version=${compiler.target}))""/>
|
|
</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>
|