l_walker
发贴: 43
积分: 10
|
于 2004-07-19 13:20
参考一下,你可以将注释部分修改成你需要的
<!-- ============================================== --> <!-- Generate war file --> <!-- ============================================== --> <target name="war" depends="jar,-init-j2ee,gen-webxml,i18n" description="Generate war file."> <!--define properties and directory--> <property name="war.name" value="${app.release.name}.war"/> <property name="war.dist.dir" value="${app.dist.dir}/${DSTAMP}"/> <mkdir dir="${war.dist.dir}"/> <echo>+ ===================================================== +</echo> <echo>+ +</echo> <echo>+ Generating war file: +</echo> <echo>+ ${war.name} </echo> <echo>+ +</echo> <echo>+ ===================================================== +</echo>
<war destfile="${war.dist.dir}/${war.name}" webxml="${app.web.webinf}/web.xml" index="true"> <!-- /WEB-INF/ most are configuration files. <webinf dir="${app.web.webinf}"> <exclude name="web.xml" /> <exclude name="**/tmp/*" /> <exclude name="**/work/*" /> <exclude name="**/lib/**/* "/> </webinf>--> <!-- <lib dir="${app.lib.runtime}" includes="*.jar" /> <lib dir="${app.web.lib}" includes="*.jar" />-->
<!-- Class files without java class files,the class files packaged in the jar file in web-inf/lib. and here just contain the property and xml files under ${app.build.classes} directory,such as hibernate.properties log4j.properties/or log4j.xml and others --> <classes dir="${app.build.classes}"> <include name="*.properties" /> <include name="*.xml" /> <exclude name="**/*Test.class" /> </classes> <fileset dir="${app.web.dir}"> <exclude name="**/WEB-INF/*" /> </fileset> </war> </target>
|