Subversion Repositories SmartDukaan

Rev

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