我的字符串是C:\tools\jenkins\HOME\workspace\MAL1793_Driver_DIO
螞蟻propertyregex任務,在串
我想與UNIX風格路徑替換Windows風格的目錄路徑"\"
"/"
我在POM文件中使用一個Ant propertyregex任務如下所示。
<execution>
<id>ReplaceWSPath</id>
<phase>process-resources</phase>
<configuration>
<tasks>
<echo>"Updating workspace path"</echo>
<propertyregex
property="WSPath"
input="C:\tools\jenkins\HOME\workspace\MAL1793_Driver_DIO"
regexp="\"
replace="/"
global="true" />
<echo>"workspace Path = ${WSPath}"</echo>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
但執行後我收到此錯誤:
Problem: failed to create task or type propertyregex
[ERROR] Cause: The name is undefined.
[ERROR] Action: Check the spelling.
[ERROR] Action: Check that any custom tasks/types have been declared.
[ERROR] Action: Check that any <presetdef>/<macrodef> declarations have taken place.
我使用Ant 1.7版本。是否缺少任何設置?
你可以分享你的最終Maven配置?謝謝! –