-
Notifications
You must be signed in to change notification settings - Fork 644
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
Support standard maven property interpolation #877
Conversation
Codecov Report
@@ Coverage Diff @@
## master #877 +/- ##
===========================================
+ Coverage 50.38% 50.7% +0.31%
- Complexity 1196 1203 +7
===========================================
Files 139 139
Lines 7119 7106 -13
Branches 953 952 -1
===========================================
+ Hits 3587 3603 +16
+ Misses 3224 3189 -35
- Partials 308 314 +6
|
properties.getProperty(prop) : | ||
matcher.group("variable"); | ||
matcher.appendReplacement(ret, value.replace("$","\\$")); | ||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The else
here seems useless, as you're returning in the other branch anyways. It does add a level of indentation though :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. Will nix it.
Hrm, just realized that I missed a few sources of properties that are accounted for on other code paths. Going to take another stab at the properties setup and test cases. |
e9b5621
to
4966022
Compare
So I didn't end up going with a helper method for squashing properties like you suggested in issue #860, @ankon. The main reason was that references like This commit should only affect interpolation on the Dockerfile and include all the usual sources for interpolation. It doesn't attempt to extend that to other areas where full properties interpolation may or may not be appropriate. Also, I noted in the docs that the assembly feature is another way to get resource filtering without invoking another plugin since it supports token replacement in files and file sets. |
I actually like the idea of the interpolator encapsulating that magic, it's a lot clearer than having a weird static method somewhere! |
Thanks a lot ! I hope I have a chance to review today. busy times ... |
@scoplin sorry for the delay, the plan is to integrate your (and other PRs) until the beginning of next week and publish a release right after. |
Replaces the regex-based property interpolation with the plexus classes used typically by maven to perform interpolation. This allows references to things like ${project.build.directory} in the Dockerfile. [fixes fabric8io#871] Signed-off-by: Scott Coplin <[email protected]>
Awesome PR, thank you so much ! Just merged, going through to some other PRs and then make a release today. |
@scoplin 0.23.0 is out. Thanks for your contribution ! |
The release version seems to all check out for me. Thanks @rhuss ! |
I can confirm that 0.23.0 also works for me, thank you all! |
Replaces the regex-based property interpolation with the plexus classes
used typically by maven to perform interpolation. This allows
references to things like ${project.build.directory} in the Dockerfile.
[fixes #871]
Signed-off-by: Scott Coplin [email protected]