forked from plutext/docx4j-ImportXHTML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
224 lines (201 loc) · 11.9 KB
/
build.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
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="docx4j-ImportXHTML">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.5"/>
<property name="source" value="1.5"/>
<property name="dist" value="./dist"/>
<property name="version" value="3.2.1"/>
<property name="src.main.java.dir" value="src/main/java"/>
<!--
org.docx4j:docx4j-ImportXHTML:jar:3.0.0-SNAPSHOT
+- org.docx4j:xhtmlrenderer:jar:1.0.0:compile
| \- com.lowagie:itext:jar:2.1.7:compile
+- org.slf4j:slf4j-api:jar:1.7.5:compile
+- org.slf4j:slf4j-log4j12:jar:1.7.5:compile
| \- log4j:log4j:jar:1.2.17:compile
+- org.docx4j:docx4j:jar:3.2.0:compile
| +- javax.mail:mail:jar:1.4:compile
| | \- javax.activation:activation:jar:1.1:compile
| +- org.plutext:jaxb-svg11:jar:1.0.2:compile
| +- org.plutext:jaxb-xslfo:jar:1.0.1:compile
| +- org.plutext:jaxb-xmldsig-core:jar:1.0.0:compile
| +- commons-lang:commons-lang:jar:2.4:compile
| +- commons-logging:commons-logging:jar:1.1.1:compile
| +- commons-codec:commons-codec:jar:1.3:compile
| +- commons-io:commons-io:jar:1.3.1:compile
| +- org.apache.xmlgraphics:xmlgraphics-commons:jar:1.5:compile
| +- org.apache.xmlgraphics:fop:jar:1.1:compile
| | +- org.apache.xmlgraphics:batik-svg-dom:jar:1.7:compile
| | | +- org.apache.xmlgraphics:batik-anim:jar:1.7:compile
| | | +- org.apache.xmlgraphics:batik-css:jar:1.7:compile
| | | +- org.apache.xmlgraphics:batik-dom:jar:1.7:compile
| | | +- org.apache.xmlgraphics:batik-parser:jar:1.7:compile
| | | \- org.apache.xmlgraphics:batik-util:jar:1.7:compile
| | +- org.apache.xmlgraphics:batik-bridge:jar:1.7:compile
| | | +- org.apache.xmlgraphics:batik-script:jar:1.7:compile
| | | \- org.apache.xmlgraphics:batik-xml:jar:1.7:compile
| | +- org.apache.xmlgraphics:batik-awt-util:jar:1.7:compile
| | +- org.apache.xmlgraphics:batik-gvt:jar:1.7:compile
| | +- org.apache.xmlgraphics:batik-transcoder:jar:1.7:compile
| | | \- org.apache.xmlgraphics:batik-svggen:jar:1.7:compile
| | +- org.apache.xmlgraphics:batik-extension:jar:1.7:compile
| | \- org.apache.xmlgraphics:batik-ext:jar:1.7:compile
| +- org.apache.avalon.framework:avalon-framework-api:jar:4.3.1:compile
| +- org.apache.avalon.framework:avalon-framework-impl:jar:4.3.1:compile
| +- xalan:xalan:jar:2.7.1:compile
| | \- xalan:serializer:jar:2.7.1:compile
| +- net.arnx:wmf2svg:jar:0.9.0:compile
| +- org.apache.poi:poi-scratchpad:jar:3.8:compile
| | \- org.apache.poi:poi:jar:3.8:compile
| +- org.antlr:antlr-runtime:jar:3.3:compile
| \- org.antlr:stringtemplate:jar:3.2.1:compile
| \- antlr:antlr:jar:2.7.7:compile
\- junit:junit:jar:4.8.2:compile
-->
<property name="m2Repository" value="../../.m2/repository"/>
<!--.NET properties -->
<property name="ikvm.dir" value="/Java/ikvm/ikvm-7.3.4830.0"/>
<property name="ikvmc" value="${ikvm.dir}/bin/ikvmc.exe"/>
<property name="docx4j.dll" value="dll/docx4j.dll"/>
<path id="Maven Dependencies.libraryclasspath">
<pathelement location="${m2Repository}/org/docx4j/docx4j/3.2.0/docx4j-3.2.0.jar"/>
<pathelement location="${m2Repository}/org/docx4j/xhtmlrenderer/3.0.0/xhtmlrenderer-3.0.0.jar"/>
<pathelement location="${m2Repository}/com/lowagie/itext/2.1.7/itext-2.1.7.jar"/>
<pathelement location="${m2Repository}/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar"/>
<pathelement location="${m2Repository}/org/slf4j/slf4j-log4j12/1.7.5/slf4j-log4j12-1.7.5.jar"/>
<pathelement location="${m2Repository}/log4j/log4j/1.2.17/log4j-1.2.17.jar"/>
<!--<pathelement location="${m2Repository}/javax/mail/mail/1.4/mail-1.4.jar"/>
<pathelement location="${m2Repository}/javax/activation/activation/1.1/activation-1.1.jar"/>
-->
<pathelement location="${m2Repository}/org/plutext/jaxb-svg11/1.0.2/jaxb-svg11-1.0.2.jar"/>
<pathelement location="${m2Repository}/org/plutext/jaxb-xslfo/1.0.1/jaxb-xslfo-1.0.1.jar"/>
<pathelement location="${m2Repository}/org/plutext/jaxb-xmldsig-core/1.0.0/jaxb-xmldsig-core-1.0.0.jar"/>
<pathelement location="${m2Repository}/commons-lang/commons-lang/2.4/commons-lang-2.4.jar"/>
<pathelement location="${m2Repository}/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"/>
<pathelement location="${m2Repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar"/>
<pathelement location="${m2Repository}/commons-io/commons-io/1.3.1/commons-io-1.3.1.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/xmlgraphics-commons/1.5/xmlgraphics-commons-1.5.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/fop/1.1/fop-1.1.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-svg-dom/1.7/batik-svg-dom-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-anim/1.7/batik-anim-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-css/1.7/batik-css-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-dom/1.7/batik-dom-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-parser/1.7/batik-parser-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-util/1.7/batik-util-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-bridge/1.7/batik-bridge-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-script/1.7/batik-script-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-js/1.7/batik-js-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-xml/1.7/batik-xml-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-awt-util/1.7/batik-awt-util-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-gvt/1.7/batik-gvt-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-transcoder/1.7/batik-transcoder-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-svggen/1.7/batik-svggen-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-extension/1.7/batik-extension-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/batik-ext/1.7/batik-ext-1.7.jar"/>
<pathelement location="${m2Repository}/org/apache/avalon/framework/avalon-framework-api/4.3.1/avalon-framework-api-4.3.1.jar"/>
<pathelement location="${m2Repository}/org/apache/avalon/framework/avalon-framework-impl/4.3.1/avalon-framework-impl-4.3.1.jar"/>
<pathelement location="${m2Repository}/xalan/xalan/2.7.1/xalan-2.7.1.jar"/>
<pathelement location="${m2Repository}/xalan/serializer/2.7.1/serializer-2.7.1.jar"/>
<pathelement location="${m2Repository}/net/arnx/wmf2svg/0.9.0/wmf2svg-0.9.0.jar"/>
<pathelement location="${m2Repository}/org/apache/poi/poi-scratchpad/3.8/poi-scratchpad-3.8.jar"/>
<pathelement location="${m2Repository}/org/apache/poi/poi/3.8/poi-3.8.jar"/>
<pathelement location="${m2Repository}/org/antlr/antlr-runtime/3.3/antlr-runtime-3.3.jar"/>
<pathelement location="${m2Repository}/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar"/>
<pathelement location="${m2Repository}/antlr/antlr/2.7.7/antlr-2.7.7.jar"/>
</path>
<path id="docx4j-ImportXHTML.classpath">
<pathelement location="bin"/>
<path refid="Maven Dependencies.libraryclasspath"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src/main/java">
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src/main/resources">
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src/test/java">
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src/samples/java">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
<delete dir="${dist}"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}" encoding="utf-8">
<!-- that @encoding setting is critical to retain bullet chars in ListHelper, at least on Win 7 -->
<src path="src/main/java"/>
<classpath refid="docx4j-ImportXHTML.classpath"/>
</javac>
<!--
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
<src path="src/test/java"/>
<classpath refid="docx4j-ImportXHTML.classpath"/>
</javac>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
<src path="src/samples/java"/>
<classpath refid="docx4j-ImportXHTML.classpath"/>
</javac>
-->
</target>
<target name="dist" depends="clean, build-project" >
<mkdir dir="${dist}"/>
<jar destfile="${dist}/docx4j-ImportXHTML-${version}.jar" basedir="./bin"/>
<!-- copy all the jar files! -->
<copy todir="${dist}" flatten="true">
<!-- requires Ant 1.7.0 -->
<path>
<path refid="Maven Dependencies.libraryclasspath"/>
</path>
</copy>
<delete file="${dist}/JAXBNamespacePrefixMapper-2.2.4.jar" />
</target>
<target name="checkForIKVM">
<condition property="IKVMAvailable">
<and>
<os family="windows"/>
<available file="${ikvmc}" property="ignored" />
<available file="${docx4j.dll}" property="ignored" />
</and>
</condition>
</target>
<!-- first, create docx4j.dll -->
<target name="dist.NET" depends="checkForIKVM,dist" if="IKVMAvailable" description="Build docx4j ImportXHTML .NET DLL files">
<echo>Building DLL</echo>
<path id="forIKVM">
<!-- <pathelement location="${dist}/docx4j-ImportXHTML-${version}.jar" /> -->
<pathelement location="${m2Repository}/org/docx4j/docx4j-ImportXHTML/3.2.1/docx4j-ImportXHTML-3.2.1.jar" />
<pathelement location="${m2Repository}/org/docx4j/xhtmlrenderer/3.0.0/xhtmlrenderer-3.0.0.jar"/>
<pathelement location="${m2Repository}/com/lowagie/itext/2.1.7/itext-2.1.7.jar"/>
</path>
<pathconvert refid="forIKVM" property="jars" pathsep=" "/>
<exec executable="${ikvmc}">
<arg value="-out:${dist}/docx4j-ImportXHTML.dll" />
<!-- <arg value="-keyfile:Plutext.snk" /> -->
<arg value="-version:3.2.1" />
<!-- <arg value="-resource:docx4j.properties=..." /> -->
<arg value="-reference:${docx4j.dll}" />
<arg value="-reference:dll/slf4j-api.dll" />
<arg value="-target:library" />
<arg line="${jars}" />
</exec>
</target>
</project>