-
Notifications
You must be signed in to change notification settings - Fork 653
Description
I am trying to use a Maven property base.image in my Dockerfile (filtering) which is defined as follows in my module POM:
<base.image>gdcc/base:${base.image.tag}</base.image>
<base.image.flavor>noble</base.image.flavor>
<base.image.tag>${base.image.version}-${base.image.flavor}${base.image.tag.suffix}</base.image.tag>
<base.image.tag.suffix>-p${payara.version}-j${target.java.version}</base.image.tag.suffix>The property base.image.version comes from a parent POM and is defined as follows:
<base.image.version>${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}</base.image.version>These parsedVersion props are provided by https://www.mojohaus.org/build-helper-maven-plugin/usage.html
I see the plugin roped into the Maven build, but the filtering doesn't work:
Unable to build image [gdcc/dataverse:unstable] : "failed to process "\"gdcc/base:${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}-noble-p6.2025.3-j17\"": unsupported modifier (.) in substitution"
If I manually add a parsedVersion.majorVersion in one of the properties of my module POM, everything is replaced properly (but obviously then the build fails because the tag doesn't exist). For the sake of an example:
<base.image.tag>${parsedVersion.majorVersion}-${base.image.version}-${base.image.flavor}${base.image.tag.suffix}</base.image.tag>
Unable to pull 'gdcc/base:6-6.7-noble-p6.2025.3-j17' : {"message":"manifest for gdcc/base:6-6.7-noble-p6.2025.3-j17 not found: manifest unknown: manifest unknown"} (Not Found: 404)
I'm not sure if this is a problem by this plugin or something else is going on here. I'd appreciate pointers on how to debug this.
I should mention that I am also using the "git-commit-id-maven-plugin" and its provided Maven properties for another label and this is working without any flaws.