redhat-developer / redhat-developer/vscode-java
maven extension support
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
I'm experimenting with using this polyglot maven extension to convert my projects' pom.xml files into other languages (in particular pom.yaml or pom.kts). Maven seems to work just fine with it, but java language server doesn't seem to pick up either the maven extension or the non-xml pom file.
Is there some way to configure the language server to recognize the maven extension and/or the non-xml pom file, or is there a change that needs to be made to the vscode extension itself to pick things up?
Environment
- Operating System: Mac 14.5
- JDK version: 17
- Visual Studio Code version: VSCodium 1.88.1
- Java extension version: 1.32.0
Steps To Reproduce
- clone https://github.com/takari/polyglot-maven-examples and open that in vscode with the java language server
- add another dependency, e.g. guava collections compile("com.google.guava:guava:31.1-jre") to kotlin/pom.kts > dependencies
- open Main.kts, add a line for "import com.google.common.collect.Lists" and in the main function call "Lists.newArrayList(1, 2, 3)"
- Run "mvn install" to compile the project
Current Result
because of the extension registered in the project's .mvn/extensions.xml, maven handles the alternative pom file just fine; however, vscode shows red underlines on the google import with an error about an unresolved reference; implying that the language server failed to recognize the added dependency on guava.
Expected Result
the language server recognizes the maven extension and uses it to parse and process the non-xml pom file. (completion support within the pom file a bonus)
Additional Informations
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with takari/polyglot-maven-examples, focusing on .mvn/extensions.xml, kotlin/pom.kts, and Main.kts. Start by tracing how the Java language server imports Maven projects and handles non-XML POM files; done means the added Guava dependency resolves in Main.kts and the alternative POM is processed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, devtools, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100