redhat-developer / redhat-developer/vscode-java

maven extension support

Aperta
#3,704 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
TypeScript
Stelle
2.3k
Fork
546
Merge medio
20h 1m
PR unite (30g)
11

Descrizione

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
  1. clone https://github.com/takari/polyglot-maven-examples and open that in vscode with the java language server
  2. add another dependency, e.g. guava collections compile("com.google.guava:guava:31.1-jre") to kotlin/pom.kts > dependencies
  3. open Main.kts, add a line for "import com.google.common.collect.Lists" and in the main function call "Lists.newArrayList(1, 2, 3)"
  4. Run "mvn install" to compile the project

Please attach logs

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il problema con takari/polyglot-maven-examples, concentrandoti su .mvn/extensions.xml, kotlin/pom.kts e Main.kts. Inizia tracciando il modo in cui il Java language server importa i progetti Maven e gestisce i file POM non XML; il lavoro è completato quando la dipendenza Guava aggiunta viene risolta in Main.kts e il POM alternativo viene elaborato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
build-system, devtools, tooling
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.