You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Vlasov Igor <vi...@mail.ru> on 2007/01/10 09:49:57 UTC

Advanced War deployment

I have one commercial project and want to deploy it throw .war deployment
process.
My application uses external libs (10 mb) which must presents in WEB-INF\lib
dir. All app size is 12mb.

How can i avoid of putting all that libs in .war file and transfer only
actual content of my app in one file?
For example I put all except libs in .war and deploy it. Then tomcat replace
only changed file and do not delete already deployes libs.

Maybe  I can use ANT script to replace Tomcat .war deploy/undeploy
procedure?






-- 
View this message in context: http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8253992
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Advanced War deployment

Posted by Vlasov Igor <vi...@mail.ru>.


Vlasov Igor wrote:
> 
> I have one commercial project and want to deploy it throw .war deployment
> process.
> My application uses external libs (10 mb) which must presents in
> WEB-INF\lib dir. All app size is 12mb.
> 
> How can i avoid of putting all that libs in .war file and transfer only
> actual content of my app in one file?
> For example I put all except libs in .war and deploy it. Then tomcat
> replace only changed file and do not delete already deployes libs.
> 
> Maybe  I can use ANT script to replace Tomcat .war deploy/undeploy
> procedure?
> 

I want to know is the ability to modify .war deploy/undeploy logic with
custom actions(i.e/ ant script)?

or mamy use some tomcat mechanism to watch on .zip file modification in some
directory and run ant script which can modify files in my webapp dir and
restart app context
-- 
View this message in context: http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8255209
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Advanced War deployment

Posted by Leon Rosenberg <ro...@googlemail.com>.
well create a directory on the clients machine called home/something
and put all files you'd have in your war file there. (like in jar -xf
myapp.war).

Than if you want to update anything, you just update the part you need
in this directory; same for the client, if he wants to update some
html files or whatever, he does it in this directory.

Than you write a small ant script which creates a war file out of this
directory with ant-war task. And another target that copies it into
tomcat/webapps. So you have to transfer only the data you need to the
client's machine (which i understood was your main concern), build the
new war locally and deploy it.

If you create same directory structure on your machine, you could
write a small ant-script which zips only files changed since some
date, copy this zip to the client's machine. The above mentioned
script on clients machine could automatically unzip your changes into
its installation directory  and build the new war.

S Privetom

Leon

On 1/10/07, Vlasov Igor <vi...@mail.ru> wrote:
>
>
>
> Leon Rosenberg-3 wrote:
> >
> > hmm,
> >
> > why don't you put the expanded web-app structure on the client's
> > machine somewhere else than under tomcat, put your new files therein
> > and repackage the .war on the machine directly?
> >
> > regards
> > Leon
> >
>
> Please give me the  detailed explanation ot your idea..
>
> --
> View this message in context: http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8255145
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Advanced War deployment

Posted by Vlasov Igor <vi...@mail.ru>.


Leon Rosenberg-3 wrote:
> 
> hmm,
> 
> why don't you put the expanded web-app structure on the client's
> machine somewhere else than under tomcat, put your new files therein
> and repackage the .war on the machine directly?
> 
> regards
> Leon
> 

Please give me the  detailed explanation ot your idea..

-- 
View this message in context: http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8255145
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Advanced War deployment

Posted by Leon Rosenberg <ro...@googlemail.com>.
hmm,

why don't you put the expanded web-app structure on the client's
machine somewhere else than under tomcat, put your new files therein
and repackage the .war on the machine directly?

regards
Leon

On 1/10/07, Vlasov Igor <vi...@mail.ru> wrote:
>
>
>
> Mikolaj Rydzewski-2 wrote:
> >
> > Vlasov Igor wrote:
> >> I have one commercial project and want to deploy it throw .war deployment
> >> process.
> >> My application uses external libs (10 mb) which must presents in
> >> WEB-INF\lib
> >> dir. All app size is 12mb.
> >>
> >> How can i avoid of putting all that libs in .war file and transfer only
> >> actual content of my app in one file?
> >> For example I put all except libs in .war and deploy it. Then tomcat
> >> replace
> >> only changed file and do not delete already deployes libs.
> >>
> > Why is the size of war file is a problem for you? You can put all
> > content from WEB-INF/lib to common/lib or shared/lib. But such solution
> > has several drawbacks and you should be aware of them:
> > http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
> >
> > On the other hand, if you want just to save bandwith when deploying new
> > wersion of application you could use i.e. rsync to transfer war file to
> > remote server, and then deploy remote file.
> > --
> > Mikolaj Rydzewski <mi...@ceti.pl>
> >
>
> All libs MUST be in WEB-INF/lib. And i want to use standart procedure of
> detecting new .war and its deployment process BUT a want to manually control
> what files to undelpoy during this process
>
> Thus i can prevent that libs ant CLIENT UPLOADED FILES to delete from
> unpacked dir for .WAR
>
>
>
> --
> View this message in context: http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8254519
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Advanced War deployment

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Vlasov Igor wrote:
> All libs MUST be in WEB-INF/lib. And i want to use standart procedure of
> detecting new .war and its deployment process BUT a want to manually control
> what files to undelpoy during this process 
>
> Thus i can prevent that libs ant CLIENT UPLOADED FILES to delete from
> unpacked dir for .WAR
>   
One should avoid uploading files into application's directory. You 
should treat is as a read only one. Place uploaded files in some other 
location, i.e. other tomcat's context or separate directory. Then you'll 
have no problems with (un)deploying.

-- 
Mikolaj Rydzewski <mi...@ceti.pl>


Re: Advanced War deployment

Posted by Vlasov Igor <vi...@mail.ru>.


Mikolaj Rydzewski-2 wrote:
> 
> Vlasov Igor wrote:
>> I have one commercial project and want to deploy it throw .war deployment
>> process.
>> My application uses external libs (10 mb) which must presents in
>> WEB-INF\lib
>> dir. All app size is 12mb.
>>
>> How can i avoid of putting all that libs in .war file and transfer only
>> actual content of my app in one file?
>> For example I put all except libs in .war and deploy it. Then tomcat
>> replace
>> only changed file and do not delete already deployes libs.
>>   
> Why is the size of war file is a problem for you? You can put all 
> content from WEB-INF/lib to common/lib or shared/lib. But such solution 
> has several drawbacks and you should be aware of them: 
> http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
> 
> On the other hand, if you want just to save bandwith when deploying new 
> wersion of application you could use i.e. rsync to transfer war file to 
> remote server, and then deploy remote file.
> -- 
> Mikolaj Rydzewski <mi...@ceti.pl>
> 

All libs MUST be in WEB-INF/lib. And i want to use standart procedure of
detecting new .war and its deployment process BUT a want to manually control
what files to undelpoy during this process 

Thus i can prevent that libs ant CLIENT UPLOADED FILES to delete from
unpacked dir for .WAR



-- 
View this message in context: http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8254519
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Advanced War deployment

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Vlasov Igor wrote:
> I have one commercial project and want to deploy it throw .war deployment
> process.
> My application uses external libs (10 mb) which must presents in WEB-INF\lib
> dir. All app size is 12mb.
>
> How can i avoid of putting all that libs in .war file and transfer only
> actual content of my app in one file?
> For example I put all except libs in .war and deploy it. Then tomcat replace
> only changed file and do not delete already deployes libs.
>   
Why is the size of war file is a problem for you? You can put all 
content from WEB-INF/lib to common/lib or shared/lib. But such solution 
has several drawbacks and you should be aware of them: 
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

On the other hand, if you want just to save bandwith when deploying new 
wersion of application you could use i.e. rsync to transfer war file to 
remote server, and then deploy remote file.

-- 
Mikolaj Rydzewski <mi...@ceti.pl>


Re: AW: Advanced War deployment

Posted by Vlasov Igor <vi...@mail.ru>.


Markus Döring wrote:
> 
> Hi,
> Don't know if there is a better way to do, but you can place the lib files
> into one of the following directorys instead of into the .war file:
> 
> /tomcat/common/lib
> /tomcat/server/lib
> /tomcat/shared/lib
> 
> Greetings
> Markus
> 
> 

I vave no rights to acess /tomcat/... dirs and put lib files

-- 
View this message in context: http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8254533
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: AW: Advanced War deployment

Posted by Vlasov Igor <vi...@mail.ru>.

Markus Döring wrote:
> 
> Hi,
> Don't know if there is a better way to do, but you can place the lib files
> into one of the following directorys instead of into the .war file:
> 
> /tomcat/common/lib
> /tomcat/server/lib
> /tomcat/shared/lib
> 
> Greetings
> Markus
> 
> 

I have no rights to acess /tomcat/... dirs and put lib files

-- 
View this message in context: http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8254533
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org