-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.xml
123 lines (101 loc) · 3.41 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
<?xml version="1.0"?>
<!--
B2BUA v1.0
Purpose : base skeleton for developing an application
Author : Altanai Bisht
Profile : Telecom application developer at TCS
Date : Oct 2012
-->
<project name="Musichold" default="dist" basedir=".">
<description>Voice Call Build script</description>
<property environment="env" />
<property name="project.dir" location="${basedir}" />
<property name="res.dir" location="${project.dir}/etc" />
<property name="weblogic.dir" location="C:\bea\sipserver30" />
<property file="build.properties" />
<!-- set global properties for this build -->
<property name="src.dir" location="src" />
<property name="build.dir" location="build" />
<property name="dist.dir" location="dist" />
<property name="web.dir" location="web" />
<property name="lib.dir" location="${web.dir}/WEB-INF/lib" />
<path id="lib.class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${weblogic.dir}\server\lib\wlss">
<include name="sipservlet.jar" />
</fileset>
<fileset dir="${weblogic.dir}\server\lib">
<include name="wcp_sip_core.jar" />
</fileset>
<fileset dir="${weblogic.dir}\server\lib">
<include name="weblogic.jar" />
</fileset>
</path>
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
</target>
<target name="init" depends="clean">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir}/WEB-INF/" />
<mkdir dir="${build.dir}/WEB-INF/classes" />
<mkdir dir="${build.dir}/META-INF/" />
</target>
<target name="compile" depends="init" description="compile the source ">
<!-- Compile the java code from ${src.dir} into the web directory. -->
<echo>Compiling web classes from ${src.dir} to ${build.dir}/WEB-INF/classes</echo>
<javac srcdir="${src.dir}" destdir="${build.dir}/WEB-INF/classes">
<classpath refid="lib.class.path" />
</javac>
<!-- Copy Webcontent.-->
<echo>Copying WebContent from ${web.dir} to ${build.dir}</echo>
<copy todir="${build.dir}">
<fileset dir="${web.dir}">
<include name="**/*" />
</fileset>
</copy>
<!-- Copy Non-Java-Resources.-->
<echo>Copying Resources from ${src.dir} to ${build.dir}/WEB-INF</echo>
<copy todir="${build.dir}/WEB-INF/classes">
<fileset dir="${src.dir}">
<include name="**/*" />
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="dist" depends="compile">
<!-- Create the distribution directory -->
<mkdir dir="${dist.dir}" />
<jar jarfile="${dist.dir}/${ant.project.name}.war" basedir="${build.dir}">
<manifest>
<attribute name="Created-By" value="Ant, auto-build for ${ant.project.name}" />
</manifest>
</jar>
</target>
<target name="deploy">
<wldeploy action="deploy"
source="dist/Musichold.war"
name="Musichold.war"
user="weblogic"
password="weblogic"
verbose="true"
nostage="true"
adminurl="t3://localhost:7001"
targets="AdminServer"
/>
</target>
<target name="undeploy">
<wldeploy
action="undeploy" verbose="true" debug="true"
name="Musichold"
user="weblogic" password="weblogic"
adminurl="t3://localhost:7001" targets="AdminServer"
failonerror="false" />
</target>
</project>