Subversion Repositories SmartDukaan

Rev

Rev 942 | Rev 1045 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
317 ashish 1
<?xml version="1.0"?>
2
 
3
 
4
<!-- ====================================================================== 
325 ashish 5
     Date:     June 2010
317 ashish 6
 
325 ashish 7
     Project:  Website
317 ashish 8
 
325 ashish 9
     Author:   Ashish Singh
317 ashish 10
     ====================================================================== -->
11
 
12
 
942 chandransh 13
 
318 ashish 14
<project name="Website" default="archive" basedir=".">
942 chandransh 15
 
16
	<description>
318 ashish 17
           Shop2020 Website
317 ashish 18
    </description>
942 chandransh 19
 
317 ashish 20
	<property file="build.properties"/>
421 rajveer 21
 
942 chandransh 22
	<filelist id="apache.libs" dir="${basedir}/${thirdparty.location}/readonly/apache">
23
		<file name="commons-collections-3.2.1/commons-collections-3.2.1.jar"/>
24
		<file name="commons-fileupload-1.2.1/commons-fileupload-1.2.1.jar"/>
25
		<file name="commons-io-1.3.2/commons-io-1.3.2.jar"/>
26
		<file name="commons-lang-2.4/commons-lang-2.4.jar"/>
27
		<file name="commons-logging-1.0.4/commons-logging-1.0.4.jar"/>
28
		<file name="commons-logging-api-1.1/commons-logging-api-1.1.jar"/>
29
		<file name="commons-validator-1.3.1/commons-validator-1.3.1.jar"/>
30
		<file name="jsp-2.1/jsp-api.jar"/>
31
		<file name="struts-2.1.8.1/struts2-convention-plugin-2.1.8.1.jar"/>
32
		<file name="struts-2.1.8.1/struts2-core-2.1.8.1.jar"/>
33
		<file name="struts-2.1.8.1/struts2-rest-plugin-2.1.8.1.jar"/>
34
		<file name="struts-2.1.8.1/xstream-1.2.2.jar"/>
35
		<file name="struts-2.1.8.1/xwork-core-2.1.6.jar"/>
36
		<file name="tomcat-juli/tomcat-juli.jar"/>
37
		<file name="velocity-1.6.3/velocity-1.6.3.jar"/>
38
		<file name="velocity-1.6.3/velocity-tools-1.4.jar"/>		
39
		<file name="ezmorph/ezmorph-1.0.3.jar"/>
40
		<file name="json/json-lib-2.1-jdk15.jar"/>
41
		<file name="ognl/ognl-2.7.3.jar"/>
42
		<file name="xpp/xpp3_min-1.1.3.4.O.jar"/>
43
		<file name="commons-digester-2.0/commons-digester-2.0.jar"/>
44
		<file name="thrift-0.2.0/libthrift.jar"/>
45
		<file name="log4j/log4j-1.2.16.jar"/>
46
		<file name="commons-codec-1.4/commons-codec-1.4.jar"/>
47
	</filelist>
317 ashish 48
 
942 chandransh 49
	<filelist id="Website.libs" dir="${basedir}/${thirdparty.location}">
50
		<file name="readonly/freemarker/freemarker-2.3.15.jar"/>
51
		<file name="readonly/slf4j/slf4j-api-1.5.8.jar"/>
52
		<file name="readonly/slf4j/slf4j-simple-1.5.8.jar"/>
53
		<file name="readonly/payment/payments.jar"/>
54
		<file name="readonly/yuicompressor-2.4.2/yuicompressor-2.4.2.jar"/>
55
		<file name="Common.jar"/>
56
		<file name="ThriftConfig.jar"/>
57
	</filelist>
392 rajveer 58
 
942 chandransh 59
	<path id="Website.classpath">
60
		<pathelement location="${basedir}/build/classes"/>
61
		<filelist refid="apache.libs"/>
62
		<filelist refid="Website.libs"/>
63
		<pathelement location="${basedir}/${thirdparty.location}/readonly/apache/sevlet-2.5/servlet-api.jar"/>
64
	</path>
637 rajveer 65
 
317 ashish 66
	<!-- ==================== Clean Target ==================================== -->
67
 
68
	<!--
69
	  The "clean" target deletes any previous "build" and "dist" directory,
70
	  so that you can be ensured the application can be built from scratch.
71
	-->
72
	<target name="clean" description="Delete old build and dist directories">
73
		<delete dir="${dist.home}"/>
74
		<delete dir="${build.home}"/>
75
	</target>
76
 
77
	<!-- ==================== Init Target ================================== -->
78
 
79
	<!--
80
 
81
	  The "init" target is used to create the "build" destination directory,
82
	  Normally, this task is executed indirectly when needed.
83
 
84
	-->
85
	<target name="init" depends="clean"  description="Create build directory">
942 chandransh 86
 
317 ashish 87
		<mkdir dir="${build.home}" />
877 vikas 88
		<property name="yuic" location="${thirdparty.location}/readonly/yuicompressor-2.4.2/yuicompressor-2.4.2.jar"/>
317 ashish 89
 
90
	</target>
942 chandransh 91
 
317 ashish 92
	<!-- ==================== Compile Target ================================== -->
93
 
94
	<!--
95
 
96
	  The "compile" target transforms source files (from your "src" directory)
