Skip to content

Adding diagnostics for server.xml if not defined in liberty plugin config xml#399

Closed
venmanyarun wants to merge 2 commits into
OpenLiberty:mainfrom
venmanyarun:config_file_diag
Closed

Adding diagnostics for server.xml if not defined in liberty plugin config xml#399
venmanyarun wants to merge 2 commits into
OpenLiberty:mainfrom
venmanyarun:config_file_diag

Conversation

@venmanyarun

@venmanyarun venmanyarun commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Adding diagnostics for server.xml if not defined in liberty plugin config xml
FIxes #58

Current warning message :- WARNING: The current configuration file {fileName} is not configured with server defined in the Liberty Maven/Gradle plugin configuration. Liberty tools features remain active for this file, though it will not be copied to the target Liberty runtime.

…nfig xml

Signed-off-by: Arun Venmany <arun.kumar.v.n@ibm.com>
@venmanyarun venmanyarun requested a review from cherylking March 12, 2026 04:49
@venmanyarun venmanyarun changed the title Adding diagnostics for server.xml if not defined in liberty plugin co… Adding diagnostics for server.xml if not defined in liberty plugin config xml Mar 12, 2026
@venmanyarun

Copy link
Copy Markdown
Contributor Author

Tested following scenarios

  1. If liberty-plugin-config.xml does not exist, no warning diagnostic will appear on xml files
  2. If liberty-plugin-config.xml exists

2.1 No serverXmlFile is defined in project liberty plugin configuration, ie, liberty-plugin-config.xml does not contain configFile element

  • no warning diagnostic will be shown in server.xml
image * warning will shown in custom server.xml files such as server2.xml image

2.2 custom serverXmlFile node is defined
image
image

  • warning will be shown on both server.xml and server4.xml
image image
  • no warning will be shown on server2.xml
image

All the above tests are performed while libertyDev is running as well, working fine
Tested with both gradle and maven projects

Signed-off-by: Arun Venmany <arun.kumar.v.n@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide Reverse Config File Detection

1 participant