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
In liberty:create goal, liberty-plugin-config.xml doesn't reflect precedence of liberty.bootstrap.* props over <bootstrapPropertiesFile> plugin config
#1788
Closed
scottkurz opened this issue
Jan 25, 2024
· 2 comments
· Fixed by #1792
both the 'create' and 'deploy' goals will generate a 'bootstrap.properties' file from the liberty.bootstrap.name property. The <bootstrapPropertiesFile> config will be ignored.
However, if you look at the liberty-plugin-config.xml, the 'deploy' goal will write the correct, individual property, matching the generated 'bootstrap.properties' file:
The reason seems to be that the precedence incorporating the liberty.bootstrap.* project props is encoded in the io.openliberty.tools.maven.server.StartDebugMojoSupport.copyConfigFiles() method, which gets called BEFORE the liberty-plugin-config.xml is written in the 'deploy' goal, but only gets called AFTER the plugin config is written in the 'create' goal.
From the doc, https://github.com/OpenLiberty/ci.maven/blob/main/docs/common-server-parameters.md, it doesn't specifically mention the liberty.bootstrap.* project props but it does say that plugin config parm <bootstrapProperties> takes precedence over <bootstrapPropertiesFile>, so the generated properties seem correct and the plugin cfg xml seems wrong.
In dev mode, a create then a deploy is typically done, so the practical impact of this may be almost zero today.
But as Liberty Tools (IDE support) adds more usage of the liberty-plugin-config.xml maybe this should be fixed.
I know this is a long writeup for possibly a 1-line change of writing the plugin cfg maybe after copyConfigFiles in the create goal... but wanted to make sure we understood clearly first :)
The text was updated successfully, but these errors were encountered:
Using v3.10, with pom.xml property and plugin config like:
both the 'create' and 'deploy' goals will generate a 'bootstrap.properties' file from the liberty.bootstrap.name property. The
<bootstrapPropertiesFile>
config will be ignored.However, if you look at the liberty-plugin-config.xml, the 'deploy' goal will write the correct, individual property, matching the generated 'bootstrap.properties' file:
while the 'create' goal will write:
The reason seems to be that the precedence incorporating the liberty.bootstrap.* project props is encoded in the
io.openliberty.tools.maven.server.StartDebugMojoSupport.copyConfigFiles()
method, which gets called BEFORE the liberty-plugin-config.xml is written in the 'deploy' goal, but only gets called AFTER the plugin config is written in the 'create' goal.From the doc, https://github.com/OpenLiberty/ci.maven/blob/main/docs/common-server-parameters.md, it doesn't specifically mention the liberty.bootstrap.* project props but it does say that plugin config parm
<bootstrapProperties>
takes precedence over<bootstrapPropertiesFile>
, so the generated properties seem correct and the plugin cfg xml seems wrong.In dev mode, a create then a deploy is typically done, so the practical impact of this may be almost zero today.
But as Liberty Tools (IDE support) adds more usage of the liberty-plugin-config.xml maybe this should be fixed.
I know this is a long writeup for possibly a 1-line change of writing the plugin cfg maybe after copyConfigFiles in the create goal... but wanted to make sure we understood clearly first :)
The text was updated successfully, but these errors were encountered: