-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Check Maven user properties with highest precedence when fetching a property value #4345
base: master
Are you sure you want to change the base?
Check Maven user properties with highest precedence when fetching a property value #4345
Conversation
/gcbrun |
*/ | ||
@Nullable | ||
public static String getProperty( | ||
String propertyName, @Nullable MavenProject project, @Nullable MavenSession session) { | ||
if (session != null && session.getSystemProperties().containsKey(propertyName)) { | ||
return session.getSystemProperties().getProperty(propertyName); | ||
if (session != null && session.getUserProperties().containsKey(propertyName)) { |
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.
can getUserProperties be null? if so can you please add null check too?
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.
jib-maven-plugin/CHANGELOG.md
Outdated
@@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. | |||
## [unreleased] | |||
|
|||
### Added | |||
- Check Maven user properties with highest precedence when fetching a property value ([#4344](https://github.com/GoogleContainerTools/jib/issues/4344)) |
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.
please update to
"Update retrieval of maven properties to use the following order: user, project, system"
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.
I've updated the changelog via breun@fba991f.
Fixes #4344 🛠️