zoukankan      html  css  js  c++  java
  • ant task to deploy/undeploy war on jboss

    JBoss AS7 has a deployment scanner enabled by default, so you can just copy the war file to ${jboss.home}/standalone/deployments and it will automatically be deployed, ie:

    <copy file="${war.path}" todir="${jboss.home}/standalone/deployments"/>      
    (
    We can just use this sentence to deploy war whatever it exists.)

    Once the war is deployed, a file called ${war.filename}.war.deployed will appear in the deployments directory. To undeploy a war, delete the related .deployed file, ie:

    <delete file="${jboss.deployments.dir}/${war.filename}.war.deployed"/>

    Once the war has been undeployed, there will be a file called ${jboss.deployments.dir}/${war.filename}.war.undeployed in the deployments directory.

    To prompt a redeployment, you can either delete the .undeployed file, or create a file with the same name as the war and a .dodeploy extension, ie:

    <touch file="${jboss.deployments.dir}/${war.filename}.war.dodeploy"/>

    This StackOverflow post has an example of an Ant task for an undeploy followed by a deploy.

    Obviously, for the above to work you need to declare the various properties used somewhere, ie:

    <property name="war.filename" value="mywar"/>
    <property name="war.path" value="dir/mywar.war"/>
    <property name="jboss.deployments.dir" value="${jboss.home}/standalone/deployments"/>
  • 相关阅读:
    php中的md5()的安全问题
    爆破之中文转换成字母脚本
    MYSQL数据库封装类
    SQL执行结果操作
    原生和jquery 的 ajax
    Ajax实例OR技术原理 转自 (http://blog.csdn.net/evankaka )
    JQuery常用事件
    分页原理
    JQuery中$.ajax()方法参数
    session和cookie的作用和原理
  • 原文地址:https://www.cnblogs.com/wangle1001986/p/3135496.html
Copyright © 2011-2022 走看看