You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a working project with jib-maven-plugin 3.4.4 using Maven 3.9.9, but when I tried it with Maven 4.0.0-rc-2, I noticed that specifying -Djib.to.image=foo:bar on the Maven command line was no longer being picked up.
At first I thought this was a bug in Maven 4.0.0-rc-2, so I created a bug report for Maven, but after a Maven developer looked into this, he concluded that this is actually an issue with the way that jib-maven-plugin reads properties. See this comment for the full analysis, but the short summary is that jib-maven-plugin currently doesn't consider user properties (as specified via -Dfoo=bar on the Maven command line) correctly, and this will actually break with Maven 4.
But it looks like there is a simple fix for this, by checking session.getUserProperties() with the highest precendence before project and system properties.
Expected behavior:
I expected specifying -Djib.to.image=foo:bar to keep working on Maven 4.0.0-rc-2, and according to the Maven developers that should be possible if jib-maven-plugin makes the suggested change. That more robust method of reading configuration properties should also work with Maven 3, so this should be a backwards compatible change.
breun
changed the title
Jib Maven Plugin 3.4.4 doesn't consider user properties properly
Jib Maven Plugin 3.4.4 doesn't consider user properties properly (breaks on Maven 4)
Jan 15, 2025
Environment:
Description of the issue:
I have a working project with jib-maven-plugin 3.4.4 using Maven 3.9.9, but when I tried it with Maven 4.0.0-rc-2, I noticed that specifying
-Djib.to.image=foo:bar
on the Maven command line was no longer being picked up.At first I thought this was a bug in Maven 4.0.0-rc-2, so I created a bug report for Maven, but after a Maven developer looked into this, he concluded that this is actually an issue with the way that jib-maven-plugin reads properties. See this comment for the full analysis, but the short summary is that jib-maven-plugin currently doesn't consider user properties (as specified via
-Dfoo=bar
on the Maven command line) correctly, and this will actually break with Maven 4.But it looks like there is a simple fix for this, by checking
session.getUserProperties()
with the highest precendence before project and system properties.Expected behavior:
I expected specifying
-Djib.to.image=foo:bar
to keep working on Maven 4.0.0-rc-2, and according to the Maven developers that should be possible if jib-maven-plugin makes the suggested change. That more robust method of reading configuration properties should also work with Maven 3, so this should be a backwards compatible change.Steps to reproduce:
See my reproducer project with instructions at https://github.com/breun/reproducer-for-MNG-8486
The text was updated successfully, but these errors were encountered: