[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Integrating svn with ant for project deployment

From: Andy Levy <andy.levy_at_gmail.com>
Date: 2005-12-01 18:59:22 CET

(cross-posting to svnforum.org)

My ultimate goal is to allow a "release manager" to log into our web
server, and with one command pull the correct version of our
JSP/Servlet web app from Subversion, build it, and deploy into Tomcat.

Today, we have everything but the Subversion piece in place, using
ant. From what I can tell, we use a very close to "default" build.xml
(based on the preponderance of comments, and their style, in the
file). The directory ant works in contains both the source code,
configuration and build directory.

I've placed the conf, web and src high-level directories, as well as
build.xml, in svn and do everything through my working copy. I've
modified the current build.xml following this page
to extract the project from svn and added a dependency upon this
action for the compile task. Theory being that when I run ant
compile, it'll pull from svn and then compile.

Trouble is, ant requires the conf directory to run anything at all.
And with that in existence, svn export and svn checkout won't complete
because the directory already exists (without --force, anyway - but
that only works for export).

If I manually do the export (using --force), the project compiles just
fine. Maybe my solution is to write a batch file for the release
manager which first does an export or checkout/update, then runs ant?

Are other people using ant w/ svn in this way? If so, how are you
handling it? Maybe I just need a small tweak to build.xml? Or am I
causing trouble for myself by using the same directory I'm trying to
build in? I'd post my build.xml but it's 22K and I don't want to
flood the list; I can supply portions, however.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 1 19:25:46 2005

This is an archived mail posted to the Subversion Users mailing list.