Mercurial > public > develkit
annotate osgi-ant-bundlor.xml @ 37:ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
author | smith@nwoca.org |
---|---|
date | Mon, 09 May 2011 18:09:30 -0400 |
parents | 82a5d5a000fe |
children | ec63736cd2a3 |
rev | line source |
---|---|
20
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
1 <?xml version="1.0" encoding="UTF-8"?> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
2 <project name="osgi-project-tasks" default="" basedir="." |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
3 xmlns:ssdtosgi="http://www.ssdt-ohio.org/ant/osgi" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
4 xmlns:ivy="antlib:fr.jayasoft.ivy.ant" |
36
82a5d5a000fe
CM-125: Auto connect osgi dependency to build process
smith@nwoca.org
parents:
35
diff
changeset
|
5 xmlns:bundlor="antlib:com.springsource.bundlor.ant" |
82a5d5a000fe
CM-125: Auto connect osgi dependency to build process
smith@nwoca.org
parents:
35
diff
changeset
|
6 xmlns:ssdtant="antlib:org.ssdt_ohio.tools.ant"> |
20
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
7 |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
8 <description>Ant tasks to assist building OSGi bundles.</description> |
36
82a5d5a000fe
CM-125: Auto connect osgi dependency to build process
smith@nwoca.org
parents:
35
diff
changeset
|
9 |
82a5d5a000fe
CM-125: Auto connect osgi dependency to build process
smith@nwoca.org
parents:
35
diff
changeset
|
10 <ssdtant:add-dependency target="-post-jar" depends="-osgi-jar"/> |
82a5d5a000fe
CM-125: Auto connect osgi dependency to build process
smith@nwoca.org
parents:
35
diff
changeset
|
11 |
37
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
12 <target name="-osgi-jar" depends="-init-osgi,ivy-info"> |
36
82a5d5a000fe
CM-125: Auto connect osgi dependency to build process
smith@nwoca.org
parents:
35
diff
changeset
|
13 <ssdtosgi:jar jar="${dist.jar}"/> |
82a5d5a000fe
CM-125: Auto connect osgi dependency to build process
smith@nwoca.org
parents:
35
diff
changeset
|
14 </target> |
82a5d5a000fe
CM-125: Auto connect osgi dependency to build process
smith@nwoca.org
parents:
35
diff
changeset
|
15 |
20
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
16 <target name="-init-osgi"> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
17 <ivy:settings file="ivysettings.xml"/> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
18 <ivy:cachepath resolveId="bundlor.classpath" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
19 pathid="bundlor.classpath" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
20 organisation="com.springsource.bundlor" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
21 module="com.springsource.bundlor.ant" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
22 revision="1.0.0.RELEASE" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
23 inline="true" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
24 type="jar" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
25 log="download-only"/> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
26 <taskdef resource="com/springsource/bundlor/ant/antlib.xml" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
27 uri="antlib:com.springsource.bundlor.ant" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
28 classpathref="bundlor.classpath"/> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
29 |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
30 <macrodef name="jar" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
31 description="OSGi-ifies jar file" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
32 uri="http://www.ssdt-ohio.org/ant/osgi"> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
33 <attribute name="jar" description="input jar"/> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
34 <attribute name="symbolicName" description="Bundle Symbolic Name" default="${ivy.organisation}.${ivy.module}"/> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
35 <attribute name="name" description="Bundle Name" default="${application.title}"/> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
36 <attribute name="version" description="Bundle Version" default="${ivy.revision}"/> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
37 <attribute name="template" description="Bundle Template" default="${basedir}/template.mf"/> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
38 <sequential> |
36
82a5d5a000fe
CM-125: Auto connect osgi dependency to build process
smith@nwoca.org
parents:
35
diff
changeset
|
39 <echo message="OSGI-ifying @{jar} as @{symbolicName};@{version}" level="info"/> |
37
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
40 <echoproperties destfile="${build.dir}/ivydeps.txt"> |
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
41 <propertyset> |
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
42 <propertyref prefix="ivydeps"/> |
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
43 <mapper type="glob" from="ivydeps.*" to="*"/> |
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
44 </propertyset> |
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
45 </echoproperties> |
20
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
46 <bundlor:bundlor |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
47 inputPath="${basedir}/@{jar}" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
48 outputPath="${basedir}/@{jar}" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
49 bundleVersion="@{version}" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
50 bundleSymbolicName="@{symbolicName}" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
51 failOnWarnings="true" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
52 manifestTemplatePath="@{template}"> |
21
a114600dc3d4
CM-125: Fix reference to bundle name attribute
smith@nwoca.org
parents:
20
diff
changeset
|
53 <property name="bundle.name" value="@{name}"/> |
20
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
54 <propertyset> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
55 <propertyref prefix="ivy"/> |
35
7df554d8c4c1
CM-125: correct error in bundlor property mapping
smith@nwoca.org
parents:
21
diff
changeset
|
56 <mapper type="glob" from="ivydeps.*" to="*"/> |
37
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
57 </propertyset> |
20
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
58 </bundlor:bundlor> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
59 </sequential> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
60 </macrodef> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
61 |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
62 </target> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
63 |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
64 </project> |