I don't know if these will be useful to anyone else but I thought I'd 
toss 'em out for comment just in case:

<project default="java:compile"
         xmlns:j="jelly:core"
         xmlns:define="jelly:define"
         xmlns:deploy="deploy"
         xmlns:jmx="jmx"
         >
...
  <!-- Create new jmx tasks for (un)deploying things -->
  <define:taglib uri="jmx">
    <!-- <jmx:deploy jmx.deploy.file="file:/path/to/something.war"/>  -->
    <!-- undeploys then redeploys jmx.deploy.file                     -->
    <!-- expects jmx.url.deploy to be set something like this:        -->
    <!-- 
http://localhost:8082/InvokeAction//jboss.system:service=MainDeployer/action=deploy?java.lang.String%2Bjava.lang.String=
 
-->
    <define:tag name="deploy">
      <j:set var="jmx.url.deploy" 
value='${context.getVariable("jmx.url.deploy")}'/>
      <jmx:undeploy jmx.deploy.file="${jmx.deploy.file}"/>
      <get dest="deploy.log" 
src="${jmx.url.deploy}file:${jmx.deploy.file}"/>
    </define:tag>
   
    <!-- <jmx:uneploy jmx.deploy.file="file:/path/to/something.war"/> -->
    <!-- undeploys jmx.deploy.file                                    -->
    <!-- expects jmx.url.undeploy to be set something like this:      -->
    <!-- 
http://localhost:8082/InvokeAction//jboss.system:service=MainDeployer/action=undeploy?java.lang.String%2Bjava.lang.String=
 
-->
    <define:tag name="undeploy">
      <j:set var="jmx.url.undeploy" 
value='${context.getVariable("jmx.url.undeploy")}'/>
      <get dest="deploy.log" 
src="${jmx.url.undeploy}file:${jmx.deploy.file}"/>
    </define:tag>
  </define:taglib> <!-- <define:taglib uri="jmx"> -->
 
  <goal name="deploy-build"
        description="Deploys the exploded war directory in 
${webapp.test.dir}">
    <attainGoal name="war:webapp"/>
    <jmx:deploy jmx.deploy.file="${webapp.test.dir}/${maven.war.name}.war"/>
  </goal>
  <goal name="undeploy-build" 
        description="Undeploys the exploded war directory in 
${webapp.test.dir}">
    <jmx:undeploy 
jmx.deploy.file="${webapp.test.dir}/${maven.war.name}.war"/>
  </goal>

  <goal name="deploy-site"
        description="Deploys the exploded war directory in 
${webapp.test.dir}">
    <attainGoal name="site:generate"/>
    <jmx:deploy 
jmx.deploy.file="${webapp.test.dir}/${maven.war.name}-site.war"/>
  </goal>
  <goal name="undeploy-site" 
        description="Undeploys the exploded war directory in 
${webapp.test.dir}">
    <jmx:undeploy 
jmx.deploy.file="${webapp.test.dir}/${maven.war.name}-site.war"/>
  </goal>

</project>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to