-
Notifications
You must be signed in to change notification settings - Fork 1
/
docs.xmli
267 lines (246 loc) · 13.4 KB
/
docs.xmli
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<?xml version="1.0"?>
<project name="doc" default="doc" basedir=".">
<description>
Build documentation - XDocs and Javadoc.
For building XDocs, edit xdocs/**/*.xml first.
XXX for no apparent reason, your CWD must be the main Ant source dir, or this will fail:
.../docs.xml:64: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource './site.vsl'
</description>
<property name="velocity.dir" location="lib/ext"/>
<!-- Initialization properties -->
<property name="project.name" value="ejbca"/>
<property name="docs.tools.dest" location="tmp/docs-tools"/>
<property name="docs.src" location="doc/xdocs/docs"/>
<property name="docs.dest" location="tmp/htdocs/docs"/>
<property name="docs.nojs.dest" location="tmp/htdocs/docsnojs"/>
<property name="docs.dest.ws" location="tmp/htdocs/docs/ws"/>
<property name="docs.dest.logtypes" location="tmp/htdocs/docs/logtypes"/>
<property name="site.src" location="doc/xdocs/site"/>
<property name="site.dest" location="tmp/htdocs"/>
<property name="jdocs.ws.tmp" location="tmp/jdocswstmp"/>
<property name="ws.client.gen.relative-path" value="org/ejbca/core/protocol/ws/client/gen"/>
<property name="client.ws.class" value="EjbcaWS"/>
<property name="es.iface.dir" location="modules/edition-specific/src-interface/org/ejbca/core/protocol/ws/objects"/>
<property name="ws.objects.dir" location="modules/ejbca-ws/src/org/ejbca/core/protocol/ws/objects"/>
<property name="ws.common.dir" location="modules/ejbca-ws/src/org/ejbca/core/protocol/ws/common"/>
<property name="ws.client.gen.src" location="modules/ejbca-ws-cli/src-gen"/>
<property name="ws.master.file" location="${ws.common.dir}/IEjbcaWS.java"/>
<property name="project.file" value="stylesheets/project.xml" />
<property name="docs.templ.path" location="${docs.src}/stylesheets" />
<property name="site.templ.path" location="${site.src}/stylesheets" />
<property name="docs.velocity.props" location="${docs.src}/velocity.properties" />
<property name="site.velocity.props" location="${site.src}/velocity.properties" />
<property name="include.xml" value="**/*.xml" />
<path id="jdoc.classpath">
<path location="dist/ejbca-util.jar" />
<path location="modules/dist/ejbca-ejb.jar" />
<path location="modules/dist/cesecore-common.jar"/>
<path location="modules/dist/cesecore-entity.jar"/>
<path location="modules/dist/cesecore-ejb-interface.jar"/>
<path location="lib/bcprov-jdk15on-151.jar" />
<path location="lib/bcpkix-jdk15on-151.jar" />
</path>
<!-- =================================================================== -->
<!-- Build doc part -->
<!-- =================================================================== -->
<target name="doc.war" if="doc.war.enabled">
<delete dir="${docs.dest}" />
<antcall target="doc" />
<war destfile="${dist.dir}/doc.war" webxml="${ejbca.home}/src/publicweb/empty_webxml.xml">
<fileset dir="${docs.dest}" />
</war>
</target>
<target name="doc-build-tool">
<mkdir dir="${docs.tools.dest}"/>
<javac srcdir="${ejbca.home}/src/java" destdir="${docs.tools.dest}" debug="on" includeantruntime="no" encoding="UTF-8"
includes="org/ejbca/util/JAXWSDocAndConvTools.java"/>
</target>
<target name="prepare">
<path id="anakia.classpath">
<fileset dir="${velocity.dir}">
<include name="*.jar"/>
</fileset>
</path>
<available classname="org.apache.velocity.anakia.AnakiaTask"
property="AnakiaTask.present">
<classpath refid="anakia.classpath"/>
</available>
<available file="${site.velocity.props}"
property="site.present">
</available>
</target>
<target name="prepare-error" depends="prepare" unless="AnakiaTask.present">
<echo>
AnakiaTask is not present! Please check to make sure that
velocity.jar is in your classpath.
</echo>
<mkdir dir="${docs.dest}"/>
</target>
<target name="doc-external-deps" unless="external-deps-satfisfied"><antcall target="ejbca-util.jar"/></target>
<target name="site" if="site.present">
<taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
<classpath refid="anakia.classpath"/>
</taskdef>
<anakia basedir="${site.src}" destdir="${site.dest}"
extension=".html" style="./site.vsl"
projectFile="${project.file}"
excludes="**/stylesheets/**"
includes="${include.xml}"
lastModifiedCheck="true"
templatePath="${site.templ.path}"
velocityPropertiesFile="${site.velocity.props}">
</anakia>
<copy todir="${site.dest}">
<fileset dir="${site.src}" includes="**/*.css,**/*.png,**/*.jpg,**/*.gif,**/*.pdf"/>
<fileset dir="${site.src}" includes="sensornet/**/*"/>
</copy>
</target>
<target name="doc" if="AnakiaTask.present" depends="prepare-error, doc-build-tool, doc-external-deps, site" description="Build EJBCA inline ear file docs.">
<taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
<classpath refid="anakia.classpath"/>
</taskdef>
<echo file="${docs.templ.path}/VERSION" append="false" message="${app.version}"/>
<anakia basedir="${docs.src}" destdir="${docs.dest}"
extension=".html" style="./site.vsl"
projectFile="${project.file}"
excludes="**/stylesheets/**"
includes="${include.xml}"
lastModifiedCheck="true"
templatePath="${docs.templ.path}"
velocityPropertiesFile="${docs.velocity.props}">
</anakia>
<delete file="${docs.templ.path}/VERSION"/>
<copy todir="${docs.dest}">
<fileset dir="${docs.src}" includes="**/*.css,**/*.png,**/*.jpg,**/*.gif,**/*.pdf"/>
</copy>
<echo message="WS=${ws.objects.dir}"/>
<mkdir dir="${jdocs.ws.tmp}"/>
<mkdir dir="${docs.dest.ws}"/>
<copy overwrite="yes" todir="${jdocs.ws.tmp}">
<fileset dir="${ws.client.gen.src}">
<exclude name="**/${client.ws.class}.java"/>
<exclude name="**/ObjectFactory.java"/>
</fileset>
</copy>
<copy overwrite="yes" file="${ws.objects.dir}/package.html" todir="${jdocs.ws.tmp}/${ws.client.gen.relative-path}"/>
<java classname="org.ejbca.util.JAXWSDocAndConvTools" classpath="${docs.tools.dest}" failonerror="yes" fork="true" inputstring="">
<arg value="${ws.master.file}"/>
<arg value="${ws.client.gen.src}/${ws.client.gen.relative-path}/${client.ws.class}.java"/>
<arg value="${jdocs.ws.tmp}"/>
</java>
<javadoc destdir="${docs.dest.ws}"
author="true"
version="true"
Package="false"
Use="false"
nodeprecated="true"
nodeprecatedlist="true"
classpathref="jdoc.classpath"
windowtitle="EJBCA WS">
<packageset dir="${jdocs.ws.tmp}"/>
<fileset dir="modules/cesecore-common/src" defaultexcludes="yes">
<include name="**/AlgorithmConstants.java"/>
</fileset>
<fileset dir="${es.iface.dir}" defaultexcludes="yes">
<include name="**/*ConstantsWS.java"/>
</fileset>
<fileset dir="${ws.common.dir}" defaultexcludes="yes">
<include name="**/CertificateHelper.java"/>
<include name="**/KeyStoreHelper.java"/>
</fileset>
<link offline="true" href="http://docs.oracle.com/javase/7/docs/api/" packagelistLoc="${env.JAVA_HOME}/docs/api"/>
<doctitle><![CDATA[<h1>EJBCA WS Support</h1>]]></doctitle>
<bottom><![CDATA[<i>2015 PrimeKey Solutions AB.</i>]]></bottom>
</javadoc>
<mkdir dir="${docs.dest.logtypes}"/>
<javadoc destdir="${docs.dest.logtypes}"
author="false"
notree="true"
nohelp="true"
version="false"
Package="false"
Use="false"
nodeprecated="true"
nodeprecatedlist="true"
classpathref="jdoc.classpath"
windowtitle="EJBCA and CESeCore Audit Log types">
<fileset dir="modules/cesecore-common/src" defaultexcludes="yes">
<include name="org/cesecore/audit/enums/*Types.java"/>
<include name="org/cesecore/audit/enums/EventStatus.java"/>
</fileset>
<fileset dir="modules/ejbca-ejb-interface/src" defaultexcludes="yes">
<include name="org/ejbca/core/ejb/audit/enums/*Types.java"/>
</fileset>
<link offline="true" href="http://docs.oracle.com/javase/7/docs/api/" packagelistLoc="${env.JAVA_HOME}/docs/api"/>
<doctitle><![CDATA[<h1>EJBCA and CESeCore Audit Log types</h1>]]></doctitle>
<bottom><![CDATA[<i>2015 PrimeKey Solutions AB.</i>]]></bottom>
</javadoc>
<echo message="Local documentation is now available in file://${docs.dest}/index.html"/>
</target>
<target name="docpiwik" depends="doc" description="Build EJBCA site docs including piwik webstats">
<!-- Replaced the token for Piwik tracking script in the built documentation.
This is excluded in the doc included in ejbca.ear, but included for the doc built for the website.
Must use ISO-8859-1 encoding, otherwise items like ® will be replaced by UTF-8 mumbo jumbo -->
<replace dir="${docs.dest}" token="!--Piwik--" encoding="ISO-8859-1">
<replacevalue><![CDATA[script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://stat.primekey.se/piwik/" : "http://stat.primekey.se/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 5);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="//stat.primekey.se/piwik/piwik.php?idsite=5" style="border:0" alt="" /></p></noscript]]>
</replacevalue>
</replace>
</target>
<!-- This target depends on having the jsch classes installed in ant
http://sourceforge.net/projects/JSch
-->
<target name="site:publish" depends="doc" description="Publish the website, use like 'ant -Dusername=me -Dpassword=mypwd site:publish'">
<property name="publish.dir" value="/home/groups/e/ej/ejbca/htdocs"/>
<tar destfile="tmp/htdocs.tgz" compression="gzip">
<tarfileset dir="${docs.dest}" mode="664" dirmode="775" username="${username}" group="ejbca"/>
</tar>
<scp file="tmp/htdocs.tgz" todir="${username}:${password}@ejbca.sourceforge.net:"/>
<sshexec host="ejbca.sourceforge.net"
username="${username}" password="${password}"
command="mkdir ${publish.dir} ; tar -xzpf htdocs.tgz -C ${publish.dir};"/>
<!-- I'm setting the permissions this way as there seems to be a problem with dirmode -->
<echo message="Setting directory permissions"/>
<sshexec host="ejbca.sourceforge.net"
username="${username}" password="${password}"
command="find ${publish.dir} -type d -exec chmod 775 {} \;"/>
<echo message="Setting file permissions"/>
<sshexec host="ejbca.sourceforge.net"
username="${username}" password="${password}"
command="find ${publish.dir} -type f -exec chmod 664 {} \;"/>
</target>
<target name="gen-depgraph" depends="ejbca.ear" description="Generate EJB dependecy graph using external 'dot' application">
<condition property="isjboss" value="isset"><equals arg1="jboss" arg2="${appserver.type}"/></condition>
<fail unless="isjboss" message="This target only works for JBoss AS."/>
<property name="gen-depgraph.dir" value="${ejbca.home}/tmp/gen-dep"/>
<mkdir dir="${gen-depgraph.dir}"/>
<path id="gen-dep.classpath">
<!-- for javax.ejb.Stateless, Local and EJB-->
<fileset dir="${appserver.home}" includes="client/jboss-javaee.jar client/ejb3-persistence.jar"/>
<fileset dir="${appserver.home}" includes="modules/javax/ejb/api/main/jboss-ejb-api_* modules/javax/persistence/api/main/hibernate-jpa-*"/>
</path>
<javac srcdir="${ejbca.home}/src/java" destdir="${gen-depgraph.dir}" classpathref="gen-dep.classpath" encoding="UTF-8" debug="on" includeantruntime="false"
includes="org/ejbca/util/EjbDependencyGraphTool.java"/>
<path id="gen-dep.classpath.run">
<path refid="gen-dep.classpath"/>
<path location="${gen-depgraph.dir}"/>
</path>
<java classname="org.ejbca.util.EjbDependencyGraphTool" classpathref="gen-dep.classpath.run">
<arg line="${ejbca.home}/dist/ejbca.ear ${gen-depgraph.dir}/ejbca_${app.version.number}.dot"/>
</java>
<echo message="file://${gen-depgraph.dir}/ejbca_${app.version.number}.dot was written."/>
<echo message="file://${gen-depgraph.dir}/ejbca_${app.version.number}.dot was written."/>
<exec executable="dot">
<arg line="-Tpng -o ${gen-depgraph.dir}/ejbca_${app.version.number}.png ${gen-depgraph.dir}/ejbca_${app.version.number}.dot"/>
</exec>
<echo message="file://${gen-depgraph.dir}/ejbca_${app.version.number}.png was created."/>
</target>
</project>