Demo
<project name="copydir" default="Copydir" basedir=".">
<property name="src" value="WEB-INF" />
<property name="dist" value="dist" />
<target name="Copydir">
<copydir src="${src}"
dest="${dist}"
includes="**/*.*"
excludes="**/web.xml"
/>
</target>
</project>
result:
WEB-INF: tld/ and 5 files (total 10 files)
dist: tld/ and 4 files (loại file web.xml)
YES!!!CHEER!!
Nhưng đoạn code này lại không exclude file web.xml
<!– Create deployable war file –>
<target name=”war” depends=”compile” description=”Packages app as WAR”>
<mkdir dir=”${dist.dir}” />
<war destfile=”${dist.dir}/HelloWorldPortlet.war”
webxml=”${web.dir}/WEB-INF/web.xml”>
<classes dir=”${build.dir}/classes”/><!– Include compiled classes –>
<fileset dir=”${web.dir}” ><!– Include jsp pages –>
<include name=”**/*.*” />
<exclude name=”**/web.xml” />
</fileset>
<lib dir=”${lib.dir}”><!– Include lib jars –>
<exclude name=”**/j2ee.jar” />
</lib>
</war>
</target>
Không hiểu ?
Cuối cùng cũng xong, ngốc thật
Không có nhận xét nào:
Đăng nhận xét