This repository was archived by the owner on Oct 21, 2024. It is now read-only.
forked from apache/rampart
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
274 lines (239 loc) · 8.75 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
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
268
269
270
271
272
273
274
<?xml version="1.0"?>
<project name="axis2" default="quick"
>
<!--
This is an ant build file to
-invoke maven to build the distribution
-copy the created files into the local Maven2 cache
-maybe deploy to a local cache, though that is NPE'ing right now.
-->
<!--
not putting this at the top level as it breaks idea's ant-awareness
xmlns:m2="antlib:org.apache.maven.artifact.ant"
-->
<!--any personal overrides; not read by maven-->
<property file="build.properties"/>
<!--any personal overrides; also read by maven-->
<property file="project.properties"/>
<!--read in project properties, including library versions-->
<property file="etc/project.properties"/>
<target name="default">
</target>
<target name="init" >
<!--macro for maven -->
<property name="maven.commoncmd" value="--emacs" />
<condition property="maven.line"
value="--offline ${maven.commoncmd}">
<istrue value="${offline}"/>
</condition>
<condition property="maven.executable" value="maven.bat">
<os family="windows" />
</condition>
<property name="maven.executable" value="maven" />
<property name="maven.line" value="${maven.commoncmd}" />
<presetdef name="maven">
<exec failonerror="true" executable="${maven.executable}">
<arg line="${maven.line}" />
</exec>
</presetdef>
<!-- location of m2 repository (with new layout) -->
<property name="m2.repository" location="${user.home}/.m2/repository"/>
<!-- original m1 repository -->
<property name="m1.repository" location="${user.home}/.maven/repository"/>
<property name="project.xml" location="etc/project.xml" />
<!-- pull out the value of the project version from the maven1 file-->
<xmlproperty file="${project.xml}"
keeproot="true" semanticAttributes="true" />
<property name="target.dir" location="target"/>
<property name="project.version" value="${axis2_version}" />
<property name="artifact.title" value="${project.id}-${project.version}" />
<property name="target.jar" location="${target.dir}/${artifact.title}.jar"/>
<property name="target.pom" location="${target.dir}/${artifact.title}.pom"/>
<!-- use a proper m2 hierarchy -->
<property name="maven2.groupId" value="org.apache.ws.${project.groupId}"/>
<available file="${basedir}/target/lib/wsdl4j-${wsdl4j.version}.jar" property="jars.present"/>
</target>
<target name="clean" depends="init"
description="clean everything">
<maven>
<arg value="clean"/>
</maven>
</target>
<target name="dist" depends="init"
description="make a distribution">
<maven>
</maven>
</target>
<target name="dist-lite" depends="init"
description="make a distribution, skip testing">
<maven>
<arg value="-Dmaven.test.skip=true" />
</maven>
</target>
<target name="create-lib" unless="jars.present" depends="init"
description="creates the libraries">
<maven>
<arg value="create-lib" />
</maven>
</target>
<!-- inline creation of a very minimal pom
Only libraries that absolutely must be present should be listed.
This POM omits a choice of StAX parser, because there are so many.
-->
<target name="m2-pom" depends="init" xmlns:m2="antlib:org.apache.maven.artifact.ant">
<echo message="Creating Pom ${target.pom}" level="verbose"/>
<!--ant1.7's echoxml makes this easier -->
<echo file="${target.pom}"><![CDATA[<project>
<modelVersion>4.0.0</modelVersion>
<groupId>${maven2.groupId}</groupId>
<artifactId>${project.id}</artifactId>
<packaging>jar</packaging>
<version>${project.version}</version>
<dependencies>
<dependency>
<groupId>annogen</groupId>
<artifactId>annogen</artifactId>
<version>${annogen.version}</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-wsdl4j</artifactId>
<version>${axis.wsdl4j.version}</version>
</dependency>
<dependency>
<groupId>backport-util-concurrent</groupId>
<artifactId>backport-util-concurrent</artifactId>
<version>${backport_util_concurrent.version}</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons.logging.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>ws-commons</groupId>
<artifactId>neethi</artifactId>
<version>${policy.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons</groupId>
<artifactId>XmlSchema</artifactId>
<version>${XmlSchema.m2.version}</version>
</dependency>
<dependency>
<groupId>ws-commons</groupId>
<artifactId>axiom</artifactId>
<version>${axiom.version}</version>
</dependency>
</dependencies>
</project>
]]></echo>
<m2:pom id="m2.pom" file="${target.pom}"/>
</target>
<target name="m2-wagons" depends="init"
xmlns:m2="antlib:org.apache.maven.artifact.ant">
<property name="wagon.version" value="1.0-alpha-5"/>
<m2:install-provider artifactId="wagon-ssh"
version="${wagon.version}"/>
<m2:install-provider artifactId="wagon-ssh-external"
version="${wagon.version}"/>
<m2:install-provider artifactId="wagon-file"
version="${wagon.version}"/>
<m2:install-provider artifactId="wagon-ftp"
version="${wagon.version}"/>
</target>
<target name="ready-to-deploy" depends="m2-pom" />
<target name="m2-install" depends="ready-to-deploy"
description="install the libray into the local m2 repository"
xmlns:m2="antlib:org.apache.maven.artifact.ant">
<m2:install file="${target.jar}">
<pom refid="m2.pom"/>
</m2:install>
</target>
<target name="m2-filesys-deploy" depends="ready-to-deploy"
xmlns:m2="antlib:org.apache.maven.artifact.ant">
<fail unless="filesys.url">
filesys.url needs to be set to a file: url of the local destination
for in-filesystem deployment
</fail>
<m2:deploy file="${target.jar}">
<remoteRepository url="${filesys.url}"/>
<pom refid="m2.pom"/>
</m2:deploy>
</target>
<target name="installed"
description="locally installed"
depends="dist-lite,m2-install" />
<target name="quick" depends="create-lib"
description="make a distribution">
<mkdir dir="${basedir}/target/classes/"/>
<path id="classpath">
<fileset dir="${basedir}/target/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<javac srcdir="${basedir}/modules"
destdir="${basedir}/target/classes/"
debug="true"
source="1.5"
classpathref="classpath">
<include name="adb/src/**/*.java"/>
<include name="adb-codegen/src/**/*.java"/>
<include name="addressing/src/**/*.java"/>
<include name="codegen/src/**/*.java"/>
<include name="common/src/**/*.java"/>
<include name="core/src/**/*.java"/>
<include name="integration/src/**/*.java"/>
<include name="java2wsdl/src/**/*.java"/>
<include name="jaxbri/src/**/*.java"/>
<include name="jaxws/src/**/*.java"/>
<include name="jibx/src/**/*.java"/>
<include name="rahas/src/**/*.java"/>
<include name="saaj/src/**/*.java"/>
<include name="samples/src/**/*.java"/>
<include name="savan/src/**/*.java"/>
<include name="security/src/**/*.java"/>
<include name="soapmonitor/src/**/*.java"/>
<include name="spring/src/**/*.java"/>
<include name="xmlbeans/src/**/*.java"/>
</javac>
<copy todir="${basedir}/target/classes/">
<fileset dir="${basedir}/modules/common/src">
<include name="**/*.properties"/>
<include name="**/*.xsl"/>
</fileset>
<fileset dir="${basedir}/modules/core/conf">
<include name="**/*.properties"/>
</fileset>
<fileset dir="${basedir}/modules/core/src">
<include name="**/*axis2*.xml"/>
</fileset>
<fileset dir="${basedir}/modules/codegen/src">
<include name="**/*.properties"/>
<include name="**/*.xsl"/>
<include name="**/*.xsd"/>
</fileset>
</copy>
<mkdir dir="${basedir}/target/repo/modules"/>
<copy todir="${basedir}/target/repo/modules" flatten="true">
<fileset dir="${basedir}/modules/">
<include name="**/target/*.mar"/>
</fileset>
</copy>
<copy todir="${basedir}/target/repo">
<fileset dir="${basedir}/modules/core/src/org/apache/axis2/deployment">
<include name="axis2.xml"/>
</fileset>
</copy>
</target>
<target name="diag" depends="init">
<!-- probably ant 1.7+ only -->
<diagnostics/>
<echoproperties/>
</target>
</project>