Mercurial > public > develkit
annotate osgi-ant-bundlor.xml @ 271:16c2e0ea6501
fix copyright update
author | smith@nwoca.org |
---|---|
date | Mon, 07 Jan 2019 13:50:21 +0000 |
parents | 5f8d6291cc66 |
children |
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 |
38 | 12 <target name="-osgi-jar" depends="-init-osgi,ivy-info" unless="osgi.jar.disabled"> |
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"/> |
39 | 38 <attribute name="profile" description="OSGI Profile" default=""/> |
40
5f8d6291cc66
Allow bundlor to be configure to fail/not fail on warning
smith@nwoca.org
parents:
39
diff
changeset
|
39 <attribute name="failOnWarning" description="fail for warnings" default="true"/> |
20
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
40 <sequential> |
36
82a5d5a000fe
CM-125: Auto connect osgi dependency to build process
smith@nwoca.org
parents:
35
diff
changeset
|
41 <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
|
42 <echoproperties destfile="${build.dir}/ivydeps.txt"> |
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
43 <propertyset> |
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
44 <propertyref prefix="ivydeps"/> |
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
45 <mapper type="glob" from="ivydeps.*" to="*"/> |
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
46 </propertyset> |
ba7ae19e40a0
CM-125: output file to assist in creating OSGI template.
smith@nwoca.org
parents:
36
diff
changeset
|
47 </echoproperties> |
20
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
48 <bundlor:bundlor |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
49 inputPath="${basedir}/@{jar}" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
50 outputPath="${basedir}/@{jar}" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
51 bundleVersion="@{version}" |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
52 bundleSymbolicName="@{symbolicName}" |
40
5f8d6291cc66
Allow bundlor to be configure to fail/not fail on warning
smith@nwoca.org
parents:
39
diff
changeset
|
53 failOnWarnings="@{failOnWarning}" |
39 | 54 manifestTemplatePath="@{template}" |
55 osgiProfilePath="@{profile}"> | |
21
a114600dc3d4
CM-125: Fix reference to bundle name attribute
smith@nwoca.org
parents:
20
diff
changeset
|
56 <property name="bundle.name" value="@{name}"/> |
20
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
57 <propertyset> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
58 <propertyref prefix="ivy"/> |
35
7df554d8c4c1
CM-125: correct error in bundlor property mapping
smith@nwoca.org
parents:
21
diff
changeset
|
59 <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
|
60 </propertyset> |
20
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
61 </bundlor:bundlor> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
62 </sequential> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
63 </macrodef> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
64 |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
65 </target> |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
66 |
fe20e4ed4be2
CM-125: Ant script to assist creating OSGI jars.
smith@nwoca.org
parents:
diff
changeset
|
67 </project> |