-
Notifications
You must be signed in to change notification settings - Fork 10
/
build-plugins.xml
110 lines (93 loc) · 3.62 KB
/
build-plugins.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="dita-rng-converter plugin builder" default="deploy-toolkit-plugins">
<!-- =======================================
DITA RNG-to-DTD and XSD Converter
Open Toolkit plugin builder
This Ant script creates and packages the
DITA Open Toolkit plugins that make the
RNG-to-X transforms available as DITA OT
transformation types as a convenience.
Copyright (c) 2015 DITA Community Project
======================================== -->
<property file="version.properties"/>
<property file=".build.properties"/>
<property file="build.properties"/>
<property file="${user.home}/.build.properties"/>
<property file="${user.home}/build.properties"/>
<property name="xsl.src" location="${basedir}/xsl"/>
<property name="doctypes.src" location="${basedir}/doctypes"/>
<property name="plugin.src" location="${basedir}/toolkit_plugins"/>
<property name="dist" location="${basedir}/dist"/>
<property name="plugin.dist" location="${dist}/plugins"/>
<property name="package.dist" location="${dist}/dita-rng-converters"/>
<property name="plugin-deploy_target" location="${dita-ot-dir}/plugins"/>
<target name="init">
<buildnumber/>
<tstamp/>
</target>
<target name="dist-init" depends="init">
<delete failonerror="false" includeemptydirs="true">
<fileset dir="${dist}" includes="*/**"/>
</delete>
<mkdir dir="${dist}"/>
<mkdir dir="${package.dist}"/>
</target>
<target name="dist-toolkit-plugins"
description="Packages the DITA Open Toolkit plugins for deployment to a working Toolkit instance"
depends="
dist-init,
dist-license-info
"
>
<copy todir="${plugin.dist}">
<fileset dir="${plugin.src}">
<include name="org.dita-community.com.dita-rng-converter.converter/**"/>
<include name="org.dita-community.com.dita-rng-converter.doctypes/**"/>
<exclude name="*.zip"/>
<!-- FIXME: Reinstate this when it's implemented properly: -->
<exclude name="**/rng2ditarnc/"/>
</fileset>
</copy>
<copy todir="${plugin.dist}/org.dita-community.com.dita-rng-converter.converter">
<fileset dir="${basedir}">
<include name="build.xml"/>
</fileset>
</copy>
<copy todir="${plugin.dist}/org.dita-community.com.dita-rng-converter.converter/xsl">
<fileset dir="${xsl.src}">
<include name="**/*"/>
<exclude name="**/out/"/>
<exclude name="rng2single-rng/"/>
<!-- FIXME: Reinstate this when it's implemented properly: -->
<exclude name="rng2ditarnc/"/>
</fileset>
</copy>
<copy todir="${plugin.dist}/org.dita-community.com.dita-rng-converter.doctypes">
<fileset dir="${doctypes.src}">
<include name="**/*"/>
</fileset>
</copy>
</target>
<target name="deploy-toolkit-plugins" depends="dist-toolkit-plugins"
description="Deploy plugins to local DITA Open Toolkit">
<delete failonerror="true" includeemptydirs="true">
<fileset dir="${plugin-deploy_target}" includes="org.dita-community.dita-rng-converters/**/*">
</fileset>
</delete>
<mkdir dir="${plugin-deploy_target}"/>
<copy todir="${plugin-deploy_target}">
<fileset dir="${plugin.dist}">
<include name="**/*"/>
</fileset>
</copy>
<!-- Integrate the deployed plugins: -->
<ant target="integrate" antfile="${dita-ot-dir}/integrator.xml"/>
</target>
<target name="dist-license-info" depends="dist-init">
<copy todir="${plugin.dist}">
<fileset dir="${basedir}">
<include name="LICENSE"/>
</fileset>
</copy>
</target>
</project>