Mercurial > public > develkit
comparison osgi-ant-bundlor.xml @ 20:fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
author | smith@nwoca.org |
---|---|
date | Sat, 15 Jan 2011 15:25:11 -0500 |
parents | |
children | a114600dc3d4 |
comparison
equal
deleted
inserted
replaced
19:2632897c8a2b | 20:fe20e4ed4be2 |
---|---|
1 <?xml version="1.0" encoding="UTF-8"?> | |
2 <project name="osgi-project-tasks" default="" basedir="." | |
3 xmlns:ssdtosgi="http://www.ssdt-ohio.org/ant/osgi" | |
4 xmlns:ivy="antlib:fr.jayasoft.ivy.ant" | |
5 xmlns:bundlor="antlib:com.springsource.bundlor.ant"> | |
6 | |
7 <description>Ant tasks to assist building OSGi bundles.</description> | |
8 | |
9 <target name="-init-osgi"> | |
10 <ivy:settings file="ivysettings.xml"/> | |
11 <ivy:cachepath resolveId="bundlor.classpath" | |
12 pathid="bundlor.classpath" | |
13 organisation="com.springsource.bundlor" | |
14 module="com.springsource.bundlor.ant" | |
15 revision="1.0.0.RELEASE" | |
16 inline="true" | |
17 type="jar" | |
18 log="download-only"/> | |
19 <taskdef resource="com/springsource/bundlor/ant/antlib.xml" | |
20 uri="antlib:com.springsource.bundlor.ant" | |
21 classpathref="bundlor.classpath"/> | |
22 | |
23 <macrodef name="jar" | |
24 description="OSGi-ifies jar file" | |
25 uri="http://www.ssdt-ohio.org/ant/osgi"> | |
26 <attribute name="jar" description="input jar"/> | |
27 <attribute name="symbolicName" description="Bundle Symbolic Name" default="${ivy.organisation}.${ivy.module}"/> | |
28 <attribute name="name" description="Bundle Name" default="${application.title}"/> | |
29 <attribute name="version" description="Bundle Version" default="${ivy.revision}"/> | |
30 <attribute name="template" description="Bundle Template" default="${basedir}/template.mf"/> | |
31 <sequential> | |
32 <bundlor:bundlor | |
33 inputPath="${basedir}/@{jar}" | |
34 outputPath="${basedir}/@{jar}" | |
35 bundleVersion="@{version}" | |
36 bundleSymbolicName="@{symbolicName}" | |
37 failOnWarnings="true" | |
38 manifestTemplatePath="@{template}"> | |
39 <property name="bundle.name" value="@name"/> | |
40 <propertyset> | |
41 <propertyref prefix="ivy"/> | |
42 <mapper type="glob" from="ivydeps." to="*"/> | |
43 </propertyset> | |
44 </bundlor:bundlor> | |
45 </sequential> | |
46 </macrodef> | |
47 | |
48 </target> | |
49 | |
50 </project> |