What do you all think of this? Please suggest better ways of writing the same.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
How about
You could even keep the tomcatDir and servletLib properties in a global property file, since they are likely to be used in other build files as well. That way you only need to change them in a single location if necessary. [ May 16, 2007: Message edited by: Ulf Dittmer ]
1. I prefer to declare paths in property tags. For example , one for the path to the root of the application (C:\apache-tomcat-6.0.10\webapps\Guest Book), one for the source (reusing the previous property), one for the destination, one for external libraries. <property name="app.root" value="C:\apache-tomcat-6.0.10\webapps\Guest Book" /> <property name="app.src" value="..." /> <property name="app.classes" value="${app.root}\WEB-INF\classes" />
2. It's not an Ant related, but I would not put source files in the classes directory
I am thinking, why do we need the path element when we already have specified all the jar files in the fileset dir? Using servletLib, we are still pointed to servlet-api.jar right? or is that how it is done, we point to all the jar files we need to add one by one and those will be the path elements??
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
A path can contain any number of filesets and pathelements, so yes, this is necessary. These concepts are explained in detail with many examples in the Ant manual.
v ray
Ranch Hand
Joined: Mar 15, 2007
Posts: 223
posted
0
Yes, I got it, thank you so much for clearing all my doubts!
Padma priya Gururajan
Ranch Hand
Joined: Oct 05, 2006
Posts: 411
posted
0
Hi Ulf, Where is the Ant Manual available? With regards, Padma priya N.G.
Padma priya N.G.
Be the change you want to be - Mahatma Gandhi
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.