forked from adempiere/adempiere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
130 lines (107 loc) · 4.54 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- ============================================= -->
<!-- Adempiere CM Server -->
<!-- ============================================= -->
<!-- $Header$-->
<project name="webCM" default="main" basedir=".">
<!--<property environment="env"/>-->
<import file="../utils_dev/properties.xml"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="src.main.dir" value="${src.dir}/main"/>
<property name="src.servlet.dir" value="${src.main.dir}/servlet"/>
<property name="src.web.dir" value="${src.dir}/web"/>
<property name="src.etc.dir" value="${src.dir}/etc"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="build.war.dir" value="${build.dir}/war"/>
<property name="deploy.dir" value="${basedir}/deploy"/>
<target name="webCMinit">
<echo message="=========== Build webCM"/>
<tstamp/>
</target>
<path id="base.path">
<pathelement location="../lib/Adempiere.jar" />
<pathelement location="../lib/CSTools.jar" />
<pathelement location="../tools/lib/javaee.jar" />
<pathelement location="${build.classes.dir}" />
</path>
<!-- =========================================== -->
<!-- Compiles the source code -->
<!-- =========================================== -->
<target name="webCMcompile" depends="webCMinit">
<!-- Compile Web -->
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.war.dir}"/>
<path id="web.path">
<path refid="base.path"/>
</path>
<javac
target="1.7" encoding="UTF-8"
destdir="${build.war.dir}"
debug="on"
deprecation="off"
optimize="on"
classpathref="web.path">
<src path="${src.servlet.dir}"/>
</javac>
<copy todir="${build.war.dir}">
<fileset dir="${src.servlet.dir}">
<include name="**/images/*"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
<include name="**/*.wav"/>
<include name="**/*.htm"/>
<include name="**/*.html"/>
<include name="**/*.properties"/>
<exclude name="**/package.html"/>
</fileset>
</copy>
</target>
<!-- =========================================== -->
<!-- Creates the war archives -->
<!-- =========================================== -->
<target name="webCMwar" depends="webCMcompile">
<mkdir dir="${deploy.dir}"/>
<!-- War Web Descriptor -->
<war
warfile="${deploy.dir}/adempiereWebCMbase.war"
webxml="${src.web.dir}/WEB-INF/web.xml">
<fileset dir="${src.web.dir}" excludes="**/web.xml,**/lib/**,**/classes/**"/>
<!-- WEB-INF/classes -->
<classes dir="${build.war.dir}"/>
<manifest>
<attribute name="Specification-Title" value="AdempiereWebCM"/>
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/>
<attribute name="Specification-Vendor" value="Adempiere, Inc., (C) 2006 ComDivision GmbH"/>
<attribute name="Implementation-Title" value="AdempiereWebCMWar ${env.ADEMPIERE_VERSION}"/>
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
<attribute name="Implementation-URL" value="http://www.adempiere.com"/>
<attribute name="Class-Path" value="Adempiere.jar AdempiereSLib.jar"/>
</manifest>
</war>
</target>
<!-- =========================================== -->
<!-- Creates the server binary -->
<!-- =========================================== -->
<target name="webCMdeployServer" depends="webCMwar">
<copy todir="../lib">
<fileset dir="${deploy.dir}"
includes="*.jar,*.war,*.ear"/>
</copy>
</target>
<!-- =========================================== -->
<!-- Creates the binary structure -->
<!-- =========================================== -->
<target name="main" depends="webCMdeployServer">
<copy file="src/ear/application.xml" tofile="../lib/adempiereWebCM.xml" />
</target>
<!-- =========================================== -->
<!-- Cleans up the current build -->
<!-- =========================================== -->
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${deploy.dir}"/>
<delete file="../lib/adempiereWebCMbase.war" failonerror="false"/>
<delete file="../lib/adempiereWebCM.xml" failonerror="false"/>
</target>
</project>