Suppose I have an ant build system that loads various property files. Sometimes properties declared in one file are used in the value of properties declared in another.
For instance:
File 1: java.version=1.6 File 2: jdk.path=/blah/foo/java/${java.version}
This works fine if I upload file 1 before file 2. In some cases, the replacement should be done in the reverse order - the things declared in file 2 will be used by file 1.
It is not possible to merge these files due to external limitations and system design.
Is there a way to implement bidirectional expansion? Maybe some way for the subsequent processing of properties and the application of additional stages of expansion? You can assume that there are no circular dependencies in extension chains.
source share