eclipsemavenpom.xmlspring-tool-suiteautoformatting

Eclipse STS will not format pom.xml


I'm in a freshly installed Spring STS 4.18.0 (latest) and I can't autoformat a pom file.

So there's something wrong with the POM editing and I'm used to the keyboard shortcut... any idea what should I check to make it work? I've seen a similar older question but it doesn't give any solution.


Solution

  • The related issue from the STS4 issue tracker: https://github.com/spring-projects/sts4/issues/1010

    The underlying problem is a regression in the lps4e project that is used to connect the language servers (in this case the XML and m2e extension for the XML language server). The fix is already implemented via https://github.com/eclipse/lsp4e/pull/571 and will ship as part of the next STS4 release for sure. Once the PR is merged and a snapshot build of lsp4e is available, you can try to install that latest snapshot to get the fix early.