You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jeff Emminger <je...@jeffemminger.com> on 2004/02/15 04:13:30 UTC

tapestry deploy.xml


Re: tapestry deploy.xml

Posted by Jeff Emminger <je...@jeffemminger.com>.
sorry...not paying attention to where i'm sending things.

honestly, if my head wasn't screwed on...

Jeff Emminger wrote:

> 
> 
> ------------------------------------------------------------------------
> 
> <?xml version="1.0"?>
> <project name="ServletDeploy" default="Build_All">
>    <!--
>       This ANT script does NOT compile the application,
>       we are relying on Eclipse to do all Java compilation.
>       This script merely deploys the application to Tomcat.
>       
>       This script will work with Tomcat 4.0, but Tapestry
>       says it requires Tomcat 4.1, so make sure you have
>       Tomcat 4.1 running.
> 
>       You will need Tomcat manager running and working
>       login for Tomcat manager. To create a user for
>       Tomcat manager, edit the file
>       
>          <tomcat>\conf\tomcat-users.xml
>          
>       and add a line for the desired user, such as
>       
>         <user 
>            username="username" 
>            password="password" 
>            fullName="Your Fullname" 
>            roles="manager"/>
> 
>       If it is not already there, you may want a to add 
>       the manager role above the user line... such as
>       
>          <role rolename="manager"/>
>    
>       This script was designed to deploy a Tapestry servlet
>       application using Tomcat 4.1+. This script assumes
>       that the project is laid out how Spindle lays out 
>       applications. All that should need to be modified 
>       is the few lines near the top...
>       
>       	application
>       	tomcatHome
>       	workspaceHome
>       	mgrUsername
>       	mgrPassword
>       	
>      Using the manager to install/remove applications keeps
>      you from having to stop and restart Tomcat every time
>      you need to update your application.
>    -->
>    <property name="application" value="your/app/name" />
>    <property name="tomcatHome" value="your/path/to/tomcat" />
>    <property name="workspaceHome" value="path/to/your/workspace" />
>    <property name="mgrUsername" value="yourUsername" />
>    <property name="mgrPassword" value="yourPassword" />
> 
>    <property name="webappsHome" value="${tomcatHome}/webapps" />
>    <property name="appHome" value="${webappsHome}/${application}" />
>    <property name="contextHome" value="${workspaceHome}/${application}/context" />
>    <property name="deployWarsDir" value="${workspaceHome}/${application}/DeployWars" />
>    <property name="mgrUrl" value="http://localhost:8080/manager" />
>    <property name="mgrRemoveUrl" value="${mgrUrl}/remove" />
>    <property name="mgrDeployUrl" value="${mgrUrl}/install" />
> 
>    <target name="Deploy_to_LocalDev">        
>       <!-- LocalDev deploys right into the local tomcat -->
>       <mkdir dir="${deployWarsDir}/local-dev" /> 
>       <delete file="${deployWarsDir}/local-dev/${application}.war" />
>       <war
>         duplicate="preserve"
>       	destfile="${deployWarsDir}/local-dev/${application}.war"
>       	webxml="${contextHome}/WEB-INF/web.xml">
>       	<classes dir="${contextHome}/WEB-INF/classes" />
>       	<fileset dir="${contextHome}">
>       	   <include name="*" />
>       	   <include name="images/*" />
>       	   <include name="WEB-INF/*.page" />
>       	   <include name="WEB-INF/*.application" />
>       	   <include name="WEB-INF/*.jwc" />
>       	   <include name="WEB-INF/*.html" />
>       	</fileset>
>       </war>
> 
>       <!-- Deploy to Tomcat 4.1 -->
>       <!-- NOTE: The remaineder of this installation requires the Tomcat 4.0+
>            manager be running and the build will fail if it is not. -->
>       <!-- Remove the application -->
>       <delete file="deploy-local-remove.txt" />
>       <get
>          src="${mgrRemoveUrl}?path=/${application}"
>          dest="deploy-local-remove.txt"
>          username="${mgrUsername}" 
>          password="${mgrPassword}" />
>       <loadfile property="deploy.local.remove.result"
>          srcFile="deploy-local-remove.txt" />
>       <echo>${deploy.local.remove.result}</echo>
>       <delete file="deploy-local-remove.txt" />
> 
>       <!-- Remove the directory containing the old version of the application -->
>       <!--
>       <delete dir="${webappsHome}/${application}" />
>       -->
>       <unzip 
>          src="${deployWarsDir}/local-dev/${application}.war"
>          dest="${webappsHome}/${application}" />
>          
>       <!-- Install the application -->
>       <delete file="deploy-local-remove.txt" />
>       <property name="mgrDeployParams"
>          value="path=/${application}&amp;war=file://${webappsHome}/${application}/" />
>       <get
>          src="${mgrDeployUrl}?${mgrDeployParams}"
>          dest="deploy-local-remove.txt"
>          username="${mgrUsername}" 
>          password="${mgrPassword}" />
>       <loadfile property="deploy.local.remove.resultb"
>          srcFile="deploy-local-remove.txt" />
>       <echo>${deploy.local.remove.resultb}</echo>
>       <delete file="deploy-local-remove.txt" />
>    </target> 
> 
>    <target name="Build_All" depends="Deploy_to_LocalDev" />
> 
> </project>
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org