0
我想在構建過程中將一個文件複製到多個目錄。將單個文件複製到Ant中的多個目錄
在${prop.fmt}
的價值有兩個目錄,我只想一個WAR文件複製到這兩個目錄:
/apps/phxadmin-dev/devd/ui_tomcats/tomcat_c345tczuwdvd2/webapps
/apps/phxadmin-dev/devd/ui_tomcats/tomcat_c404gxduwdvd1/webapps
我的Ant腳本:
<target name="test" >
<dirset id="dir.name" dir="${phx.tomcat.dir}" includes="*/webapps"/>
<property name="prop.dist.contents" refid="dir.name"/>
<loadresource property="prop.fmt">
<string value="${prop.dist.contents}"/>
<filterchain>
<tokenfilter>
<replaceregex pattern=";" replace="${line.separator}" flags="g"/>
</tokenfilter>
<prefixlines prefix="${phx.tomcat.dir}/" />
</filterchain>
</loadresource>
<echo message="${prop.fmt}"/>
<copy file="${phx.deploy.dir}/${war.file.name}" todir="${prop.fmt}"/>
</target>
請某人能幫助我嗎?