-
Notifications
You must be signed in to change notification settings - Fork 99
/
project-build.xml
194 lines (184 loc) · 7.58 KB
/
project-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
<?xml version="1.0"?>
<!--
Copyright © 2005-2015, Alexey Valikov
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
-->
<project name="jaxb2-annotate-plugin-sample-annotate-ant" default="install">
<property name="artifactId" value="jaxb2-annotate-plugin-sample-annotate-ant"/>
<path id="compile.path">
<fileset dir="${basedir}/lib">
<include name="jakarta.xml.bind-api-*.jar"/>
<include name="hibernate-search-*.jar"/>
</fileset>
</path>
<path id="test-compile.path">
<fileset dir="${basedir}/lib">
<include name="jakarta.activation-*.jar"/>
<include name="angus-activation-*.jar"/>
<include name="jakarta.xml.bind-api-*.jar"/>
<include name="jaxb-runtime-*.jar"/>
<include name="jaxb-core-*.jar"/>
<include name="stax-api-*.jar"/>
<include name="jsr173_api-*.jar"/>
<include name="commons-logging-*.jar"/>
<include name="codemodel-*.jar"/>
<include name="hibernate-search-*.jar"/>
<include name="junit-*.jar"/>
</fileset>
</path>
<path id="test.path">
<fileset dir="${basedir}/lib">
<include name="jakarta.activation-*.jar"/>
<include name="angus-activation-*.jar"/>
<include name="jakarta.xml.bind-api-*.jar"/>
<include name="jaxb-runtime-*.jar"/>
<include name="jaxb-core-*.jar"/>
<include name="stax-api-*.jar"/>
<include name="jsr173_api-*.jar"/>
<include name="commons-logging-*.jar"/>
<include name="codemodel-*.jar"/>
<include name="junit-*.jar"/>
<include name="hibernate-search-*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${basedir}/target/"/>
<delete dir="${basedir}/target/classes"/>
<delete dir="${basedir}/target/test-classes"/>
</target>
<target name="generate-sources">
<taskdef name="xjc" classname="org.jvnet.jaxb.xjc.XJCTask">
<!-- XJC Task classpath -->
<classpath>
<fileset dir="${basedir}/lib">
<include name="commons-text-*.jar"/>
<include name="codemodel-*.jar"/>
<include name="istack-commons-*.jar"/>
<include name="jakarta.activation-*.jar"/>
<include name="angus-activation-*.jar"/>
<include name="jakarta.xml.bind-api-*.jar"/>
<include name="jaxb-runtime-*.jar"/>
<include name="jaxb-core-*.jar"/>
<include name="jsr173_api-*.jar"/>
<include name="junit-*.jar"/>
<include name="stax-api-*.jar"/>
<include name="jaxb-xjc-*.jar"/>
<include name="jaxb-plugins-ant-*.jar"/>
<include name="jcl-over-slf4j-*.jar"/>
<include name="relaxng-datatype-*.jar"/>
<include name="rngom-*.jar"/>
<include name="txw2-*.jar"/>
<include name="xsom-*.jar"/>
</fileset>
</classpath>
</taskdef>
<mkdir dir="${basedir}/target/generated-sources/xjc"/>
<xjc destdir="${basedir}/target/generated-sources/xjc" extension="true" failonerror="false">
<arg line="-Xannotate" />
<binding dir="${basedir}/src/main/resources">
<include name="**/*.xjb"/>
</binding>
<schema dir="${basedir}/src/main/resources">
<include name="**/*.xsd"/>
</schema>
<!-- Plugins -->
<classpath>
<fileset dir="${basedir}/lib">
<!-- JAXB Plugins library -->
<include name="jaxb-plugins-*.jar"/>
<include name="jaxb-annox-*.jar"/>
<include name="jaxb-plugin-annotate-*.jar"/>
<!-- JAXB Plugins library dependencies -->
<include name="hibernate-search-*.jar" />
<include name="javaparser-*.jar"/>
<include name="commons-beanutils-*.jar"/>
<include name="commons-logging-*.jar"/>
<include name="commons-lang3-*.jar"/>
<include name="commons-text-*.jar"/>
</fileset>
</classpath>
</xjc>
</target>
<target name="compile" depends="generate-sources">
<mkdir dir="${basedir}/target/classes"/>
<javac
destdir="${basedir}/target/classes"
srcdir="${basedir}/src/main/java:${basedir}/target/generated-sources/xjc"
classpathref="compile.path"
includeantruntime="false"
source="1.8"
target="1.8">
</javac>
<copy todir="${basedir}/target/classes">
<fileset dir="${basedir}/src/main/resources"/>
<fileset dir="${basedir}/target/generated-sources/xjc">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="test-compile" depends="compile">
<mkdir dir="${basedir}/target/test-classes"/>
<javac
destdir="${basedir}/target/test-classes"
srcdir="${basedir}/src/test/java:${basedir}/target/generated-sources/xjc"
classpathref="test-compile.path"
includeantruntime="false"
source="1.8"
target="1.8">
</javac>
<copy todir="${basedir}/target/test-classes">
<fileset dir="${basedir}/src/test/resources"/>
<fileset dir="${basedir}/target/generated-sources/xjc">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="test" depends="test-compile">
<mkdir dir="${basedir}/target/junit-reports"/>
<junitlauncher printsummary="yes" haltonfailure="yes">
<classpath>
<pathelement location="${basedir}/target/classes"/>
<pathelement location="${basedir}/target/test-classes"/>
<path refid="test.path"/>
</classpath>
<testclasses outputdir="${basedir}/target/junit-reports">
<listener type="legacy-xml" sendSysOut="true" sendSysErr="true"/>
<listener type="legacy-plain" sendSysOut="true" />
<fileset dir="${basedir}/src/test/java">
<include name="**/*Test*.java"/>
<exclude name="**/AllTests.java"/>
</fileset>
<fileset dir="${basedir}/target/generated-sources/xjc">
<include name="**/*Test*.java"/>
<exclude name="**/AllTests.java"/>
</fileset>
</testclasses>
</junitlauncher>
</target>
<target name="package" depends="test">
<mkdir dir="${basedir}/target"/>
<jar destfile="${basedir}/target/${artifactId}.jar"
basedir="${basedir}/target/classes"/>
</target>
<target name="install" depends="package"/>
</project>