ci.maven icon indicating copy to clipboard operation
ci.maven copied to clipboard

Generate features, configuration directory and serverXmlFile in non-default location

Open kathrynkodama opened this issue 3 years ago • 2 comments

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. 

kathrynkodama avatar Jan 20 '22 20:01 kathrynkodama

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.

kathrynkodama avatar Jan 20 '22 20:01 kathrynkodama

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

kathrynkodama avatar May 18 '22 17:05 kathrynkodama