capint
2/21/2016 - 5:17 PM

Ant >> Deploy war

Ant >> Deploy war

<?xml version="1.0" encoding="UTF-8"?>
<project default="warTarget" basedir=".">
  <property name="jboss" value="C:/Path/To/JBoss/jbos-as-7.1.1.Final"/>
  <property name="jboss.deployment" value="${jboss}/standalone/deployment"/>
  <property name="base" value="."/>
  <property name="source" value="${base}/src"/>
  <target name="warTarget">
    <war warfile="warfile.war" needxmlfile="false">
      <fileset dir="${source}/webFiles"/>
    </war>
    <antcall target="deployTarget"/>
  </target>
  <target name="deployTarget">
    <copy file="${base}/warfile.war" todir="${jboss.deployment}"/>
  </target>
</project>
web-project
  src
    webFiles
      demo.jsp
  build.xml