97
	  into class files in the appropriate location in the build directory.
98
	  This example assumes that you will be including your classes in an
99
	  unpacked directory hierarchy under "/WEB-INF/classes".
100
 
101
	-->
102
	<target name="compile" depends="init" description="Compile Java sources">
942 chandransh 103
 
104
 
317 ashish 105
		<mkdir dir="${build.home}/WEB-INF/classes" />
318 ashish 106
		<mkdir dir="${build.home}/WEB-INF/lib" />
942 chandransh 107
 
317 ashish 108
		<javac srcdir="${source.home}"
109
				destdir="${build.home}/WEB-INF/classes"
110
				debug="${compile.debug}"
111
				deprecation="${compile.deprecation}"
112
				optimize="${compile.optimize}"
877 vikas 113
			    source="1.6" target="1.6">
942 chandransh 114
			<classpath refid="Website.classpath"/>
317 ashish 115
		</javac>
318 ashish 116
		<javac srcdir="${conf.home}"
117
						destdir="${build.home}/WEB-INF/classes"
118
						debug="${compile.debug}"
119
						deprecation="${compile.deprecation}"
120
						optimize="${compile.optimize}"
121
					     source="1.6" target="1.6">
942 chandransh 122
			<classpath refid="Website.classpath"/>
318 ashish 123
		</javac>
317 ashish 124
 
125
	</target>
942 chandransh 126
 
317 ashish 127
	<!-- ==================== Build Target ================================== -->
128
 
129
	<!--
130
 
131
	  The "build" target copies all non class files to build directory
132
 
133
	-->
942 chandransh 134
 
317 ashish 135
	<target name="build" depends="compile" description="Copies all non Java classes to build directoy">
136
		<copy todir="${build.home}">
137
			<fileset dir="${webapp.home}" excludes="CVS,**/*.class" />
138
		</copy>
139
		<copy todir="${build.home}/WEB-INF/classes">
318 ashish 140
			<fileset dir="${conf.home}" excludes="CVS,**/*.java" />
317 ashish 141
		</copy>
942 chandransh 142
 
318 ashish 143
		<copy todir="${build.home}/WEB-INF/lib">
942 chandransh 144
			<filelist refid="apache.libs"/>
318 ashish 145
			<filelist refid="Website.libs"/>
146
			<mapper type="flatten"/>
877 vikas 147
		</copy>
942 chandransh 148
 
877 vikas 149
		<!--Join css files -->
150
		<concat destfile="${build.home}/css/saholic.css">
942 chandransh 151
			<filelist dir="${build.home}/css" files="style.css,common.css,nav.css,widget.css,demoStyles.css,
943 vikas 152
	        	widget.css,product.css,cart.css,myaccount.css,gc_safari.css"/>
877 vikas 153
		</concat>
943 vikas 154
		<!--Minify css files -->
877 vikas 155
		<apply executable="java" dest="${build.home}/css" parallel="false">
942 chandransh 156
			<filelist dir="${build.home}/css" files="saholic.css" />
157
			<arg line="-jar" />
158
			<arg path="${yuic}" />
159
			<srcfile />
160
			<arg line="-o" />
161
			<mapper type="glob" from="*.css" to="*-min.css" />
162
			<targetfile />
877 vikas 163
		</apply>
942 chandransh 164
 
877 vikas 165
		<!--Join js files -->
166
		<concat destfile="${build.home}/js/saholic.js">
942 chandransh 167
			<!--filelist dir="${build.home}/js" files="jquery-1.4.2.js,jquery-ui.min.js,loginpop.js,all.js,charLimit.js,
877 vikas 168
		        	jsapi.js,gallery.js,scrolltab.js,widget_slidetab.js,custom-jquery.js,myaccount.js,jquery.number_format.js
169
		        	jquery.validate.js,jquery.tipsy.js,loopedslider.js,widget_accordion.js,shippingAddress.js,productCategory.js
170
		        	"/-->
942 chandransh 171
			<filelist dir="${build.home}/js" files="widget_accordion.js,shippingAddress.js"/>
172
		</concat>
877 vikas 173
		<!--Minify js files -->
174
		<apply executable="java" dest="${build.home}/js" parallel="false">
942 chandransh 175
			<filelist dir="${build.home}/js" files="saholic.js" />
176
			<arg line="-jar" />
177
			<arg path="${yuic}" />
178
			<srcfile />
179
			<arg line="-o" />
180
			<mapper type="glob" from="*.js" to="*-min.js" />
181
			<targetfile />
877 vikas 182
		</apply>
942 chandransh 183
 
317 ashish 184
	</target>
942 chandransh 185
 
317 ashish 186
	<!-- ==================== Archive Target ================================== -->
187
 
188
	<!--
189
 
190
	  The "archive" target create a binary archive of all files in build.home
191
 
192
	-->
193
 
194
	<target name="archive" depends="build" description="Create binary archive of all files in dist.home">
942 chandransh 195
 
196
 
317 ashish 197
		<!-- Create application WAR file -->
942 chandransh 198
		<jar jarfile="${lib.home}/${app.name}.war"
317 ashish 199
				basedir="${build.home}" />
200
 
942 chandransh 201
	</target>
202
 
203
 
204
 
205
 
317 ashish 206
</project>
207