jdeb
jdeb copied to clipboard
Resolve variables recursively
Hello ! We wanted to contribute to the jdeb project as we improved variables resolution for our needs.
When the MapVariableResolver is fulfilled, some entries are composed like : "myVariable" : "${otherVairable}" "otherVairable" : "the value that I want"
.. this patch makes the resolve action on the key "myVariable" returning "the value that I want".
Hey Thomas, that adds quite some complexity to the variable resolving. Could you explain the use case?
The question is: Why do you have something like "myVariable" : "${otherVairable}"
Hello, We use a variable for the version attribute of the control file like
== in the pom.xml == <packaging.version>${module.release}~git${git.date}.${git.sha1}</packaging.version>
== in the control file == Version: [[packaging.version]]
With the current variable resolver I get "${module.release}~git${git.date}.${git.sha1}" in my final control file. I know that I can directly set the content of packaging.version in my control file but as I use it at some other places I want to make one composed variable.
Thanks !
While I now see the need it seems like this is the wrong approach. If these variables are Maven variables, it should also be Maven to expand them - not jdeb. We would need to dig a bit more into Maven to see how it's done.