-
Notifications
You must be signed in to change notification settings - Fork 126
/
build.xml
139 lines (112 loc) · 7.61 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="release" name="docx4j-ImportXHTML">
<property environment="env"/>
<property name="importxhtml-version" value="11.4.10"/>
<property name="release.dir" value="docx4j-ImportXHTML-${importxhtml-version}"/>
<!--NOTE this is not generally used, since ImportXHTML is packaged in docx4j zip by its build.xml
TODO update for 11.4.x release -->
<property name="m2Repository" value="/home/jharrop/.m2/repository"/>
<!--.NET properties -->
<property name="ikvm.dir" value="/Java/ikvm/ikvm-8.1.5717.0"/>
<property name="ikvmc" value="${ikvm.dir}/bin/ikvmc.exe"/>
<property name="docx4j.dll" value="dll/docx4j.dll"/>
<path id="deps_other.libraryclasspath">
<pathelement location="${m2Repository}/com/openhtmltopdf/openhtmltopdf-core/1.0.10/openhtmltopdf-core-1.0.10.jar"/>
<pathelement location="${m2Repository}/com/openhtmltopdf/openhtmltopdf-pdfbox/1.0.10/openhtmltopdf-pdfbox-1.0.10.jar"/>
<pathelement location="${m2Repository}/de/rototor/pdfbox/graphics2d/0.32/graphics2d-0.32.jar"/>
<pathelement location="${m2Repository}/org/apache/pdfbox/pdfbox/2.0.30/pdfbox-2.0.30.jar"/>
<pathelement location="${m2Repository}/org/apache/pdfbox/fontbox/2.0.30/fontbox-2.0.30.jar"/>
<pathelement location="${m2Repository}/org/apache/pdfbox/xmpbox/2.0.24/xmpbox-2.0.24.jar"/>
</path>
<path id="docx4j.libraryclasspath">
<pathelement location="${m2Repository}/org/docx4j/docx4j-core/11.4.11/docx4j-core-11.4.11.jar"/>
<pathelement location="${m2Repository}/org/docx4j/docx4j-openxml-objects/11.4.11/docx4j-openxml-objects-11.4.11.jar"/>
<pathelement location="${m2Repository}/org/docx4j/docx4j-openxml-objects-pml/11.4.11/docx4j-openxml-objects-pml-11.4.11.jar"/>
<pathelement location="${m2Repository}/org/docx4j/docx4j-openxml-objects-sml/11.4.11/docx4j-openxml-objects-sml-11.4.11.jar"/>
<pathelement location="${m2Repository}/org/plutext/jaxb-svg11/11.4.0/jaxb-svg11-11.4.0.jar"/>
<pathelement location="${m2Repository}/net/engio/mbassador/1.3.2/mbassador-1.3.2.jar"/>
<pathelement location="${m2Repository}/org/slf4j/jcl-over-slf4j/2.0.12/jcl-over-slf4j-2.0.12.jar"/>
<pathelement location="${m2Repository}/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.jar"/>
<pathelement location="${m2Repository}/org/apache/commons/commons-compress/1.26.0/commons-compress-1.26.0.jar"/>
<pathelement location="${m2Repository}/commons-codec/commons-codec/1.16.0/commons-codec-1.16.0.jar"/>
<pathelement location="${m2Repository}/commons-io/commons-io/2.15.1/commons-io-2.15.1.jar"/>
<pathelement location="${m2Repository}/org/apache/xmlgraphics/xmlgraphics-commons/2.9/xmlgraphics-commons-2.9.jar"/>
<pathelement location="${m2Repository}/org/docx4j/org/apache/xalan-interpretive/11.0.0/xalan-interpretive-11.0.0.jar"/>
<pathelement location="${m2Repository}/org/docx4j/org/apache/xalan-serializer/11.0.0/xalan-serializer-11.0.0.jar"/>
<pathelement location="${m2Repository}/net/arnx/wmf2svg/0.9.11/wmf2svg-0.9.11.jar"/>
<pathelement location="${m2Repository}/org/antlr/antlr-runtime/3.5.3/antlr-runtime-3.5.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"/>
<pathelement location="${m2Repository}/org/checkerframework/checker-qual/3.42.0/checker-qual-3.42.0.jar"/>
<pathelement location="${m2Repository}/com/google/errorprone/error_prone_annotations/2.3.3/error_prone_annotations-2.3.3.jar"/>
<pathelement location="${m2Repository}/com/thoughtworks/qdox/qdox/1.12/qdox-1.12.jar"/>
<pathelement location="${m2Repository}/org/apache/james/apache-mime4j-core/0.8.10/apache-mime4j-core-0.8.10.jar"/>
<pathelement location="${m2Repository}/jakarta/xml/bind/jakarta.xml.bind-api/3.0.1/jakarta.xml.bind-api-3.0.1.jar"/>
<pathelement location="${m2Repository}/com/sun/activation/jakarta.activation/2.0.1/jakarta.activation-2.0.1.jar"/>
</path>
<path id="deps_conf.libraryclasspath">
<pathelement location="${m2Repository}/org/slf4j/slf4j-api/2.0.12/slf4j-api-2.0.12.jar"/>
<pathelement location="${m2Repository}/xerces/xercesImpl/2.12.2/xercesImpl-2.12.2.jar"/>
<pathelement location="${m2Repository}/ch/qos/logback/logback-classic/1.5.3/logback-classic-1.5.3.jar"/>
<pathelement location="${m2Repository}/ch/qos/logback/logback-core/1.5.3/logback-core-1.5.3.jar"/>
<!--<pathelement location="${m2Repository}/org/docx4j/docx4j-samples-resources/11.4.11/docx4j-samples-resources-11.4.11.jar"/>-->
</path>
<target name="release" >
<delete dir="${release.dir}"/>
<mkdir dir="${release.dir}"/>
<!-- docx4j-ImportXHTML itself, as built by maven -->
<copy file="${m2Repository}/org/docx4j/docx4j-ImportXHTML/${importxhtml-version}/docx4j-ImportXHTML-${importxhtml-version}.jar" todir="${release.dir}"/>
<copy file="CHANGELOG.md" todir="${release.dir}"/>
<!-- dependencies, except docx4j and its deps -->
<mkdir dir="${release.dir}/dependencies"/>
<copy includeemptydirs="false" todir="${release.dir}/dependencies" flatten="true">
<!-- requires Ant 1.7.0 -->
<path>
<path refid="deps_other.libraryclasspath"/>
<path refid="deps_conf.libraryclasspath"/>
</path>
</copy>
<!-- documentation
<mkdir dir="${release.dir}/documentation"/>
<copy file="docs/Docx4j_GettingStarted.pdf" todir="${release.dir}/documentation" />
-->
<!-- legals -->
<mkdir dir="${release.dir}/legals"/>
<copy includeemptydirs="false" todir="${release.dir}/legals">
<fileset dir="legals" />
</copy>
<!-- zip it up -->
<zip destfile="${release.dir}.zip" basedir="${release.dir}"/>
<delete dir="${release.dir}"/>
</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" 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/6.1.0/docx4j-ImportXHTML-6.1.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"/>
</path>
<pathconvert refid="forIKVM" property="jars" pathsep=" "/>
<exec executable="${ikvmc}">
<arg value="-out:${dist}/docx4j-ImportXHTML.dll" />
<arg value="-keyfile:Plutext.snk" /> <!-- consistent with others -->
<arg value="-version:6.1.0.0" />
<!-- <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>