|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Deploying and building a war fileHi 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. 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) 2. Do you use any tool to manage this? 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? Thanks |
|
|
RE: Deploying and building a war fileant war task http://ant.apache.org/manual/CoreTasks/war.html or maven-war-plugin http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html (in the case of maven you MUST adhere to the directory layout suggested) either build environment will perform these tasks for you you can ask ant-users list for more information http://ant.apache.org/mail.html or maven-users list if you prefer a version specific way to manage the build http://maven.apache.org/mail-lists.html Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Mon, 9 Nov 2009 12:04:12 +0000 > Subject: Deploying and building a war file > From: ziggy25@... > To: users@... > > 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. > > 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) > > 2. Do you use any tool to manage this? > > 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? > > > Thanks _________________________________________________________________ Hotmail: Trusted email with Microsoft's powerful SPAM protection. http://clk.atdmt.com/GBL/go/177141664/direct/01/ http://clk.atdmt.com/GBL/go/177141664/direct/01/ |
|
|
Re: Deploying and building a war fileIf you use Eclipse (www.eclipse.org/ free; runs on Wins/Mac/Linux)
with the web plugins, it records your deploy target, and allows you to deploy with either a war file, or in "exploded form". In the latter case, you can usually leave your web server running, make a code change, save the file, and it is automatically re-compiled & re- deployed to the running server. At worst, you only need to hit a refresh button. It makes life much simpler, and the syntax-directed editor saves me from many stupidities. --Ken On Nov 9, 2009, at 7:04 AM, Ziggy wrote: > 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. > > 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) > > 2. Do you use any tool to manage this? > > 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? > > > Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Deploying and building a war fileHi Ken,
I do use eclipse but only for development. I cant really deploy from eclipse for several reasons. One of them being that the deployment server is a different machine from where i do the development. Thanks On Mon, Nov 9, 2009 at 7:12 PM, Ken Bowen <kbowen@...> wrote: > If you use Eclipse (www.eclipse.org/ free; runs on Wins/Mac/Linux) with > the web plugins, it records your deploy target, and allows you to deploy > with either a war file, or in "exploded form". In the latter case, you can > usually leave your web server running, make a code change, save the file, > and it is automatically re-compiled & re-deployed to the running server. At > worst, you only need to hit a refresh button. It makes life much simpler, > and the syntax-directed editor saves me from many stupidities. > > --Ken > > > On Nov 9, 2009, at 7:04 AM, Ziggy wrote: > > 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. >> >> 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) >> >> 2. Do you use any tool to manage this? >> >> 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? >> >> >> Thanks >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > |
|
|
RE: Deploying and building a war fileHi
>> i have to rebuild the war file meaning >> i >> have to recompile everything. I have been using Eclipse / Tomcat for build deploy and as far as the Compilation is considered correct, But why rebuild the **.war" , Can u write an ANT script to copy the modified *.class or *.jsp or *.properties file to the respective folder under TOMCAT/WEBAPPS/APPLIC But u need to restart the TOMCAT if re-loadable flag is not set to true in global "web.xml" :) With regards Karthik -----Original Message----- From: Ziggy [mailto:ziggy25@...] Sent: Tuesday, November 10, 2009 1:19 PM To: Tomcat Users List Subject: Re: Deploying and building a war file Hi Ken, I do use eclipse but only for development. I cant really deploy from eclipse for several reasons. One of them being that the deployment server is a different machine from where i do the development. Thanks On Mon, Nov 9, 2009 at 7:12 PM, Ken Bowen <kbowen@...> wrote: > If you use Eclipse (www.eclipse.org/ free; runs on Wins/Mac/Linux) with > the web plugins, it records your deploy target, and allows you to deploy > with either a war file, or in "exploded form". In the latter case, you can > usually leave your web server running, make a code change, save the file, > and it is automatically re-compiled & re-deployed to the running server. At > worst, you only need to hit a refresh button. It makes life much simpler, > and the syntax-directed editor saves me from many stupidities. > > --Ken > > > On Nov 9, 2009, at 7:04 AM, Ziggy wrote: > > 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. >> >> 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) >> >> 2. Do you use any tool to manage this? >> >> 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? >> >> >> Thanks >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Deploying and building a war file-----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-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |