redhat-developer / redhat-developer/vscode-java
Maven project inside another maven project not recognized
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 546
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
Descrizione
When you have a maven project inside another maven project, only the top level project is properly recognized in the java projects view. However, if the sub-project is opened in another window by itself, the project is properly recognized
Environment
- Operating System: Fedora 38
- JDK version: openjdk 17.0.7
- Visual Studio Code version: 1.81.0
- Java extension version: 1.21.0
Steps To Reproduce
- Create new maven project (using maven for java extension)
- Create new maven project inside project from step 1. Example structure below:
test_project/
src/
main/
java/
TestMain.java
pom.xml
sub_project/
src/
main/
java/
SubMain.java
pom.xml
- Import Java Projects into Workspace
- Observe only
test_projectis properly imported in this case - Open a new window: File > New Window
- Inside new window, open
sub_project: File > Open Folder > selectsub_project - Observe
sub_projectcan now be recognized as a java project
Current Result
Only top level projects are recognized, projects inside projects are not. This leads to the warning SubMain.java is not on the classpath of project test_project, only syntax errors are reported and many features of the extension not working
Expected Result
Projects are recursively detected by their pom files and the extension features can be used for projects inside projects
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci il workspace usando i file pom.xml annidati descritti nell’issue, quindi confronta Import Java Projects con l’apertura del solo sub_project. Inizia tracciando il punto di ingresso dell’importazione dei progetti e il modo in cui l’estensione individua i file pom.xml. Il lavoro è completato quando i progetti annidati vengono riconosciuti ricorsivamente e SubMain.java non segnala più di trovarsi al di fuori del classpath.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- build-system, devtools
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100