jib icon indicating copy to clipboard operation
jib copied to clipboard

JIB Maven Container Labels with Properties from Parent POM

Open stefanLeo opened this issue 6 months ago • 1 comments

Environment:

Jib version: 3.4.3
Build tool: Maven 3.9.6
OS: N/A

Description of the issue:

I want to use properties of the parent pom as values for labels. However it seems that JIB is not resolving properties of a parent pom for this specific label field correctly (while it works this way for others like the from image). If I put the properties in the "current" pom all works as expected, but if I use a parent pom property, then the value is always null.

Expected behavior: JIB maven plugin can resolve parent pom properties as well.

Steps to reproduce:

Use an labels map with a properities from a parent pom as value: Parent POM:

<properties>
      <test.vendor>TESTVENDOR</test.vendor>
</properties>
<modules>
       <module>child</module>
</modules>

Child POM:

<parent>
    <groupID>parent</groupID>
   ...
</parent>

JIB... 
<labels>
	 <org.opencontainers.image.vendor>${test.vendor}</org.opencontainers.image.vendor>
</labels>

Run jib

stefanLeo avatar Jul 31 '24 08:07 stefanLeo