Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help for prepare scripts...

 
Rizvan Asgarov
Ranch Hand
Posts: 462
IntelliJ IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dear Friends,

Please help for the following problem:
(my purpose is to simplify the deployment with apache-ant)

1. Stop Tomcat 6.x
2. a) Create a new war_backup folder in any disk and create a new 01.07.2009 (must be change every day) folder in war_backup folder (as G:/war_backup/01.07.2009)
b) Further copy rizvan.war (Tomcat user -> apache-tomcat/webapps/rizvan.war) to this new 01.07.2009 folder.
3. Also copy logs folder (apache-tomcat/logs) to this new 01.07.2009 folder.
4. Then delete old rizavn.war (apache-tomcat/webapps/rizvan.war) and rizvan folder (apache-tomcat/webapps/rizvan)
5. Also delete files in old logs folder (apache-tomcat/logs)
6. Also delete files in work folder (apache-tomcat/work)
7. Then copy new rizvan.war from the disk (G:/) to the apache-tomcat/webapps/
8. And at last start Tomcat

Thanks in advance,
Rizvan
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most of your task could be done with ANT Core Tasks http://ant.apache.org/manual/index.html , but in general I do not understand why do you want to back up war file or why do you need copy log files to some other location. Most likely to simplify the deployment you have to script the following
1) get source code from version control system
2) build a new war file
3) deploy war file to tomcat
 
Rizvan Asgarov
Ranch Hand
Posts: 462
IntelliJ IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Thanks Misha for your helpful reply...
Misha Ver wrote:
but in general I do not understand why do you want to back up war file or ...

Some organizations use our programs. And some problems occur in them. Therefore we solve these problems in the rule shown above. So i need a script for simplify the deployment work... !?

Sincerely,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic