blob: d0b3c69f0b028d5f028069534f6d9c50749e3540 [file] [log] [blame]
<?xml version="1.0" standalone='yes'?>
<!-- This Ant build file fragment contains targets needed to build
distributable OSGi-aware artifacts
-->
<project name="OSGi export tasks for Jackson" basedir=".">
<!-- Need BND task for OSGi bundle/metadata creation -->
<taskdef name="osgiJar" classname="net.luminis.build.plugin.bnd.BuildTask">
<classpath>
<fileset dir="${dir.lib}/ant" includes="bndtask*.jar" />
</classpath>
</taskdef>
<target name="jars.asl" depends="jar.core.asl, jar.mapper.asl" />
<target name="jars.lgpl" depends="jar.core.lgpl, jar.mapper.lgpl" />
<target name="jars.other" depends="jar.jaxrs, jar.xc" />
<!-- Let's build our JARs as OSGi bundles; then they work
both within and outside of OSGi containers
-->
<!-- Jackson requires Java5 (enums, some generics) -->
<property name="REQ_JDK_VERSION" value="J2SE-1.5" />
<!-- ASL-licensed: core, mapper jars -->
<target name="jar.core.asl" depends="compile.core">
<osgiJar
outputdir="${dir.build}"
bundleName="${IMPL_TITLE_CORE}"
bundleVendor="${IMPL_VENDOR}"
bundleSymbolicName="jackson-core-asl"
bundleVersion="${IMPL_VERSION}"
bundleLicense="http://www.apache.org/licenses/LICENSE-2.0.txt"
bundleRequiredExecutionEnvironment="${REQ_JDK_VERSION}"
filename="jackson-core-asl-${IMPL_VERSION}"
exportpackage="
org.codehaus.jackson;version=${IMPL_VERSION},
org.codehaus.jackson.annotate;version=${IMPL_VERSION},
org.codehaus.jackson.io;version=${IMPL_VERSION},
org.codehaus.jackson.type;version=${IMPL_VERSION},
org.codehaus.jackson.util;version=${IMPL_VERSION}
"
privatePackage="!org.codehaus.jackson,
!org.codehaus.jackson.annotate,
!org.codehaus.jackson.io,
!org.codehaus.jackson.type,
!org.codehaus.jackson.util,
*"
includeResource="META-INF=release-notes/asl"
includeIncludeResourceHeader="false"
>
<classpath><pathelement path="${dir.build.classes.core}" /></classpath>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Title" value="${IMPL_TITLE_CORE}"/>
<attribute name="Implementation-Version" value="${IMPL_VERSION}"/>
<attribute name="Implementation-Vendor" value="${IMPL_VENDOR}"/>
<attribute name="Specification-Title" value="${JSON_TITLE}"/>
<attribute name="Specification-Version" value="${JSON_VERSION}"/>
<attribute name="Specification-Vendor" value="${JSON_VENDOR}"/>
</manifest>
</osgiJar>
</target>
<target name="jar.mapper.asl" depends="compile.mapper">
<osgiJar
outputdir="${dir.build}"
bundleName="${IMPL_TITLE_MAPPER}"
bundleVendor="${IMPL_VENDOR}"
bundleSymbolicName="jackson-mapper-asl"
bundleVersion="${IMPL_VERSION}"
bundleLicense="http://www.apache.org/licenses/LICENSE-2.0.txt"
bundleRequiredExecutionEnvironment="${REQ_JDK_VERSION}"
filename="jackson-mapper-asl-${IMPL_VERSION}"
importPackage="
org.codehaus.jackson;version='${IMPL_VERSION}'
,org.codehaus.jackson.annotate;version='${IMPL_VERSION}'
,org.codehaus.jackson.io;version='${IMPL_VERSION}'
,org.codehaus.jackson.type;version='${IMPL_VERSION}'
,org.codehaus.jackson.util;version='${IMPL_VERSION}'
"
exportpackage="
org.codehaus.jackson.map;version=${IMPL_VERSION},
org.codehaus.jackson.map.deser;version=${IMPL_VERSION},
org.codehaus.jackson.map.ser;version=${IMPL_VERSION},
org.codehaus.jackson.node;version=${IMPL_VERSION},
org.codehaus.jackson.schema;version=${IMPL_VERSION}
"
privatePackage="
!org.codehaus.jackson.map,
!org.codehaus.jackson.map.deser,
!org.codehaus.jackson.map.ser,
!org.codehaus.jackson.node,
!org.codehaus.jackson.schema,
*"
includeResource="META-INF=release-notes/asl"
includeIncludeResourceHeader="false"
>
<classpath><pathelement path="${dir.build.classes.mapper}" /></classpath>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Title" value="${IMPL_TITLE_MAPPER}"/>
<attribute name="Implementation-Version" value="${IMPL_VERSION}"/>
<attribute name="Implementation-Vendor" value="${IMPL_VENDOR}"/>
</manifest>
</osgiJar>
</target>
<!-- LGPL-licensed: core, mapper jars -->
<target name="jar.core.lgpl" depends="compile.core">
<osgiJar
outputdir="${dir.build}"
bundleName="${IMPL_TITLE_CORE}"
bundleVendor="${IMPL_VENDOR}"
bundleSymbolicName="jackson-core-lgpl"
bundleVersion="${IMPL_VERSION}"
bundleLicense="http://www.gnu.org/licenses/lgpl-2.1.html"
bundleRequiredExecutionEnvironment="${REQ_JDK_VERSION}"
filename="jackson-core-lgpl-${IMPL_VERSION}"
exportpackage='
org.codehaus.jackson;version=${IMPL_VERSION}
,org.codehaus.jackson.annotate;version=${IMPL_VERSION}
,org.codehaus.jackson.io;version=${IMPL_VERSION}
,org.codehaus.jackson.type;version=${IMPL_VERSION}
,org.codehaus.jackson.util;version=${IMPL_VERSION}
'
privatePackage="!org.codehaus.jackson,
!org.codehaus.jackson.annotate,
!org.codehaus.jackson.io,
!org.codehaus.jackson.type,
!org.codehaus.jackson.util,
*"
includeResource="META-INF=release-notes/lgpl"
includeIncludeResourceHeader="false"
>
<classpath>
<pathelement path="${dir.build.classes.core}" />
</classpath>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Title" value="${IMPL_TITLE_CORE}"/>
<attribute name="Implementation-Version" value="${IMPL_VERSION}"/>
<attribute name="Implementation-Vendor" value="${IMPL_VENDOR}"/>
<attribute name="Specification-Title" value="${JSON_TITLE}"/>
<attribute name="Specification-Version" value="${JSON_VERSION}"/>
<attribute name="Specification-Vendor" value="${JSON_VENDOR}"/>
</manifest>
</osgiJar>
</target>
<target name="jar.mapper.lgpl" depends="compile.mapper">
<osgiJar
outputdir="${dir.build}"
bundleName="${IMPL_TITLE_MAPPER}"
bundleVendor="${IMPL_VENDOR}"
bundleSymbolicName="jackson-mapper-lgpl"
bundleVersion="${IMPL_VERSION}"
bundleLicense="http://www.gnu.org/licenses/lgpl-2.1.html"
bundleRequiredExecutionEnvironment="${REQ_JDK_VERSION}"
filename="jackson-mapper-lgpl-${IMPL_VERSION}"
importPackage="
org.codehaus.jackson;version='${IMPL_VERSION}'
,org.codehaus.jackson.annotate;version='${IMPL_VERSION}'
,org.codehaus.jackson.io;version='${IMPL_VERSION}'
,org.codehaus.jackson.type;version='${IMPL_VERSION}'
,org.codehaus.jackson.util;version='${IMPL_VERSION}'
"
exportpackage="
org.codehaus.jackson.map;version=${IMPL_VERSION},
org.codehaus.jackson.map.deser;version=${IMPL_VERSION},
org.codehaus.jackson.map.ser;version=${IMPL_VERSION},
org.codehaus.jackson.node;version=${IMPL_VERSION},
org.codehaus.jackson.schema;version=${IMPL_VERSION}
"
privatePackage="!org.codehaus.jackson.map,
!org.codehaus.jackson.map.deser,
!org.codehaus.jackson.map.ser,
!org.codehaus.jackson.node,
!org.codehaus.jackson.schema,
*"
includeResource="META-INF=release-notes/lgpl"
includeIncludeResourceHeader="false"
>
<classpath><pathelement path="${dir.build.classes.mapper}" /></classpath>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Title" value="${IMPL_TITLE_MAPPER}"/>
<attribute name="Implementation-Version" value="${IMPL_VERSION}"/>
<attribute name="Implementation-Vendor" value="${IMPL_VENDOR}"/>
</manifest>
</osgiJar>
</target>
<!-- Others, ASL+LGPL licensed, just a single jar
(OSGi nominally just lists ASL, not sure if/how to
add multiple?)
-->
<!-- First, JAX-RS provider jar -->
<!-- 06-May-2009, tatu: Removed META-INF/services
registration as it could conflict with other
JAX-RS json providers.
includeResource="META-INF/services=${dir.src.resource.jaxrs}"
-->
<target name="jar.jaxrs" depends="compile.jaxrs">
<osgiJar
outputdir="${dir.build}"
bundleName="${IMPL_TITLE_JAXRS}"
bundleVendor="${IMPL_VENDOR}"
bundleSymbolicName="jackson-jaxrs"
bundleVersion="${IMPL_VERSION}"
bundleLicense="http://www.apache.org/licenses/LICENSE-2.0.txt"
bundleRequiredExecutionEnvironment="${REQ_JDK_VERSION}"
filename="jackson-jaxrs-${IMPL_VERSION}"
importPackage="
javax.ws.rs
,javax.ws.rs.core
,javax.ws.rs.ext
,org.codehaus.jackson;version='${IMPL_VERSION}'
,org.codehaus.jackson.map;version='${IMPL_VERSION}'
,org.codehaus.jackson.map.type;version='${IMPL_VERSION}'
,org.codehaus.jackson.type;version='${IMPL_VERSION}'
"
exportpackage="
org.codehaus.jackson.jaxrs;version=${IMPL_VERSION}"
includeResource="META-INF=release-notes/asl"
includeIncludeResourceHeader="false"
>
<classpath><pathelement path="${dir.build.classes.jaxrs}" /></classpath>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Title" value="${IMPL_TITLE_JAXRS}"/>
<attribute name="Implementation-Version" value="${IMPL_VERSION}"/>
<attribute name="Implementation-Vendor" value="${IMPL_VENDOR}"/>
</manifest>
</osgiJar>
</target>
<!-- Then XC (Xml Compatibility) jar, since 1.1 -->
<target name="jar.xc" depends="compile.xc">
<osgiJar
outputdir="${dir.build}"
bundleName="${IMPL_TITLE_XC}"
bundleVendor="${IMPL_VENDOR}"
bundleSymbolicName="jackson-xc"
bundleVersion="${IMPL_VERSION}"
bundleLicense="http://www.apache.org/licenses/LICENSE-2.0.txt"
bundleRequiredExecutionEnvironment="${REQ_JDK_VERSION}"
filename="jackson-xc-${IMPL_VERSION}"
importPackage="
javax.xml.bind.annotation
,javax.xml.bind.annotation.adapters
,org.codehaus.jackson;version='${IMPL_VERSION}'
,org.codehaus.jackson.map;version='${IMPL_VERSION}'
,org.codehaus.jackson.map.annotate;version='${IMPL_VERSION}'
,org.codehaus.jackson.map.introspect;version='${IMPL_VERSION}'
,org.codehaus.jackson.schema;version='${IMPL_VERSION}'
"
exportpackage="
org.codehaus.jackson.xc;version=${IMPL_VERSION}"
includeResource="META-INF=release-notes/asl"
includeIncludeResourceHeader="false"
>
<classpath><pathelement path="${dir.build.classes.xc}" /></classpath>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Title" value="${IMPL_TITLE_XC}"/>
<attribute name="Implementation-Version" value="${IMPL_VERSION}"/>
<attribute name="Implementation-Vendor" value="${IMPL_VENDOR}"/>
</manifest>
</osgiJar>
</target>
</project>