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
It seems that the Liberty maven plugin does not handle default values for includes correctly during liberty:install-feature.
In liberty:install-feature, the variable-based defined includes in server.xml are only resolved correctly when the variable is defined in the bootstrap.properties.
Here the details:
Next to the server.xml, I created two files basic.xml and ldap.xml in the ${server.config.dir}/includes directory.
In my server.xml, I defined the include like this:
If I define in the bootstrap.properties file the variable "AUTH_TYPE=basic" everything works fine:
mvn io.openliberty.tools:liberty-maven-plugin:dev -f "c:\myWork\WCA\vscode\Liberty-JakartaEE-mvn\pom.xml"
[INFO] Running liberty:create
[INFO] Running liberty:install-feature
...
[INFO] Parsing the server file for features and includes: defaultServer\server.xml
[INFO] Parsing the server file for features and includes: defaultServer\includes/basic.xml [INFO] Features were included for file C:\myWork\WCA\vscode\Liberty-JakartaEE-mvn\target\liberty\wlp\usr\servers\defaultServer\includes\basic.xml
But if I do not define the variable AUTH_TYPE in the bootstrap.properties file, the liberty:install-feature does not use the default value but complains that the include file cannot be parsed:
mvn io.openliberty.tools:liberty-maven-plugin:dev -f "c:\myWork\WCA\vscode\Liberty-JakartaEE-mvn\pom.xml"
[INFO] Running liberty:create
[INFO] Running liberty:install-feature
...
[INFO] Parsing the server file for features and includes: defaultServer\server.xml [WARNING] Unable to parse include file ${server.config.dir}/includes/${AUTH_TYPE}.xml. Skipping the included features.
...
[INFO] Running liberty:deploy
[INFO] [AUDIT ] CWWKG0028A: Processing included configuration resource: C:\myWork\WCA\vscode\Liberty-JakartaEE-mvn\target\liberty\wlp\usr\servers\defaultServer\includes\basic.xml
@arunvenmany-ibm Can you verify that the Liberty server itself resolves the variable for the include location when installing features? We want our plugin to mimic what the Liberty server does.
It seems that the Liberty maven plugin does not handle default values for includes correctly during liberty:install-feature.
In liberty:install-feature, the variable-based defined includes in server.xml are only resolved correctly when the variable is defined in the bootstrap.properties.
Here the details:
Next to the server.xml, I created two files basic.xml and ldap.xml in the ${server.config.dir}/includes directory.
In my server.xml, I defined the include like this:
If I define in the bootstrap.properties file the variable "AUTH_TYPE=basic" everything works fine:
mvn io.openliberty.tools:liberty-maven-plugin:dev -f "c:\myWork\WCA\vscode\Liberty-JakartaEE-mvn\pom.xml"
[INFO] Running liberty:create
[INFO] Running liberty:install-feature
...
[INFO] Parsing the server file for features and includes: defaultServer\server.xml
[INFO] Parsing the server file for features and includes: defaultServer\includes/basic.xml
[INFO] Features were included for file C:\myWork\WCA\vscode\Liberty-JakartaEE-mvn\target\liberty\wlp\usr\servers\defaultServer\includes\basic.xml
But if I do not define the variable AUTH_TYPE in the bootstrap.properties file, the liberty:install-feature does not use the default value but complains that the include file cannot be parsed:
mvn io.openliberty.tools:liberty-maven-plugin:dev -f "c:\myWork\WCA\vscode\Liberty-JakartaEE-mvn\pom.xml"
[INFO] Running liberty:create
[INFO] Running liberty:install-feature
...
[INFO] Parsing the server file for features and includes: defaultServer\server.xml
[WARNING] Unable to parse include file ${server.config.dir}/includes/${AUTH_TYPE}.xml. Skipping the included features.
...
[INFO] Running liberty:deploy
[INFO] [AUDIT ] CWWKG0028A: Processing included configuration resource: C:\myWork\WCA\vscode\Liberty-JakartaEE-mvn\target\liberty\wlp\usr\servers\defaultServer\includes\basic.xml
Environment:
--- liberty-maven-plugin:3.11.2 (edited)
The text was updated successfully, but these errors were encountered: