Hey Guys, Maybe I can help here and it would be great to document on the wiki (please) :)
One of the "load bearing walls" of OODT, is cas-metadta, and a nifty class inside called PathUtils that I created a long time ago. http://oodt.apache.org/components/maven/apidocs/org/apache/oodt/cas/metadat a/util/PathUtils.html My original vision for PathUtils was for it to be a class that would use OODT metadata (from somewhere, the workflow manager, the file manager, met extractors [client or server side, etc.] to do environment variable replacement in paths). Logical or physical paths, etc. This originally helped in the Versioning interface within File Manager: http://oodt.apache.org/components/maven/filemgr/development/developer.html (see architecture diagram) http://oodt.apache.org/components/maven/apidocs/org/apache/oodt/cas/filemgr /versioning/package-summary.html http://oodt.apache.org/components/maven/apidocs/org/apache/oodt/cas/filemgr /versioning/Versioner.html Eventually I found PathUtils could be used for all sorts of other things. Mixing metadata based replacement with environment variable replacement. Mixing that with full paths in config files. Recursively doing this, etc. At that point we built a bunch of core stuff on it, and the way I wanted to do environment variables was using the '[' and ']' separators e.g., [ENV VAR NAME] expands to $ENV_VAR_NAME. Why didn't I use the dollar? I didn't want it to get confused with Maven paths, and other paths (e.g., $ replacement in Java regexs, etc.) This also existed way before Spring got popular and started to deal with some of these facilities. So general rule of thumb in OODT: Environment variable replacement happens a lot of places. Most of the properties in config files are env var replaceable by default (and if not by default by adding envReplace="true" as an attribute on the tag, etc.) If there are specific questions or places you find it's not, suggest that it should be and file a JIRA issue and we can discuss. Cheers! Chris On 3/21/13 5:06 PM, "Lewis John Mcgibbney" <[email protected]> wrote: >Hi Ryan, >So can you please confirm if the environment variables are to be placed >into the env.sh script? >If so I will duly update the documentation on the wiki. >Thank you very much >Lewis > >On Thu, Mar 21, 2013 at 5:00 PM, Gerard, Ryan S. (GSFC-586.0)[SGT INC] < >[email protected]> wrote: > >> Thanks Lewis, >> >> Yes, it appears OODT does support environment variables if put within >> brackets. >> >> For example, [ENV_VARIABLE_NAME] can be inserted into any xml config >>files >> and it will be deferenced. >> >> Thanks for your reply. >> Ryan >> >> On 3/21/13 6:38 PM, "Lewis John Mcgibbney" <[email protected]> >> wrote: >> >> >Hi Ryan, >> >Please excuse if I am wrong, however I think (if you are doing as I am >>and >> >using the RADiX module and Maven archetype) then all environment >>variables >> >should be set within [0] prior to building your project. >> >I also found myself confused yesterday and spent a bit of time looking >>at >> >this. >> >We need to document this somewhere as the definition of environment >> >variables is critical but not very clear within the OODT documentation. >> >If one of the OODT team can confirm or correct me then we can get such >> >information at least logged. >> >Thanks >> >Lewis >> > >> >[0] *http://s.apache.org/pg* >> > >> >On Thu, Mar 21, 2013 at 3:13 PM, Gerard, Ryan S. (GSFC-586.0)[SGT INC] >>< >> >[email protected]> wrote: >> > >> >> Is there a special OODT syntax to use environment variables in OODT? >>I >> >> thought I ran across something a while ago but perhaps its wasn't for >> >> config files. I'm referring to files such as events.xml within >> >>cas-workflow >> >> and tasks.xml. >> >> >> >> Thanks, >> >> Ryan >> >> >> > >> > >> > >> >-- >> >*Lewis* >> >> > > >-- >*Lewis*
