Background
Server.xml-based project discovery was introduced in da32c90 (Aug 2022) inside
libertyProject.ts and moved into projectDiscovery.ts during the multimodule (#598) changes, logic unchanged.
Current behavior
addServerXMLProjects globs for **/src/main/liberty/config/server.xml and walks
a hardcoded four levels up to infer the project root, vscodePath.resolve(serverXML, "../../../../")).dir;, then checks for pom.xml or
build.gradle there. If configDirectory is customized in the Maven or Gradle plugin
config, the walk lands in the wrong directory and the project is silently skipped.
Enhancement
So two potential improvements could be to climb the tree from the server.xml for the nearest build file, or to read configDirectory for thoroughness.
Background
Server.xml-based project discovery was introduced in
da32c90(Aug 2022) insidelibertyProject.tsand moved intoprojectDiscovery.tsduring the multimodule (#598) changes, logic unchanged.Current behavior
addServerXMLProjectsglobs for**/src/main/liberty/config/server.xmland walksa hardcoded four levels up to infer the project root,
vscodePath.resolve(serverXML, "../../../../")).dir;, then checks forpom.xmlorbuild.gradlethere. IfconfigDirectoryis customized in the Maven or Gradle pluginconfig, the walk lands in the wrong directory and the project is silently skipped.
Enhancement
So two potential improvements could be to climb the tree from the server.xml for the nearest build file, or to read
configDirectoryfor thoroughness.