首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

ant 有关build -web程序-引用外部包

2012-07-02 
ant相关build --web程序--引用外部包?xml version1.0?!--指定项目打成war包--project namewosha

ant 相关build --web程序--引用外部包

<?xml version="1.0"?>

<!--指定项目打成war包-->
<project name="woshare" default="makewar" basedir=".">
??? <description>
??????? Application build file.
</description>

?

<!-- 相关资源文件 -->
??? <property name="project.lib" location="${basedir}/WebRoot/WEB-INF/lib" />
??? <property name="project.tomcat.lib" location="${basedir}/tomcatLib" />
??? <property name="project.src" location="${basedir}/src" />
??? <property name="project.webroot" location="${basedir}/WebRoot" />
??? <property name="project.build" location="${basedir}/WebRoot/WEB-INF" />
??? <property name="warName" value="woshare.war" />
??? <property environment="env" />

??? <!-- =================================
????????? target: clean????????????
???????? ================================= -->
??? <target name="clean" description="--> description">
??? ??? <echo message="WARN:You mast run shell 'mkdir -p /opt/woshare'" />
??? ??? <delete dir="${project.build}/classes" />
??? ??? <mkdir dir="${project.build}/classes" />
??? </target>


??? <!-- =================================
????????? target: compile????????????
???????? ================================= -->
??? <target name="compile" depends="clean" description=" description">
??? ??? <javac destdir="${project.build}/classes" memorymaximumsize="512m" source="1.6" target="1.6" failonerror="true" encoding="utf-8" srcdir="${project.src}" fork="true" debug="true">
??? ??? ??? <classpath>
??? ??? ??? ??? <fileset dir="${project.lib}" />
??? ??? ??? ??? <fileset dir="${project.tomcat.lib}" />
??? ??? ??? </classpath>
??? ??? </javac>
??? ??? <copy todir="${project.build}/classes">
??? ??? ??? <fileset dir="${project.src}">
??? ??? ??? ??? <include name="*.xml" />
??? ??? ??? ??? <include name="*.properties" />
??? ??? ??? </fileset>
??? ??? </copy>
??? ??? <copy todir="${project.build}/classes/com/woshare/entity">
??? ??? ??? <fileset dir="${project.src}/com/woshare/entity">
??? ??? ??? ??? <include name="*.xml" />
??? ??? ??? ??? <include name="*.properties" />
??? ??? ??? </fileset>
??? ??? </copy>
??? </target>

??? <target name="makewar" depends="compile">
??? ??? <war warfile="${basedir}/${warName}" webxml="${project.build}/web.xml">
??? ??? ??? <fileset dir="${project.webroot}" />
??? ??? </war>
??? </target>

</project>

热点排行