-
Notifications
You must be signed in to change notification settings - Fork 32
/
build-ear.xml
144 lines (106 loc) · 5.35 KB
/
build-ear.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Copyright (c) Open Source Strategies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the Honest Public License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Honest Public License for more details.
*
* You should have received a copy of the Honest Public License
* along with this program; if not, write to Funambol,
* 643 Bair Island Road, Suite 305 - Redwood City, CA 94063, USA
-->
<project name="opentaps deploymemt" default="package-jboss" basedir=".">
<!-- ================================================================== -->
<!-- set the global properties -->
<!-- ================================================================== -->
<property file="build-ear.properties"/>
<property name="app.name" value="opentaps"/>
<property name="java.lib.dir" value="${JAVA_HOME}/lib"/>
<property name="jboss.deploy.dir" value="${JBOSS_HOME}/server/default/deploy"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="ear.dir" value="${build.dir}/${app.name}"/>
<property name="ear.lib.dir" value="${ear.dir}/lib"/>
<!-- ================================================================== -->
<!-- clean the build directory -->
<!-- ================================================================== -->
<target name="clean">
<delete dir="${build.dir}"/>
<echo message="[clean] ========== Done Cleaning =========="/>
</target>
<!-- ================================================================== -->
<!-- create the build directory -->
<!-- ================================================================== -->
<target name="init">
<mkdir dir="${build.dir}"/>
<mkdir dir="${ear.dir}"/>
<mkdir dir="${ear.lib.dir}"/>
</target>
<!-- ================================================================== -->
<!-- copy the JDK jars into the ear lib directory -->
<!-- ================================================================== -->
<target name="copy-jdk-libs">
<copy todir="${ear.lib.dir}" flatten="true" overwrite="true">
<fileset dir="${java.lib.dir}" includes="tools.jar"/>
</copy>
</target>
<!-- ================================================================== -->
<!-- create the ear -->
<!-- ================================================================== -->
<target name="make-ear">
<ear basedir="${ear.dir}" destfile="${build.dir}/${app.name}.ear" appxml="${ear.dir}/META-INF/application.xml"/>
</target>
<!-- ================================================================== -->
<!-- package opentaps applications -->
<!-- ================================================================== -->
<target name="package-jboss" depends="init">
<echo message="[package-jboss] =========== start ==========="/>
<antcall target="copy-jdk-libs"/>
<!--
Note: opentaps comes first, it will rebuild the hibernate conf and then make a normal build to make sure all jars are built/weaved
(and because of that we do not need to call a build before this)
-->
<subant inheritall="true">
<filelist dir="." files="opentaps/build-ear.xml"/>
</subant>
<subant inheritall="true">
<filelist dir="." files="framework/build-ear.xml"/>
</subant>
<subant inheritall="true">
<filelist dir="." files="applications/build-ear.xml"/>
</subant>
<subant inheritall="true">
<filelist dir="." files="themes/build-ear.xml"/>
</subant>
<subant inheritall="true">
<filelist dir="." files="specialpurpose/build-ear.xml"/>
</subant>
<!-- <antcall target="make-ear"/> -->
<echo message="[package-jboss] ============ end ============="/>
</target>
<!-- ================================================================== -->
<!-- install opentaps applications -->
<!-- ================================================================== -->
<target name="install-jboss" depends="package-jboss">
<echo message="[install-jboss] =========== start ==========="/>
<mkdir dir="${jboss.deploy.dir}/${app.name}"/>
<copy todir="${jboss.deploy.dir}/${app.name}">
<fileset dir="${ear.dir}"/>
</copy>
<echo message="[install-jboss] ============ end ============="/>
</target>
<!-- ================================================================== -->
<!-- configure jboss to run opentaps -->
<!-- ================================================================== -->
<target name="setup-jboss" depends="">
<echo message="[setup-jboss] =========== start ==========="/>
<subant inheritall="true" target="setup-framework-jboss">
<filelist dir="." files="framework/build-ear.xml"/>
</subant>
<echo message="[setup-jboss] ============ end ============="/>
</target>
</project>