-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
148 lines (121 loc) · 6.65 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== -->
<!-- -->
<!-- JBoss, the OpenSource J2EE webOS -->
<!-- -->
<!-- Distributable under LGPL license. -->
<!-- See terms of license at http://www.gnu.org. -->
<!-- -->
<!-- ====================================================================== -->
<project basedir="." name="JBossWS-Native">
<!-- ================================================================== -->
<!-- Setup -->
<!-- ================================================================== -->
<property name="stack.dir" value="${basedir}"/>
<property name="stack.distro.dir" value="${stack.dir}/src/main/distro"/>
<property name="stack.output.dir" value="${stack.dir}/target"/>
<property name="stack.resources.dir" value="${stack.dir}/modules/resources/src/main/resources"/>
<property name="deploy.artifacts.dir" value="${stack.output.dir}/deploy-artifacts"/>
<import file="${stack.distro.dir}/build-setup.xml"/>
<import file="${stack.distro.dir}/build-deploy.xml"/>
<import file="${stack.resources.dir}/resources/jbossws-deploy-macros.xml"/>
<property name="jbossws.default.deploy.conf" value="${stack.resources.dir}/resources/default-deploy.conf"/>
<property name="target.properties.file" value="${basedir}/target.properties"/>
<!-- ================================================================== -->
<!-- Initialization -->
<!-- ================================================================== -->
<target name="os-init">
<condition property="ext" value=".bat">
<not>
<os family="unix"/>
</not>
</condition>
<property name="ext" value=""/>
<property name="mvn" value="mvn${ext}"/>
</target>
<target name="mvn-settings" depends="os-init">
<!-- Loads the properties from the effective maven settings -->
<mkdir dir="${stack.output.dir}"/>
<exec dir="${basedir}" executable="${mvn}" failonerror="true">
<arg value="-Doutput=${stack.output.dir}/effective-settings.xml"/>
<arg value="help:effective-settings"/>
</exec>
<xmlproperty file="${stack.output.dir}/effective-settings.xml" keeproot="false"/>
<condition property="jboss500.home" value="${profiles.profile.properties.jboss500.home}">
<isset property="profiles.profile.properties.jboss500.home"/>
</condition>
<condition property="jboss501.home" value="${profiles.profile.properties.jboss501.home}">
<isset property="profiles.profile.properties.jboss501.home"/>
</condition>
<condition property="jboss510.home" value="${profiles.profile.properties.jboss510.home}">
<isset property="profiles.profile.properties.jboss510.home"/>
</condition>
<condition property="jboss600.home" value="${profiles.profile.properties.jboss600.home}">
<isset property="profiles.profile.properties.jboss600.home"/>
</condition>
<!-- Loads the properties from the user profile -->
<xmlproperty file="${basedir}/profiles.xml" keeproot="false"/>
<property name="jboss500.home" value="${profiles.profile.properties.jboss500.home}"/>
<property name="jboss501.home" value="${profiles.profile.properties.jboss501.home}"/>
<property name="jboss510.home" value="${profiles.profile.properties.jboss510.home}"/>
<property name="jboss600.home" value="${profiles.profile.properties.jboss600.home}"/>
<echo/>
<echo message="jboss500.home=${jboss500.home}"/>
<echo message="jboss501.home=${jboss501.home}"/>
<echo message="jboss510.home=${jboss510.home}"/>
<echo message="jboss600.home=${jboss600.home}"/>
</target>
<target name="init" depends="mvn-settings,prepare,os-init">
<xmlproperty file="${stack.dir}/pom.xml"/>
<property name="version.id" value="${project.version}"/>
<echo message="java.version=${java.version}"/>
<echo message="version.id=${version.id}"/>
<echo message="integration.target=${jbossws.integration.target}"/>
<fail message="jbossws.integration.target not set" unless="jbossws.integration.target"/>
<property name="deploy.structure" value="${stack.output.dir}/deploy-${jbossws.integration.target}"/>
</target>
<!-- ================================================================== -->
<!-- Distribution -->
<!-- ================================================================== -->
<target name="prepare-deploy" depends="prepare,os-init">
<!-- Use a system property to overwrite the empty default value -->
<property name="maven.opts" value=""/>
<echo/>
<echo message="${mvn} ${maven.opts} package assembly:directory"/>
<echo/>
<delete dir="${deploy.artifacts.dir}"/>
<exec dir="${basedir}" executable="${mvn}" failonerror="true">
<arg line="${maven.opts} package assembly:directory"/>
</exec>
</target>
<target name="build-bin-dist" depends="prepare-deploy,os-init" description="Build the binary distribution">
<echo/>
<echo message="${mvn} ${maven.opts} -Pbindist package assembly:directory"/>
<echo/>
<delete dir="${stack.output.dir}/jbossws-native-bin-dist"/>
<exec dir="${basedir}" executable="${mvn}" failonerror="true">
<arg line="${maven.opts} -Pbindist package assembly:directory"/>
</exec>
<zip destfile="${stack.output.dir}/jbossws-native-bin-dist.zip">
<zipfileset
dir="${stack.output.dir}/jbossws-native-bin-dist"
includes="build/ deploy/ docs/ tests/ build.xml ant.properties.example"
prefix="jbossws-native-bin-dist"/>
</zip>
</target>
<target name="build-src-dist" depends="prepare-deploy,os-init" description="Build the source distribution">
<echo/>
<echo message="${mvn} ${maven.opts} -Psrcdist package assembly:directory"/>
<echo/>
<delete dir="${stack.output.dir}/jbossws-native-src-dist"/>
<exec dir="${basedir}" executable="${mvn}" failonerror="true">
<arg line="${maven.opts} -Psrcdist package assembly:directory"/>
</exec>
<zip destfile="${stack.output.dir}/jbossws-native-src-dist.zip">
<zipfileset
dir="${stack.output.dir}/jbossws-native-src-dist"
includes="modules/ src/ eclipse/ build.xml pom.xml profiles.xml.example .classpath .project "
prefix="jbossws-native-src-dist"/>
</zip>
</target>
</project>