문제

This is in a Windows XP environment.

I'm trying to install and edit some files that have default settings. I want to update these settings use items from ${env}

도움이 되었습니까?

해결책

Using foreach from ant-contrib, you could iterate over ${env} like:

<target name="run">
    <foreach item="String" in="${env.CLASSPATH}" delim=";" property="x">
        <echo message="${x}" />
    </foreach>
</target>

I was able to do this with NAnt:

<target name="run">
    <foreach item="String" in="${environment::get-variable('CLASSPATH')}" delim=";" property="x">
        <echo message="${x}" />
    </foreach>
</target>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top