ci.maven
ci.maven copied to clipboard
Generate features, configuration directory and serverXmlFile in non-default location
Users can specify locations for their configuration directory and serverXmlFile in the configuration block of the Liberty Maven plugin, ie.
<serverXmlFile>publish/servers/server.xml</serverXmlFile>
<configDirectory>publish/config</configDirectory>
Looks like generate features is not currently picking up these locations:
[WARNING] The server file C:\MyData\MyWDTWorkspaces\GarageSale\GarageSaleEE7\garageSale-ee7\GarageSaleRuntimeUtil\src\main\liberty\config\server.xml does not exist. Skipping its features.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.526 s
[INFO] Finished at: 2022-01-20T12:58:19-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.5.2-SNAPSHOT:dev (default-cli) on
project GarageSaleRuntimeUtil: Failed to generate a working set of features. Error collecting list of directories to send
to binary scanner, list is null or empty.. To disable the automatic generation of features, start dev mode with -
DgenerateFeatures=false.
Error message above looks related to https://github.com/OpenLiberty/ci.maven/issues/1321 But the server.xml file indicated in the console output is incorrect. Will need to debug and test this scenario more once #1321 is fixed.
As part of this item, we need to update the logic we have to write the generated features comment to the user's server.xml file after feature generation. See https://github.com/OpenLiberty/ci.gradle/pull/752#discussion_r876167289