From user-return-69337-apmail-ant-user-archive=ant.apache.org@ant.apache.org Mon Nov 09 13:20:59 2009 Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 14031 invoked from network); 9 Nov 2009 13:20:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Nov 2009 13:20:58 -0000 Received: (qmail 52555 invoked by uid 500); 9 Nov 2009 13:20:57 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 52497 invoked by uid 500); 9 Nov 2009 13:20:57 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 52487 invoked by uid 99); 9 Nov 2009 13:20:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Nov 2009 13:20:57 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of antoine@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 09 Nov 2009 13:20:55 +0000 Received: (qmail 6019 invoked by uid 0); 9 Nov 2009 13:20:33 -0000 Received: from 38.100.172.132 by www147.gmx.net with HTTP; Mon, 09 Nov 2009 14:20:31 +0100 (CET) Content-Type: text/plain; charset="us-ascii" Date: Mon, 09 Nov 2009 14:20:31 +0100 From: "Antoine Levy-Lambert" In-Reply-To: Message-ID: <20091109132031.23920@gmx.net> MIME-Version: 1.0 References: Subject: Re: Deploy without recompile To: "Ant Users List" X-Authenticated: #22961642 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX1+Kk3Q6ykSKo1ctdyluW/IlHEXstYwOASxXSES9zU s3ufDyherKc8CJIadWPIRRMxDCwoayAgH/+A== Content-Transfer-Encoding: 7bit X-GMX-UID: SFOyDRBua2AoSY5raXUygLs6OWhhakcW X-FuHaFi: 0.59 Hi, -------- Original-Nachricht -------- > Datum: Mon, 9 Nov 2009 12:19:50 +0000 > Von: Ziggy > 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 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