-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-docs.xml
179 lines (133 loc) · 5.01 KB
/
build-docs.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<project name="jLEMS documentation" default="html" basedir=".">
<description>
LEMS documentation
</description>
<property file="VERSION"/>
<property environment="env"/>
<import file="build.xml"/>
<path id="generation.classpath">
<pathelement location="bun/junit-4.8.1.jar"/>
<pathelement location="lib/commons-compiler.jar"/>
<pathelement location="lib/commons-compiler-jdk.jar"/>
</path>
<target name="clean" description="Cleaning up">
<delete failonerror="false">
<fileset dir="build/site" includes="**/*"/>
</delete>
</target>
<target name="html" description="Generate HTML documentation in dir site from source XML in docsrc."
depends="clean, extractdocs">
<mkdir dir="build/site"/>
<xslt basedir="docs/docsrc"
destdir="build/site"
includes="**/*.xml"
processor="trax"
style="docs/xsl/page.xsl"
extension=".html">
<param name="datestamp" expression="${datestamp}"/>
<param name="datetext" expression="${datetext}"/>
<param name="vnum" expression="${version.number}"/>
<param name="vdate" expression="${version.date}"/>
</xslt>
<copy todir="build/site" file="docs/css/static.css"/>
<copy todir="build/site">
<fileset dir="docs/images" includes="*.png"/>
</copy>
<copy todir="build/site">
<fileset dir="examples" includes="*.xml"/>
</copy>
</target>
<target name="copyToPages" depends="html">
<copy todir="/home/rcc/git/jLEMSPagesBranch">
<fileset dir="build/site" includes="*.*"/>
</copy>
</target>
<target name="site" depends="pdfdocs, html"/>
<target name="upload-docs">
<ftp server="psics.org"
remotedir="/www/lems"
userid="xxx"
password="xxx"
action="send"
passive="yes"
depends="no"
binary="yes"
verbose="yes"
ignoreNoncriticalErrors="yes"
skipFailedTransfers="yes">
<fileset dir="site">
<include name="**/*.html"/>
<include name="**/*.xml"/>
<include name="**/*.png"/>
<include name="**/*.css"/>
<include name="**/*.zip"/>
<include name="**/*.php"/>
<include name="**/*.jar"/>
</fileset>
</ftp>
</target>
<target name="upload-html">
<ftp server="psics.org"
remotedir="/www/lems"
userid="xxx"
password="xxx"
action="send"
passive="yes"
depends="no"
binary="yes"
verbose="yes"
ignoreNoncriticalErrors="yes"
skipFailedTransfers="yes">
<fileset dir="site">
<include name="**/*.html"/>
</fileset>
</ftp>
</target>
<target name="merge" depends="clean">
<mkdir dir="tmp"/>
<xslt basedir="docsrc"
destdir="tmp"
in="docsrc/lems.xml"
out="tmp/wklems.xml"
processor="trax"
style="xsl/merge.xsl"
extension=".xml">
</xslt>
</target>
<target name="fo" depends="merge">
<xslt basedir="tmp"
destdir="tmp/fo"
in="tmp/wklems.xml"
out="tmp/wklems.fo"
processor="trax"
style="xsl/doctofo.xsl"
extension=".fo">
<param name="datestamp" expression="${datestamp}"/>
<param name="datetext" expression="${datetext}"/>
</xslt>
</target>
<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop">
<classpath>
<fileset dir="antlib">
<include name="fop*.jar"/>
</fileset>
</classpath>
</taskdef>
<target name="pdfdocs" depends="fo" description="Generates PDF of content of website">
<mkdir dir="site"/>
<fop format="application/pdf"
fofile="tmp/wklems.fo"
outfile="site/lems.pdf"/>
</target>
<target name="extractdocs" depends="jar" description="Extract documentation from annotations and write to xml">
<mkdir dir="build/docs"/>
<java classname="org.lemsml.jlemsio.doc.DocExtractor" fork="false">
<arg value="build/docs/sourceannotations.xml"/>
<classpath>
<fileset dir="builtjars">
<include name="lems.jar"/>
</fileset>
</classpath>
</java>
</target>
</project>