Subversion Repositories SmartDukaan

Rev

Rev 1045 | Rev 1196 | 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}" />
1107 chandransh 87
		<mkdir dir="${build.home}/WEB-INF/classes" />
88
		<mkdir dir="${build.home}/WEB-INF/lib" />
877 vikas 89
		<property name="yuic" location="${thirdparty.location}/readonly/yuicompressor-2.4.2/yuicompressor-2.4.2.jar"/>
317 ashish 90
 
91
	</target>
942 chandransh 92
 
317 ashish 93
	<!-- ==================== Compile Target ================================== -->
94
 
95
	<!--
96
 
97
	  The "compile" target transforms source files (from your "src" directory)
98
	  into class files in the appropriate location in the build directory.
99
	  This example assumes that you will be including your classes in an
100
	  unpacked directory hierarchy under "/WEB-INF/classes".
101
 
102
	-->
103
	<target name="compile" depends="init" description="Compile Java sources">
104
		<javac srcdir="${source.home}"
105
				destdir="${build.home}/WEB-INF/classes"
106
				debug="${compile.debug}"
107
				deprecation="${compile.deprecation}"
108
				optimize="${compile.optimize}"
877 vikas 109
			    source="1.6" target="1.6">
942 chandransh 110
			<classpath refid="Website.classpath"/>
317 ashish 111
		</javac>
318 ashish 112
		<javac srcdir="${conf.home}"
113
						destdir="${build.home}/WEB-INF/classes"
114
						debug="${compile.debug}"
115
						deprecation="${compile.deprecation}"
116
						optimize="${compile.optimize}"
117
					     source="1.6" target="1.6">
942 chandransh 118
			<classpath refid="Website.classpath"/>
318 ashish 119
		</javac>
317 ashish 120
 
121
	</target>
942 chandransh 122
 
317 ashish 123
	<!-- ==================== Build Target ================================== -->
124
 
125
	<!--
126
 
127
	  The "build" target copies all non class files to build directory
128
 
129
	-->
942 chandransh 130
 
317 ashish 131
	<target name="build" depends="compile" description="Copies all non Java classes to build directoy">
132
		<copy todir="${build.home}">
133
			<fileset dir="${webapp.home}" excludes="CVS,**/*.class" />
134
		</copy>
135
		<copy todir="${build.home}/WEB-INF/classes">
318 ashish 136
			<fileset dir="${conf.home}" excludes="CVS,**/*.java" />
317 ashish 137
		</copy>
942 chandransh 138
 
318 ashish 139
		<copy todir="${build.home}/WEB-INF/lib">
942 chandransh 140
			<filelist refid="apache.libs"/>
318 ashish 141
			<filelist refid="Website.libs"/>
142
			<mapper type="flatten"/>
877 vikas 143
		</copy>
942 chandransh 144
 
877 vikas 145
		<!--Join css files -->
146
		<concat destfile="${build.home}/css/saholic.css">
942 chandransh 147
			<filelist dir="${build.home}/css" files="style.css,common.css,nav.css,widget.css,demoStyles.css,
943 vikas 148
	        	widget.css,product.css,cart.css,myaccount.css,gc_safari.css"/>
877 vikas 149
		</concat>
943 vikas 150
		<!--Minify css files -->
877 vikas 151
		<apply executable="java" dest="${build.home}/css" parallel="false">
942 chandransh 152
			<filelist dir="${build.home}/css" files="saholic.css" />
153
			<arg line="-jar" />
154
			<arg path="${yuic}" />
155
			<srcfile />
156
			<arg line="-o" />
157
			<mapper type="glob" from="*.css" to="*-min.css" />
158
			<targetfile />
877 vikas 159
		</apply>
942 chandransh 160
 
877 vikas 161
		<!--Join js files -->
162
		<concat destfile="${build.home}/js/saholic.js">
942 chandransh 163
			<!--filelist dir="${build.home}/js" files="jquery-1.4.2.js,jquery-ui.min.js,loginpop.js,all.js,charLimit.js,
877 vikas 164
		        	jsapi.js,gallery.js,scrolltab.js,widget_slidetab.js,custom-jquery.js,myaccount.js,jquery.number_format.js
165
		        	jquery.validate.js,jquery.tipsy.js,loopedslider.js,widget_accordion.js,shippingAddress.js,productCategory.js
166
		        	"/-->
942 chandransh 167
			<filelist dir="${build.home}/js" files="widget_accordion.js,shippingAddress.js"/>
168
		</concat>
877 vikas 169
		<!--Minify js files -->
170
		<apply executable="java" dest="${build.home}/js" parallel="false">
942 chandransh 171
			<filelist dir="${build.home}/js" files="saholic.js" />
172
			<arg line="-jar" />
173
			<arg path="${yuic}" />
174
			<srcfile />
175
			<arg line="-o" />
176
			<mapper type="glob" from="*.js" to="*-min.js" />
177
			<targetfile />
877 vikas 178
		</apply>
942 chandransh 179
 
317 ashish 180
	</target>
942 chandransh 181
 
317 ashish 182
	<!-- ==================== Archive Target ================================== -->
183
 
184
	<!--
185
 
186
	  The "archive" target create a binary archive of all files in build.home
187
 
188
	-->
189
 
190
	<target name="archive" depends="build" description="Create binary archive of all files in dist.home">
942 chandransh 191
 
192
 
317 ashish 193
		<!-- Create application WAR file -->
942 chandransh 194
		<jar jarfile="${lib.home}/${app.name}.war"
317 ashish 195
				basedir="${build.home}" />
196
 
942 chandransh 197
	</target>
198
 
199
 
200
 
201
 
317 ashish 202
</project>
203