- <?xml version="1.0" encoding="UTF-8"?>
- <project basedir="." default="dist" name="DataManagePlatform">
- <property name="wrapper.location" value="WebRoot"/>
- <property environment="env"/>
- <property name="java.home" value="${env.JAVA_HOME}"/>
- <property name="ant.home" value="${env.ANT_HOME}"/>
- <property name="project.name" value="DataManagePlatform"/>
- <property name="project.version" value="1.0"/>
- <property name="src.dir" value="src" />
- <property name="classes.dir" value="classes" />
- <property name="conf.dir" value="${src.dir}/conf" />
- <property name="lib.dir" value="WebRoot/WEB-INF/lib" />
- <property name="dist.dir" value="preoutput" />
- <property name="output.dir" value="output" />
- <property name="dist.name" value="DataManagePlatform"/>
- <property name="doc.dir" value="doc"/>
- <property name="web.dir" value="WebRoot"/>
- <path id="project.classpath">
- <pathelement path="${lib.dir}"/>
- <fileset dir="${lib.dir}"><include name="**/*.jar"/></fileset>
- <pathelement location="classes"/>
- </path>
- <target name="init">
- <echo message="${ant.project.name}: ${ant.file}"/>
- <mkdir dir="${dist.dir}/WebRoot/WEB-INF/classes"/>
- </target>
- <target name="clean">
- <delete dir="${dist.dir}"/>
- <delete dir="${output.dir}"/>
- </target>
- <target depends="init" name="build">
- <javac destdir="${dist.dir}/WebRoot/WEB-INF/classes" deprecation="true" encoding="utf-8">
- <src path="${src.dir}"/>
- <classpath refid="project.classpath"/>
- </javac>
- <copy todir="${dist.dir}/WebRoot">
- <fileset dir="${web.dir}"/>
- </copy>
- <copy todir="${dist.dir}/WebRoot/WEB-INF/classes/">
- <fileset dir="${src.dir}/">
- <include name="**/*.properties"/>
- <include name="**/*.xml"/>
- </fileset>
- </copy>
- </target>
- <target depends="build" name="dist">
- <mkdir dir="${output.dir}" />
- <war warfile="${output.dir}/${dist.name}.war" basedir="${dist.dir}/WebRoot" webxml="WebRoot
- /WEB-INF/web.xml" />
- <delete dir="${dist.dir}" />
- </target>
- </project>
ant 打war包
最新推荐文章于 2024-05-22 10:14:10 发布