Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pom filenames other than pom.xml #316

Closed
jridgewell opened this issue May 1, 2019 · 3 comments
Closed

Support pom filenames other than pom.xml #316

jridgewell opened this issue May 1, 2019 · 3 comments
Labels
completed feature-request New feature or request good first issue Good for newcomers
Milestone

Comments

@jridgewell
Copy link
Contributor

Describe the bug

Closure Complier uses an unusual pom.xml hierarchy:

  • /pom.xml
    • /externs/pom.xml
    • /pom-gwt.xml
    • /pom-main.xml
      • /pom-linter.xml
      • /pom-main-unshaded.xml
      • /pom-main-shaded.xml

The /externs/pom.xml project is picked up just fine, but none of the rest are. I think this is because it's only looking for the explicit filename "pom.xml".

Further the submodule detection always appends "pom.xml" to the module filepath which generates things like "/pom-min.xml/pom.xml". That's hurts, too.

To Reproduce

  1. Clone https://github.com/google/closure-compiler
  2. Open it with vscode
  3. Observe Maven Projects tree only includes "pom.xml" files

Expected behavior

All projects should be detected.

Environments (please complete the following information as much as possible):

  • OS: OS X
  • VS Code version: 1.31.1
  • Extension version 0.16.2

Additional context

A configurable pom filename glob would probably fix this. That, and detecting if the module filepath includes an explicit file extension, implying it's a file and not a directory that contains a pom.xml file.

@Eskibear Eskibear added the feature-request New feature or request label May 1, 2019
@Eskibear
Copy link
Member

Eskibear commented May 1, 2019

Thanks for reporting this, and there are two work items can be formed.

  • add a setting entry like "maven.pomfile.globpattern", it can be a workspace setting. Currently it's hardcoded as **/pom.xml, and I think it's easy to make the change. See this line.
  • in submodule detection, add extra logic to determine it's a folder or a file, so we can append "pom.xml" to the path accordingly. E.g. /pom-min.xml is a file, no need to append "pom.xml". It's also feasible via NodeJS fs.lstat API.

Are you willing to contribute?

@Eskibear Eskibear added the good first issue Good for newcomers label May 1, 2019
jridgewell added a commit to jridgewell/vscode-maven that referenced this issue May 1, 2019
jridgewell added a commit to jridgewell/vscode-maven that referenced this issue May 1, 2019
Eskibear pushed a commit that referenced this issue May 3, 2019
Eskibear pushed a commit that referenced this issue May 3, 2019
@Eskibear Eskibear added this to the 0.17.0 milestone May 6, 2019
@Eskibear
Copy link
Member

Great appreciation for your contribution. I'll also enable auto-completion for **/*.xml. It's planned to be shipped in v0.17.0, together with some other improvements.

@Eskibear
Copy link
Member

released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed feature-request New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants