Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve variables recursively #148

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

thomas-hilaire
Copy link

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".

@tcurdt
Copy link
Owner

tcurdt commented Mar 9, 2014

Hey Thomas, that adds quite some complexity to the variable resolving. Could you explain the use case?

@tcurdt
Copy link
Owner

tcurdt commented Mar 9, 2014

The question is: Why do you have something like "myVariable" : "${otherVairable}"

@thomas-hilaire
Copy link
Author

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 !

@tcurdt
Copy link
Owner

tcurdt commented Dec 15, 2014

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.

@tcurdt tcurdt added this to the 1.4 milestone Dec 15, 2014
@tcurdt tcurdt modified the milestones: 1.6, 1.5 Jan 16, 2016
@tcurdt tcurdt modified the milestones: 1.6, 1.9 Aug 20, 2019
@tcurdt tcurdt removed this from the 1.9 milestone Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants