Skip to content

Instantly share code, notes, and snippets.

@tily
Created November 23, 2014 07:31
Show Gist options
  • Save tily/ed33a6f241f2a1ac217d to your computer and use it in GitHub Desktop.
Save tily/ed33a6f241f2a1ac217d to your computer and use it in GitHub Desktop.
ant の環境変数に関する挙動
<project default="envtest">
<property environment="env" />
<target name="envtest">
<echo message="ant env hoge.fuga: ${hoge.fuga}" />
<echo message="os env path: ${env.PATH}" />
</target>
</project>
# ant -f envtest.xml -Dhoge.fuga=naha
Buildfile: envtest.xml
envtest:
[echo] ant env hoge.fuga: naha
[echo] os env path: /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin:/opt/chef/embedded/bin/
BUILD SUCCESSFUL
Total time: 0 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment