Skip to content

Enhance addServerXMLProjects to support custom configDirectory #619

Description

@dshimo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions