-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ziggy,
On 11/9/2009 7:04 AM, Ziggy wrote: > 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. JSP files in WEB-INF/classes? Yuk. > 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. > > Basically 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. Ant's <javac> task should only be compiling source files that have changed. I'm not sure if the <war> task does a differential update, though. > 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. For real deployments, we even tag the CVS repo :) In development, we have two different ant targets: 'install' (which does the whole WAR thing, and then actually un-wars the WAR file into the deployment directory) and 'quick-install' which just copies files. The latter results in a much faster deployment. We also have an 'install-web' target which skips compilation altogether so you can update static content and JSP files and avoid any potential context reloads. > 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) If you're starting with a fresh CVS checkout, how can a single source file change? Don't you have no .class files at all at that point? Or, do you guys revision-track your binaries? > 2. Do you use any tool to manage this? We use only ant. Maven is starting to be the tool of choice for serious projects, but I have yet to start using it. > 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? Ant is your friend: you can always write more targets that do convenient things for you. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAksibEUACgkQ9CaO5/Lv0PAYsQCfRo3L+/pChCdTBv7X5WHDAK29 BCoAoLOupvBcW+MDeQaN33EaFWSlc861 =6Vyl -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org