Subversion Repositories SmartDukaan

Rev

Rev 317 | Rev 325 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 317 Rev 318
Line 9... Line 9...
9
     Author:   Bruce Phillips
9
     Author:   Bruce Phillips
10
     ====================================================================== -->
10
     ====================================================================== -->
11
 
11
 
12
 
12
 
13
	
13
	
14
<project name="Basic_Struts2_Ant" default="archive" basedir=".">
14
<project name="Website" default="archive" basedir=".">
15
	
15
	
16
    <description>
16
    <description>
17
           Basic Struts 2 Java Web Application
17
           Shop2020 Website
18
    </description>
18
    </description>
19
	
19
	
20
	<property file="build.properties"/>
20
	<property file="build.properties"/>
21
    
21
    
-
 
22
	<path id="Web App Libraries.libraryclasspath"/>
-
 
23
	    <path id="EAR Libraries.libraryclasspath"/>
-
 
24
	    <path id="Website.classpath">
-
 
25
	        <pathelement location="build/classes"/>
-
 
26
	        <path refid="Web App Libraries.libraryclasspath"/>
-
 
27
	        <path refid="EAR Libraries.libraryclasspath"/>
-
 
28
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-collections-3.2.1/commons-collections-3.2.1.jar"/>
-
 
29
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-fileupload-1.2.1/commons-fileupload-1.2.1.jar"/>
-
 
30
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-io-1.3.2/commons-io-1.3.2.jar"/>
-
 
31
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-lang-2.4/commons-lang-2.4.jar"/>
-
 
32
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-logging-1.0.4/commons-logging-1.0.4.jar"/>
-
 
33
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-logging-api-1.1/commons-logging-api-1.1.jar"/>
-
 
34
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-validator-1.3.1/commons-validator-1.3.1.jar"/>
-
 
35
	        <pathelement location="${thirdparty.location}/readonly/apache/jsp-2.1/jsp-api.jar"/>
-
 
36
	        <pathelement location="${thirdparty.location}/readonly/apache/sevlet-2.5/servlet-api.jar"/>
-
 
37
	        <pathelement location="${thirdparty.location}/readonly/apache/struts-2.1.8.1/struts2-convention-plugin-2.1.8.1.jar"/>
-
 
38
	        <pathelement location="${thirdparty.location}/readonly/apache/struts-2.1.8.1/struts2-core-2.1.8.1.jar"/>
-
 
39
	        <pathelement location="${thirdparty.location}/readonly/apache/struts-2.1.8.1/struts2-rest-plugin-2.1.8.1.jar"/>
-
 
40
	        <pathelement location="${thirdparty.location}/readonly/apache/struts-2.1.8.1/xstream-1.2.2.jar"/>
-
 
41
	        <pathelement location="${thirdparty.location}/readonly/apache/struts-2.1.8.1/xwork-core-2.1.6.jar"/>
-
 
42
	        <pathelement location="${thirdparty.location}/readonly/apache/tomcat-juli/tomcat-juli.jar"/>
-
 
43
	        <pathelement location="${thirdparty.location}/readonly/apache/velocity-1.6.3/velocity-1.6.3.jar"/>
-
 
44
	        <pathelement location="${thirdparty.location}/readonly/apache/velocity-1.6.3/velocity-tools-1.4.jar"/>
-
 
45
	        <pathelement location="${thirdparty.location}/readonly/freemarker/freemarker-2.3.15.jar"/>
-
 
46
	        <pathelement location="${thirdparty.location}/readonly/apache/ezmorph/ezmorph-1.0.3.jar"/>
-
 
47
	        <pathelement location="${thirdparty.location}/readonly/apache/json/json-lib-2.1-jdk15.jar"/>
-
 
48
	        <pathelement location="${thirdparty.location}/readonly/apache/ognl/ognl-2.7.3.jar"/>
-
 
49
	        <pathelement location="${thirdparty.location}/readonly/apache/xpp/xpp3_min-1.1.3.4.O.jar"/>
-
 
50
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-digester-2.0/commons-digester-2.0.jar"/>
-
 
51
	    </path>
22
 
52
	
-
 
53
		<filelist id="Website.libs">
-
 
54
		        <file name="${thirdparty.location}/readonly/apache/commons-collections-3.2.1/commons-collections-3.2.1.jar"/>
-
 
55
		        <file name="${thirdparty.location}/readonly/apache/commons-fileupload-1.2.1/commons-fileupload-1.2.1.jar"/>
-
 
56
		        <file name="${thirdparty.location}/readonly/apache/commons-io-1.3.2/commons-io-1.3.2.jar"/>
-
 
57
		        <file name="${thirdparty.location}/readonly/apache/commons-lang-2.4/commons-lang-2.4.jar"/>
-
 
58
		        <file name="${thirdparty.location}/readonly/apache/commons-logging-1.0.4/commons-logging-1.0.4.jar"/>
-
 
59
		        <file name="${thirdparty.location}/readonly/apache/commons-logging-api-1.1/commons-logging-api-1.1.jar"/>
-
 
60
		        <file name="${thirdparty.location}/readonly/apache/commons-validator-1.3.1/commons-validator-1.3.1.jar"/>
-
 
61
		        <file name="${thirdparty.location}/readonly/apache/jsp-2.1/jsp-api.jar"/>
-
 
62
		        <file name="${thirdparty.location}/readonly/apache/struts-2.1.8.1/struts2-convention-plugin-2.1.8.1.jar"/>
-
 
63
		        <file name="${thirdparty.location}/readonly/apache/struts-2.1.8.1/struts2-core-2.1.8.1.jar"/>
-
 
64
		        <file name="${thirdparty.location}/readonly/apache/struts-2.1.8.1/struts2-rest-plugin-2.1.8.1.jar"/>
