OpenLiberty / ci.common

Common functionality for ci.maven and ci.gradle
Apache License 2.0
3 stars 30 forks source link

Add warning messages for generate features generating to source dir #377

Closed kathrynkodama closed 2 years ago

kathrynkodama commented 2 years ago

Toggling generate features on after dev mode as started:

h
[INFO] ************************************************************************
[INFO] *        Automatic generation of features: [ Off ]
[INFO] *        g - toggle the automatic generation of features, type 'g' and press Enter. A new server configuration file will be generated in the SOURCE configuration directory.
[INFO] *        Enter - run tests on demand, press Enter.
[INFO] *        r - restart the server, type 'r' and press Enter.
[INFO] *        h - see the help menu for available actions, type 'h' and press Enter.
[INFO] *        q - stop the server and quit dev mode, press Ctrl-C or type 'q' and press Enter.
[INFO] ************************************************************************
g
[INFO] Setting automatic generation of features to: [ On ]
[WARNING] The source configuration directory will be modified. Features will automatically be generated in a new file: /Users/kathrynkodama/devex/sampleProjects/demo-devmode/src/main/liberty/config/configDropins/overrides/generated-features.xml
[INFO] Running liberty:generate-features
[INFO] Regenerated the following features: [cdi-2.0, mpMetrics-3.0, jaxrs-2.1]

Starting dev mode with generateFeatures=true:

[WARNING] The source configuration directory will be modified. Features will automatically be generated in a new file: /Users/kathrynkodama/devex/sampleProjects/demo-devmode/src/main/liberty/config/configDropins/overrides/generated-features.xml
[INFO] Running liberty:generate-features
[INFO] Regenerated the following features: [cdi-2.0, mpMetrics-3.0, jaxrs-2.1]
[INFO] Running liberty:create
...

h
[INFO] ************************************************************************
[INFO] *        Automatic generation of features: [ On ]
[INFO] *        g - toggle the automatic generation of features, type 'g' and press Enter. A new server configuration file will be generated in the SOURCE configuration directory.
[INFO] *        o - optimize the list of generated features, type 'o' and press Enter. A new server configuration file will be generated in the SOURCE configuration directory.
[INFO] *        Enter - run tests on demand, press Enter.
[INFO] *        r - restart the server, type 'r' and press Enter.
[INFO] *        h - see the help menu for available actions, type 'h' and press Enter.
[INFO] *        q - stop the server and quit dev mode, press Ctrl-C or type 'q' and press Enter.
[INFO] ************************************************************************

Signed-off-by: Kathryn Kodama kathryn.s.kodama@gmail.com

turkeylurkey commented 2 years ago

I think it is ok to print the message each time you toggle it on. That should not happen very often. Just don't show it every time you save a file.

kathrynkodama commented 2 years ago

@TrevCraw @turkeylurkey I agree with Paul that it makes sense to show the warning each time we toggle feature generation on. It will not be shown each time feature generation runs (only when toggled on) and on startup if generateFeatures=true.

yeekangc commented 2 years ago

+1 to show the warning every time feature generation is turned on.