属性标记中未覆盖值

时间:2019-07-18 07:42:32

标签: build.xml

我正在从多个文件夹读取文件名。我正在动态传递文件夹名称。但属性标记中的值始终显示旧文件夹。

我尝试了一些行不通的解决方法

     <loadfile property="textFile" srcfile="D:/ServiceEndPointURL/DEV/URLProvider.properties"/>
     <dirset id="foldernamesList" dir="D:\servicezipbackup\116\TMBMIB\Apps\_Integration" includes="*"/>
<property name="folderNames" refid="foldernamesList"/>
        <for param="serviceName" list="${folderNames}" delimiter=";">

          <sequential>
          <echo message="@{serviceName}:::"/>

          <!--property name="xmlFileNames" value="D:/servicezipbackup/116/TMBMIB/Apps/_Integration/@{serviceName}/1.0/Operations"/-->
           <property name="xmlFileNames" value="D:/servicezipbackup/116/TMBMIB/Apps/_Integration/@{serviceName}/1.0/Operations"/>
          <echo message="::::::${xmlFileNames}:::::"/>
          <fileset id="xmlFileNamesList" dir="${xmlFileNames}" includes="*"/>

        <property name="xmlFiles" refid="xmlFileNamesList"/>

                <echo message="::::::${xmlFiles}:::::"/>
            <for param="xmlfile" list="${xmlFiles}" delimiter=";">
                          <sequential>
                          <echo message="@{serviceName}:::::@{xmlfile}"/> 
                          <replaceregexp file="D:/servicezipbackup/116/TMBMIB/Apps/_Integration/@{serviceName}/1.0/Endpoints/default.xml" 
                                            match='url=(.*)'
                                            replace='url=\"${@{serviceName}}\" encryptSecureInfo=\"false\"'
                                            encoding="UTF-8"/>
                            <replaceregexp file="D:/servicezipbackup/116/TMBMIB/Apps/_Integration/@{serviceName}/1.0/Operations/@{xmlfile}" 
                                            match='name="endpointUrl" value=(.*)'
                                            replace='name="endpointUrl" value=\"${@{serviceName}}\"/>'
                                            encoding="UTF-8"/>

                        </sequential>
                </for>  

          </sequential>
        </for>  

</target>   

需要从多个文件夹中读取文件名,而我正在动态传递文件夹名

0 个答案:

没有答案