I had never heard of phing before, but it looks like a very promising build tool. Thank you for message! I looked at the document on phing.info, I found the following opportunity:
# 0 I would like to clarify one point. You say that
prompt$ > export MY_VAR=value prompt$ > phing build.xml
doesn't set MY_VAR to display inside running phing processes? I would be surprised, but I would understand if you do not want to run your build script.
# 1 I think that in the context of the build tool, a function, such as exec, is designed to run a stand-alone program, so although exec can run and set MY_VAR, all this happens in a subprocess that immediately disappears as exec finishes and continues processing the next task in the file build.xml.
If you are just trying to make sure your phing script works with specific values ββfor env_vars, you can try
Command-line arguments: .... -D<property>=<value>
So suppose you can do
phing -DMY_VAR=value build.xml
# 2 Did you think you were using the properites file? See http://www.phing.info/docs/guide/stable/chapters/appendixes/AppendixF-FileFormats.html and scroll down for information on build.properties
# 3 also ...
Phing Built-In Properties Property Contents env.* Environment variables, extracted from $_SERVER.
would you access them with something like
${env.MY_VAR}
# 4 This is similar to what you really want
<replacetokens> <token key="BC_PATH" value="${top.builddir}/"/> <token key="BC_PATH_USER" value="${top.builddir}/testsite/user/${lang}/"/> </replacetokens>
Hope this helps.
shellter
source share