Ant
From Resin 3.0
(Difference between revisions)
(added new deploy tasks) |
(updated deploy tasks) |
||
Line 22: | Line 22: | ||
</project> | </project> | ||
− | = | + | = Deployment tasks = |
− | Resin 4 will include an Ant deploy client that can deploy applications to a Resin cloud. | + | == resin-upload-war == |
+ | |||
+ | Resin 4.0.2 will include an Ant deploy client that can deploy applications to a Resin cloud. | ||
<?xml version="1.0"?> | <?xml version="1.0"?> | ||
Line 30: | Line 32: | ||
<property name="resin.home" value="/usr/share/resin"/> | <property name="resin.home" value="/usr/share/resin"/> | ||
<target name="test"> | <target name="test"> | ||
− | <taskdef name="resin- | + | <taskdef name="resin-upload-war" classname="com.caucho.ant.ResinUploadWar"> |
<classpath> | <classpath> | ||
<fileset dir="${resin.home}"> | <fileset dir="${resin.home}"> | ||
Line 39: | Line 41: | ||
</taskdef> | </taskdef> | ||
− | <resin- | + | <resin-upload-war server="localhost" |
port="8080" | port="8080" | ||
user="admin" | user="admin" | ||
Line 48: | Line 50: | ||
To deploy an application with a version, use the "version" attribute: | To deploy an application with a version, use the "version" attribute: | ||
− | <resin- | + | <resin-upload-war server="localhost" |
port="8080" | port="8080" | ||
user="admin" | user="admin" | ||
Line 55: | Line 57: | ||
version="1.0"/> | version="1.0"/> | ||
− | To | + | To place an application into another stage before deploying it to production, set the stage attribute: |
− | <resin- | + | <resin-upload-war server="localhost" |
port="8080" | port="8080" | ||
user="admin" | user="admin" | ||
password="myadminpass" | password="myadminpass" | ||
warFile="cloudapp.war" | warFile="cloudapp.war" | ||
− | + | stage="preview"/> | |
− | == resin- | + | == resin-copy-tag == |
− | To | + | To copy a tag, use the "resin-copy-tag" task: |
<?xml version="1.0"?> | <?xml version="1.0"?> | ||
Line 70: | Line 72: | ||
<property name="resin.home" value="/usr/share/resin"/> | <property name="resin.home" value="/usr/share/resin"/> | ||
<target name="test"> | <target name="test"> | ||
− | <taskdef name="resin- | + | <taskdef name="resin-copy-tag" classname="com.caucho.ant.ResinCopyTag"> |
<classpath> | <classpath> | ||
<fileset dir="${resin.home}"> | <fileset dir="${resin.home}"> | ||
Line 79: | Line 81: | ||
</taskdef> | </taskdef> | ||
− | <resin- | + | <resin-copy-tag server="localhost" |
− | + | port="8080" | |
− | + | user="admin" | |
− | + | password="myadminpass" | |
− | + | stage="default" | |
+ | contextRoot="cloudapp" | ||
+ | sourceStage="preview"/> | ||
</target> | </target> | ||
</project> | </project> | ||
− | == resin- | + | Copying tags can be used to move applications between stages, to affect the "head" version of a webapp, or to change the name of a webapp. |
− | To | + | |
+ | == resin-delete-tag == | ||
+ | To delete a tag, use the "resin-delete-tag" task: | ||
<?xml version="1.0"?> | <?xml version="1.0"?> | ||
Line 94: | Line 100: | ||
<property name="resin.home" value="/usr/share/resin"/> | <property name="resin.home" value="/usr/share/resin"/> | ||
<target name="test"> | <target name="test"> | ||
− | <taskdef name="resin- | + | <taskdef name="resin-delete-tag" classname="com.caucho.ant.ResinDeleteTag"> |
<classpath> | <classpath> | ||
<fileset dir="${resin.home}"> | <fileset dir="${resin.home}"> | ||
Line 103: | Line 109: | ||
</taskdef> | </taskdef> | ||
− | <resin- | + | <resin-delete-tag server="localhost" |
− | + | port="8080" | |
− | + | user="admin" | |
− | + | password="myadminpass" | |
− | + | stage="preview" | |
+ | contextRoot="cloudapp"/> | ||
</target> | </target> | ||
</project> | </project> | ||
− | + | == resin-query-tags == | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | == resin- | + | |
− | + | ||
<?xml version="1.0"?> | <?xml version="1.0"?> | ||
Line 123: | Line 124: | ||
<property name="resin.home" value="/usr/share/resin"/> | <property name="resin.home" value="/usr/share/resin"/> | ||
<target name="test"> | <target name="test"> | ||
− | <taskdef name="resin- | + | <taskdef name="resin-query-tags" classname="com.caucho.ant.ResinQueryTags"> |
<classpath> | <classpath> | ||
<fileset dir="${resin.home}"> | <fileset dir="${resin.home}"> | ||
Line 132: | Line 133: | ||
</taskdef> | </taskdef> | ||
− | <resin- | + | <resin-query-tags server="localhost" |
− | + | port="8080" | |
− | + | user="admin" | |
− | + | password="myadminpass" | |
− | + | contextRoot="cloudapp"/> | |
− | + | ||
</target> | </target> | ||
</project> | </project> |
Revision as of 18:39, 22 September 2009
Contents |
resin-jspc
Resin 3.1.5 includes a resin-ant.jar in ${resin.home}/plugins/resin-ant.jar with several useful task:
<project name="test" default="test" basedir="."> <property name="resin.home" value="/usr/local/share/resin"/> <target name="test"> <taskdef name="resin-jspc" classname="com.caucho.ant.Jspc"> <classpath> <fileset dir="${resin.home}"> <include name="plugins/resin-ant.jar"/> <include name="lib/*.jar"/> </fileset> </classpath> </taskdef> <resin-jspc rootDirectory="/home/ferg/ws/dist/my-webapp"/> </target> </project>
Deployment tasks
resin-upload-war
Resin 4.0.2 will include an Ant deploy client that can deploy applications to a Resin cloud.
<?xml version="1.0"?> <project name="test" default="test" basedir="."> <property name="resin.home" value="/usr/share/resin"/> <target name="test"> <taskdef name="resin-upload-war" classname="com.caucho.ant.ResinUploadWar"> <classpath> <fileset dir="${resin.home}"> <include name="lib/*.jar"/> <include name="plugins/resin-ant.jar"/> </fileset> </classpath> </taskdef> <resin-upload-war server="localhost" port="8080" user="admin" password="myadminpass" warFile="cloudapp.war"/> </target> </project>
To deploy an application with a version, use the "version" attribute:
<resin-upload-war server="localhost" port="8080" user="admin" password="myadminpass" warFile="cloudapp.war" version="1.0"/>
To place an application into another stage before deploying it to production, set the stage attribute:
<resin-upload-war server="localhost" port="8080" user="admin" password="myadminpass" warFile="cloudapp.war" stage="preview"/>
resin-copy-tag
To copy a tag, use the "resin-copy-tag" task:
<?xml version="1.0"?> <project name="test" default="test" basedir="."> <property name="resin.home" value="/usr/share/resin"/> <target name="test"> <taskdef name="resin-copy-tag" classname="com.caucho.ant.ResinCopyTag"> <classpath> <fileset dir="${resin.home}"> <include name="lib/*.jar"/> <include name="plugins/resin-ant.jar"/> </fileset> </classpath> </taskdef> <resin-copy-tag server="localhost" port="8080" user="admin" password="myadminpass" stage="default" contextRoot="cloudapp" sourceStage="preview"/> </target> </project>
Copying tags can be used to move applications between stages, to affect the "head" version of a webapp, or to change the name of a webapp.
resin-delete-tag
To delete a tag, use the "resin-delete-tag" task:
<?xml version="1.0"?> <project name="test" default="test" basedir="."> <property name="resin.home" value="/usr/share/resin"/> <target name="test"> <taskdef name="resin-delete-tag" classname="com.caucho.ant.ResinDeleteTag"> <classpath> <fileset dir="${resin.home}"> <include name="lib/*.jar"/> <include name="plugins/resin-ant.jar"/> </fileset> </classpath> </taskdef> <resin-delete-tag server="localhost" port="8080" user="admin" password="myadminpass" stage="preview" contextRoot="cloudapp"/> </target> </project>
resin-query-tags
<?xml version="1.0"?> <project name="test" default="test" basedir="."> <property name="resin.home" value="/usr/share/resin"/> <target name="test"> <taskdef name="resin-query-tags" classname="com.caucho.ant.ResinQueryTags"> <classpath> <fileset dir="${resin.home}"> <include name="lib/*.jar"/> <include name="plugins/resin-ant.jar"/> </fileset> </classpath> </taskdef> <resin-query-tags server="localhost" port="8080" user="admin" password="myadminpass" contextRoot="cloudapp"/> </target> </project>