<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Quickly Redeploying Grails Apps</title>
	<link>http://www.spenceruresk.com/2008/07/02/quickly-redeploying-grails-apps/</link>
	<description>Random posts about Java, software development, politics, and economics</description>
	<pubDate>Sat, 22 Nov 2008 08:22:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.1</generator>

	<item>
		<title>by: suresk</title>
		<link>http://www.spenceruresk.com/2008/07/02/quickly-redeploying-grails-apps/#comment-20599</link>
		<pubDate>Thu, 03 Jul 2008 02:56:37 +0000</pubDate>
		<guid>http://www.spenceruresk.com/2008/07/02/quickly-redeploying-grails-apps/#comment-20599</guid>
					<description>Yes, I first used simple bash scripts as well. I started working on groovy scripts because it makes it more portable and using the groovy scripts becomes more useful as I do more with the deployment stuff. 

I didn't use Cargo because I have some big plans for my deployment plugin, and it didn't look like I'd be able to cleanly leverage much of Cargo. Might be worth another look though.</description>
		<content:encoded><![CDATA[<p>Yes, I first used simple bash scripts as well. I started working on groovy scripts because it makes it more portable and using the groovy scripts becomes more useful as I do more with the deployment stuff. </p>
<p>I didn&#8217;t use Cargo because I have some big plans for my deployment plugin, and it didn&#8217;t look like I&#8217;d be able to cleanly leverage much of Cargo. Might be worth another look though.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Malek</title>
		<link>http://www.spenceruresk.com/2008/07/02/quickly-redeploying-grails-apps/#comment-20570</link>
		<pubDate>Wed, 02 Jul 2008 14:44:23 +0000</pubDate>
		<guid>http://www.spenceruresk.com/2008/07/02/quickly-redeploying-grails-apps/#comment-20570</guid>
					<description>Good idea, I personally use a bash script for updating source code and redeploying my war in tomcat :

maybe you wish to check (and use) this project http://cargo.codehaus.org/Quick+start , since it seems to handle many containers in a standard way.

here's my bash script :

#!/bin/bash
sudo /etc/init.d/tomcat stop
#just in case of pending process
sudo killall -u tomcat java
cd $MY_SVN_WORKING_COPY
svn update
grails prod war
sudo rm -R /usr/local/tomcat/webapps/$WEBAPP_NAME/
#optional
sudo rm -R /usr/local/tomcat/logs/*
sudo cp /usr/local/tomcat/webapps/$WEBAPP_NAME.war $ARCHIVE_DIR/webapps/$WEBAPP_NAME.war.old
sudo cp ./$WEBAPP_NAME-$(cat application.properties &amp;#124; grep &quot;app.version&quot; &amp;#124; awk '{split($0,a,&quot;=&quot;); split(a[2],b,&quot;\r&quot;); print b[1]}').war /usr/local/tomcat/webapps/$WEBAPP_NAME.war
sudo chown tomcat:tomcat /usr/local/tomcat/webapps/$WEBAPP_NAME.war
sudo /etc/init.d/tomcat start
#End of script



Regards</description>
		<content:encoded><![CDATA[<p>Good idea, I personally use a bash script for updating source code and redeploying my war in tomcat :</p>
<p>maybe you wish to check (and use) this project <a href='http://cargo.codehaus.org/Quick+start' rel='nofollow'>http://cargo.codehaus.org/Quick+start</a> , since it seems to handle many containers in a standard way.</p>
<p>here&#8217;s my bash script :</p>
<p>#!/bin/bash<br />
sudo /etc/init.d/tomcat stop<br />
#just in case of pending process<br />
sudo killall -u tomcat java<br />
cd $MY_SVN_WORKING_COPY<br />
svn update<br />
grails prod war<br />
sudo rm -R /usr/local/tomcat/webapps/$WEBAPP_NAME/<br />
#optional<br />
sudo rm -R /usr/local/tomcat/logs/*<br />
sudo cp /usr/local/tomcat/webapps/$WEBAPP_NAME.war $ARCHIVE_DIR/webapps/$WEBAPP_NAME.war.old<br />
sudo cp ./$WEBAPP_NAME-$(cat application.properties | grep &#8220;app.version&#8221; | awk &#8216;{split($0,a,&#8221;=&#8221;); split(a[2],b,&#8221;\r&#8221;); print b[1]}&#8217;).war /usr/local/tomcat/webapps/$WEBAPP_NAME.war<br />
sudo chown tomcat:tomcat /usr/local/tomcat/webapps/$WEBAPP_NAME.war<br />
sudo /etc/init.d/tomcat start<br />
#End of script</p>
<p>Regards
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
