<?xml version="1.0" encoding="UTF-8"?>
<project name="springapp" basedir="." default="compile">
<property environment="SystemVariable" />
<property file="build.properties" />
<path id="master-classpath">
<fileset dir="${web.dir}/WEB-INF/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${server.lib}">
<include name="servlet*.jar" />
</fileset>
<pathelement path="${build.dir}" />
</path>
<target name="create.build.dir">
<mkdir dir="${build.dir}" />
</target>
<target name="remove.build.dir">
<delete includeemptydirs="true">
<fileset dir="${build.dir}" />
</delete>
</target>
<target name="compile" depends="">
<javac destdir="${build.dir}" encoding="UTF-8" debug="true" deprecation="true" optimize="true" failonerror="true">
<src path="${src.dir}" />
<classpath refid="master-classpath" />
</javac>
</target>
<target name="build">
<jar destfile="WEB-INF/lib/custom-lib.jar" basedir="${build.dir}">
<manifest>
<attribute name="Build-By" value="${author}" />
</manifest>
</jar>
</target>
<target name="deploy" depends="build" description="Deploy application">
<copy todir="${deploy.path}/${name}" preservelastmodified="true">
<fileset dir="${web.dir}">
<include name="**/*.*" />
</fileset>
</copy>
</target>
<target name="deploywar" depends="build,delete.war.file" description="Deploy application as a WAR file">
<war destfile="${name}.war" webxml="${web.dir}/WEB-INF/web.xml">
<fileset dir="${web.dir}">
<include name="**/*.*" />
</fileset>
</war>
<copy todir="${deploy.path}" preservelastmodified="true">
<fileset dir=".">
<include name="*.war" />
</fileset>
</copy>
</target>
<target name="delete.war.file">
<echo message="delete deploy war file" />
<delete file="${deploy.path}/${name}.war" />
</target>
<target name="delete.war.dir">
<echo message="delete deploy dir" />
<delete dir="${deploy.path}/${name}" />
</target>
</project>
=======================================================================
author=taink
server.home=${SystemVariable.TOMCAT_HOME}
server.lib=${server.home}/lib
src.dir=src
web.dir=WebContent
build.dir=classes
projectname=mvc
deploy.path=${server.home}/webapps
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project name="springapp" basedir="." default="deploy">
<property environment="SystemVariable" />
<property file="build.properties" />
<property name="author" value="taink" />
<tstamp>
<format property="dstamp" pattern="MM-dd-yyyy HH:mm:ss" />
</tstamp>
<path id="master-classpath">
<fileset dir="${web.dir}/WEB-INF/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${server.lib}">
<include name="servlet*.jar" />
</fileset>
<pathelement path="${build.dir}" />
</path>
<target name="compile" description="compile , compression jar file">
<javac destdir="../mvc-model/bin" srcdir="../mvc-model/src" debug="ture" encoding="UTF-8" />
<jar destfile="${web.dir}/WEB-INF/lib/mvc.jar" basedir="../mvc-model/bin">
<manifest>
<attribute name="Build-Date" value="${dstamp}" />
<attribute name="Build-By" value="${user.name}" />
</manifest>
</jar>
</target>
<target name="deploy" depends="compile,delete.war.file">
<war destfile="${projectname}.war" webxml="${web.dir}/WEB-INF/web.xml">
<fileset dir="${web.dir}">
<include name="**/*.*" />
</fileset>
</war>
<copy todir="${deploy.path}">
<fileset dir=".">
<include name="*.war" />
</fileset>
</copy>
</target>
<target name="delete.war.file">
<echo message="delete deploy war file" />
<delete file="${deploy.path}/${projectname}.war" />
</target>
<target name="delete.war.dir">
<echo message="delete deploy dir" />
<delete dir="${deploy.path}/${projectname}" />
</target>
</project>
分享到:
相关推荐
apache-ant-1.9.16-bin.zip
开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6开发工具 ant-1.9.6...
apache-ant-1.6.5-bin ant编译
ant.jar,ant-junit.jar,ant-launcher.jar,ant-trax.jar
例如解压到E:\学习类\apache-ant-1.8.2, 2、配置环境变量。在系统环境变量中新建一个ANT_HOME 的变量,值为D:\apache-ant-1.10.1。在path 变量中添加 %ANT_HOME%\bin; 如果没有path变量,则新建一个。 3、验证ant...
标签:ant-launcher-1.8.3.jar,ant,launcher,1.8.3,jar包下载,依赖包
apache-ant-1.6.5-bin 具体详细信息察看readme.txt
apache-ant-1.9.2-bin.zip
开发工具 ant-launcher-1.9.6开发工具 ant-launcher-1.9.6开发工具 ant-launcher-1.9.6开发工具 ant-launcher-1.9.6开发工具 ant-launcher-1.9.6开发工具 ant-launcher-1.9.6开发工具 ant-launcher-1.9.6开发工具 ...
ant中使用jmeter task,需要的“ant-jmeter-1.1.1.jar”jar包 放到ant的classpath下就好了
apache-ant-1.10.12-bin.tar.gz
ant 安装包 新版本 可以尝试下 官网版本 apache-ant-1.10.3-bin.zip
标签:ant-1.6.5.jar.zip,ant,1.6.5,jar.zip包下载,依赖包
有的小伙伴在离线VS2019安装包的时候会遇到一个包下载失败,就是这个apache-ant-1.9.3-bin.zip,下载以后解压,把apache-ant-1.9.3-bin.zip放到VS2019的缓存目录里就可以了。
还在为找不到jar文件烦心吗,不用了到我空间来有你想要的,持续更新。。。 maven-ant-tasks.jar
apache-ant-1.10.1-bin.zip 【windows版,32位和64位通用】
标签:ant-apache-bcel.jar.zip,ant,apache,bcel,jar.zip包下载,依赖包
apache-ant-1.9.2 源码,内容详实,情节丰富,欢迎下载。
vuex2.x中用于设置ant-design-vue中table组件的列宽可拖拽
最新版linux apache-ant-1.9.15-bin.tar.gz