大家好,请看这个代码
in my properties file i have win-x86.pc-shared-location=E:Ant_Scripts
下面我正试图从我的建筑中调用 printInstallerName_building
。 而当 printInstallerName_building
在测试.xml 中, 在构建.xml 文件中, ${platform.id} 在调用目标中, 具有值=win- x86
, 在被调用的目标参数1 中, 也具有值=win-x86
<target name="PrintInstallerName" >
<echo>PlatForm.Id====>${platform.id}</echo>
<ant antfile="test.xml" target="PrintInstallerName_build">
<property name="param1" value="${platform.id}"/>
</ant>
<target name="PrintInstallerName_build" >
<echo>${param1.pc-shared-location}</echo><!--${param1.pc-shared-location}-->
<echo>${param1}.pc-shared-location}</echo><!--win-x86.pc-shared-location-->
<echo>${win-x86.pc-shared-location}</echo><!--E:\Ant_Scripts-->
</target>
您只能看到最后的语句给出正确的输出, 但是它是硬编码, 我想使用 param1, 而输出应该是 < code> E:\\ Ant_ Scripts i tried to $ and @ but no works, maybe I 正在某处做错事, 有人可以帮忙, i am am 。