You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Andrew Lawrence <an...@secureea.com> on 2000/08/29 21:41:37 UTC

Use of Ant in your work process

Hi all,

I couldn't find an archive to search through, so I hope this hasn't been 
asked and discussed already, plus its a bit offtopic. sorry twice. :-)
Since Ant is often used to move from a src tree to a deployable application, 
this seemed like the right place to ask. If you have a better place, please 
email me privately.


I am in the process establishing our development environment and processes. 
It is (so I think) going to be a typical environment for a java development: 
CVS, Ant, IDE/editor of choice, Tomcat for debugging. I have come across the 
Tomcat folks recommendation on how to set up directory structures, 
(http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-
tomcat/src/doc/appdev/contents.html) and wondered if many of you are using 
it, and what you think of it.  

Specifically, is the routine for your developers to update from CVS, run ant 
to build/deploy to Tomcat, and then start tomcat in a IDE/debugger (like 
JBuilder) to debug? How does your IDE match the running servlet class file 
with the .java in this case?  If you modify anything in your code or a jsp, 
do you do it in your src tree and then rerun ant and try again?  Wash-Rinse-
Repeat until clean? 

This approach *seems* cumbersome to me, and I cant clearly see the benefits 
of working this way vs. simply having the directory structure in CVS reflect 
my application structure (WEB-INF/classes, etc). Ant, of course, would still 
be used to build, but not so much deploy, until it came time to just make 
a .war/.ear file and go to production.

Thoughts?


-- 
Andrew Lawrence
andy@secureea.com



Re: Use of Ant in your work process

Posted by do...@mad.scientist.com.
On Tue, 29 Aug 2000, Andrew Lawrence wrote:
> I couldn't find an archive to search through, so I hope this hasn't been 
> asked and discussed already, plus its a bit offtopic. sorry twice. :-)

archive was available in the first welcome mail for ant
subscription.

> Tomcat folks recommendation on how to set up directory structures, 
> (http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-
> tomcat/src/doc/appdev/contents.html) and wondered if many of you are using 
> it, and what you think of it.  

Those recommendations were based on an old version of ant
and not all of them still apply (init target).

> Specifically, is the routine for your developers to update from CVS, run ant 
> to build/deploy to Tomcat, and then start tomcat in a IDE/debugger (like 
> JBuilder) to debug? How does your IDE match the running servlet class file 
> with the .java in this case?  If you modify anything in your code or a jsp, 
> do you do it in your src tree and then rerun ant and try again?  Wash-Rinse-
> Repeat until clean? 

well a lot of projects have 2 src trees. The first src tree
is master and is copied to other tree. This other tree goes
to a build directory. You could make the build directory and
build classes directory the same one and map them to
appropriate webapp directory if you like

I don't use any cumbersome IDE thou and with a few scripts I
can detect errors in original source tree and not
duplicate. I used Emacs and it is perfect for this process
(thou lacks a little on debugging side).


> This approach *seems* cumbersome to me, and I cant clearly see the benefits 
> of working this way vs. simply having the directory structure in CVS reflect 
> my application structure (WEB-INF/classes, etc). 

benefit mainly is conceptual. You build source directory
right and it is the same across all projects regardless of
whether they are webapps, db apps, ui apps. It saves a lot
of time when educating new employees to process.

I would suggest you have a look at some of the other Apache
projects and their build files. The one I maintain which is
reasonably clean (except for documentation targets) is for
Avalon project at java.apache.org. You should be able to
look at it via WebCVS

Cheers,

Pete

*--------------------------------------------------*
| Latrobe University,     | Does the name 'Pavlov' |
| Bundoora, Australia     |    ring a bell ?       |
*--------------------------------------------------*