redhat-developer / redhat-developer/vscode-java
maven extension support
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện vấn đề với takari/polyglot-maven-examples, tập trung vào .mvn/extensions.xml, kotlin/pom.kts và Main.kts. Trước tiên, hãy lần theo cách Java language server nhập các dự án Maven và xử lý các tệp POM không phải XML; hoàn thành khi dependency Guava được thêm vào được resolve trong Main.kts và POM thay thế được xử lý.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- build-system, devtools, tooling
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 30/100