ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@gmx.de>
Subject Re: Deploy without recompile
Date Mon, 09 Nov 2009 13:20:31 GMT
Hi,
-------- Original-Nachricht --------
> Datum: Mon, 9 Nov 2009 12:19:50 +0000
> Von: Ziggy <ziggy25@gmail.com>
> An: user@ant.apache.org
> Betreff: Deploy without recompile

> Hi all,
> 
> I've got a query on the way web applications are deployed. I have an
> application that has several jsp files and serlvets that are in
> WEB-INF/classes.
> 
> When i deploy the application all i do is do a checkout on CVS, make the
> changes, rebuild the war using ANT and redeploy manually. This works fine
> but now i am having some doubts on this approach.
> 
> Basicaly if i even change one file i have to rebuild the war file meaning
> i
> have to recompile everything. I think this is unecessary. i would like to
> be
> able to just recompile the one file and redeploy the one file without
> having
> to rebuild the whole war file.
> 
> 1. How do you deploy your application? If you deploy as a war file, do you
> recompile everything even if the change is to a single file or a
> configuration file.
>

on my project we recompile everything in our central builds.
 
> 2. Could you provide an example on the approach you use from the point a
> source file comes out from CVS to the point it get to the production
> environment. (An example with a single file change would be usefull)

I use a continuous integration tool (CruiseControl) and I configure CruiseControl to fetch
the files from source control in the bootstrap phase. A single file change triggers a new
build. Each successful build is published in a repository managed using ivy. 

The new ear files are not deployed directly from the build, but first stored in ivy. The deployment
is configured as a separate build. On demand deployments are done by passing to the deployment
build application name, branch, version, and target environment parameters. The deployment
fetches the artifacts from ivy and then does the necessary steps to have the application server
receive the new ear file.

> 
> 2. Is it possible to use ANT to repackage the war file without recompiling
> the source files?
> 
> I am thinking that if i change one file i should be able to just compile
> that one file and move it to the WEB-INF/classes folder into the relevant
> folder. This might work but is there a better way of doing this instead of
> moving it manually?
>
By default, the <javac/> task in ant recompiles only changed source files. So if you
do not delete your output folder before compiling, you have incremental compilation. 

So yes, you can use ant to repackage the war file without recompiling all the source files.

> 
> Thanks
Regards,

Antoine

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message