Open
Description
Using the latest SNAPSHOT of liberty-maven-plugin,
- Use the
coffee-shop
folder from https://github.com/sdaschner/coffee-testing/tree/liberty-dev - Change the FROM line to:
FROM openliberty/open-liberty:kernel-slim-java15-openj9-ubi
- Add
RUN features.sh
at the bottom of the file - Remove
<feature>mpHealth-2.0</feature>
from server.xml - Run
mvn liberty:devc
- Once the server is up, add
<feature>mpHealth-2.0</feature>
to server.xml - Liberty picks up the change before the features are finished installing. This causes Liberty to give an error that the feature is not found, and does not enable the feature after the feature is actually installed.
The workaround is to use the full
image instead of kernel-slim
Original error below:
[DEBUG] Plugin listed feature: mphealth-2.0
[INFO] Parsing the server file /Users/eric/git/coffee-testing/coffee-shop/target/liberty/wlp/usr/servers/defaultServer/configDropins/defaults/postgres-driver.xml for features and includes.
[INFO] Parsing the server file /Users/eric/git/coffee-testing/coffee-shop/target/liberty/wlp/usr/servers/defaultServer/server.xml for features and includes.
[INFO] Parsing the server file /Users/eric/git/coffee-testing/coffee-shop/target/liberty/wlp/usr/servers/defaultServer/configDropins/overrides/dev-mode-config.xml for features and includes.
[INFO] Installing features [jsonb-1.0, mpconfig-1.3, jaxb-2.2, cdi-2.0, jsonp-1.1, beanvalidation-2.0, jpa-2.2, ejblite-3.2, jaxrsclient-2.1, mphealth-2.0, jaxrs-2.1] on container liberty-dev
[DEBUG] execDocker, timeout=600, cmd=docker exec -e FEATURE_LOCAL_REPO=/devmode-maven-cache liberty-dev /liberty/bin/featureUtility installFeature jsonb-1.0 mpconfig-1.3 jaxb-2.2 cdi-2.0 jsonp-1.1 beanvalidation-2.0 jpa-2.2 ejblite-3.2 jaxrsclient-2.1 mphealth-2.0 jaxrs-2.1 --acceptLicense
[INFO] [AUDIT ] CWWKG0016I: Starting server configuration update.
[INFO] [AUDIT ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
[INFO] [AUDIT ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/open-default-port.xml
[INFO] [AUDIT ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/postgres-driver.xml
[INFO] [AUDIT ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/overrides/dev-mode-config.xml
[ERROR] [ERROR ] CWWKF0001E: A feature definition could not be found for mphealth-2.0
[INFO] [AUDIT ] CWWKG0017I: The server configuration was successfully updated in 0.156 seconds.
[INFO] [AUDIT ] CWWKF0008I: Feature update completed in 0.130 seconds.
[DEBUG] Initializing ... <---------------------> 0.00% Resolving remote features. This process might take several minutes to complete. <====-----------------> 15.00% Preparing assets for installation. This process might take several minutes to complete. <======---------------> 25.00% Starting installation ... <============---------> 60.00% Successfully installed feature json-1.0. <==============-------> 62.33% <==============-------> 64.67% <==============-------> 67.00% Successfully installed feature mpHealth-2.0. <==============-------> 69.33% <================-----> 71.67% Successfully installed feature servlet-3.1. <================-----> 74.00% <================-----> 76.33% <================-----> 78.67% <================-----> 81.00% <==================---> 83.33% Successfully installed feature cdi-1.2. <==================---> 85.67% <==================---> 88.00% <==================---> 90.33% <====================-> 92.67% <====================-> 95.00% All features were successfully installed. <====================-> 95.00% <====================-> 100.00% Start product validation... Product validation completed successfully.
[DEBUG] (org.codehaus.mojo.pluginsupport.logging.Logging) Resetting
[DEBUG] Successfully deleted liberty:dev temporary configuration folder
[INFO] Copied file: /Users/eric/git/coffee-testing/coffee-shop/src/main/liberty/config/server.xml to: /Users/eric/git/coffee-testing/coffee-shop/target/liberty/wlp/usr/servers/defaultServer/server.xml