-
 
65
		        <file name="${thirdparty.location}/readonly/apache/struts-2.1.8.1/xstream-1.2.2.jar"/>
-
 
66
		        <file name="${thirdparty.location}/readonly/apache/struts-2.1.8.1/xwork-core-2.1.6.jar"/>
-
 
67
		        <file name="${thirdparty.location}/readonly/apache/tomcat-juli/tomcat-juli.jar"/>
-
 
68
		        <file name="${thirdparty.location}/readonly/apache/velocity-1.6.3/velocity-1.6.3.jar"/>
-
 
69
		        <file name="${thirdparty.location}/readonly/apache/velocity-1.6.3/velocity-tools-1.4.jar"/>
-
 
70
		        <file name="${thirdparty.location}/readonly/freemarker/freemarker-2.3.15.jar"/>
-
 
71
		        <file name="${thirdparty.location}/readonly/apache/ezmorph/ezmorph-1.0.3.jar"/>
-
 
72
		        <file name="${thirdparty.location}/readonly/apache/json/json-lib-2.1-jdk15.jar"/>
-
 
73
		        <file name="${thirdparty.location}/readonly/apache/ognl/ognl-2.7.3.jar"/>
-
 
74
		        <file name="${thirdparty.location}/readonly/apache/xpp/xpp3_min-1.1.3.4.O.jar"/>
-
 
75
		        <file name="${thirdparty.location}/readonly/apache/commons-digester-2.0/commons-digester-2.0.jar"/>
-
 
76
		</filelist>
23
	
77
	
24
	<!-- ==================== Clean Target ==================================== -->
78
	<!-- ==================== Clean Target ==================================== -->
25
 
79
 
26
	<!--
80
	<!--
27
	  The "clean" target deletes any previous "build" and "dist" directory,
81
	  The "clean" target deletes any previous "build" and "dist" directory,
Line 58... Line 112...
58
	-->
112
	-->
59
	<target name="compile" depends="init" description="Compile Java sources">
113
	<target name="compile" depends="init" description="Compile Java sources">
60
		
114
		
61
		
115
		
62
		<mkdir dir="${build.home}/WEB-INF/classes" />
116
		<mkdir dir="${build.home}/WEB-INF/classes" />
-
 
117
		<mkdir dir="${build.home}/WEB-INF/lib" />
63
		
118
		
64
		<javac srcdir="${source.home}"
119
		<javac srcdir="${source.home}"
65
				destdir="${build.home}/WEB-INF/classes"
120
				destdir="${build.home}/WEB-INF/classes"
66
				debug="${compile.debug}"
121
				debug="${compile.debug}"
67
				deprecation="${compile.deprecation}"
122
				deprecation="${compile.deprecation}"
68
				optimize="${compile.optimize}"
123
				optimize="${compile.optimize}"
69
			     source="1.6" target="1.6">
124
			     source="1.6" target="1.6">
70
			
-
 
71
			<classpath>
125
			<classpath refid="Website.classpath"/>			
72
				<path>
126
		</javac>
73
			    	<fileset dir="${lib.home}" />
127
		<javac srcdir="${conf.home}"
-
 
128
						destdir="${build.home}/WEB-INF/classes"
-
 
129
						debug="${compile.debug}"
74
					<fileset dir="${lib.external}" />
130
						deprecation="${compile.deprecation}"
-
 
131
						optimize="${compile.optimize}"
75
			    </path>
132
					     source="1.6" target="1.6">
76
			</classpath>
133
			<classpath refid="Website.classpath"/>			
77
			
-
 
78
		</javac>
134
		</javac>
79
 
135
 
80
	</target>
136
	</target>
81
	
137
	
82
	<!-- ==================== Build Target ================================== -->
138
	<!-- ==================== Build Target ================================== -->
Line 90... Line 146...
90
	<target name="build" depends="compile" description="Copies all non Java classes to build directoy">
146
	<target name="build" depends="compile" description="Copies all non Java classes to build directoy">
91
		<copy todir="${build.home}">
147
		<copy todir="${build.home}">
92
			<fileset dir="${webapp.home}" excludes="CVS,**/*.class" />
148
			<fileset dir="${webapp.home}" excludes="CVS,**/*.class" />
93
		</copy>
149
		</copy>
94
		<copy todir="${build.home}/WEB-INF/classes">
150
		<copy todir="${build.home}/WEB-INF/classes">
95
			<fileset dir="${source.home}" excludes="CVS,**/*.java" />
151
			<fileset dir="${conf.home}" excludes="CVS,**/*.java" />
-
 
152
		</copy>
-
 
153
		
-
 
154
		<copy todir="${build.home}/WEB-INF/lib">
-
 
155
			<filelist refid="Website.libs"/>
-
 
156
			<mapper type="flatten"/>
-
 
157
				
96
		</copy>
158
		</copy>
97
	</target>
159
	</target>
98
	
160
	
99
	<!-- ==================== Archive Target ================================== -->
161
	<!-- ==================== Archive Target ================================== -->
100
 
162
 
Line 104... Line 166...
104
 
166
 
105
	-->
167
	-->
106
 
168
 
107
	<target name="archive" depends="build" description="Create binary archive of all files in dist.home">
169
	<target name="archive" depends="build" description="Create binary archive of all files in dist.home">
108
		
170
		
109
		<mkdir     dir="${dist.home}" />
-
 
110
		
171
				
111
		<!-- Create application WAR file -->
172
		<!-- Create application WAR file -->
112
	    <jar jarfile="${dist.home}/${app.name}.war"
173
	    <jar jarfile="${lib.home}/${app.name}.war"
113
				basedir="${build.home}" />
174
				basedir="${build.home}" />
114
 
175
 
115
	</target>	
176
	</target>	
116
	
177
	
117
	
178