redhat-developer / redhat-developer/vscode-java

"missing required Java project" error when opening android maven projects

Ouverte
#3,092 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

android
Langage dominant
TypeScript
Étoiles
2.3k
Forks
546
Merge moyen
20 h 1 min
PR mergées (30 j)
11

Description

Orginally reported by @Fr0stM0urne on https://github.com/microsoft/vscode-java-debug/issues/1329:

Trying to debug a java project (FlowDroid) using vscode. The project is built using maven. Getting this error when using "Run Debug" on the main function of a java file in the project: Project 'soot-infoflow-summaries' is missing required Java project: 'soot'

Tried cleaning java workspace and restarting java server but it did not fix the issue. These are the error logs of vscode java server:

!ENTRY org.eclipse.jdt.ls.core 4 0 2023-04-17 17:43:48.374
!MESSAGE Error occured while building workspace. Details: 
 message: The project cannot be built until build path errors are resolved; code: 0; resource: ~/FlowDroid/soot-infoflow;
 message: Project 'soot-infoflow' is missing required Java project: 'soot'; code: 964; resource: ~/FlowDroid/soot-infoflow;
 message: The project was not built since it depends on soot-infoflow, which has build path errors; code: 0; resource: ~/FlowDroid/soot-infoflow-android;
 message: The project cannot be built until its prerequisite soot-infoflow-android is built. Cleaning and building all projects is recommended; code: 0; resource: ~/FlowDroid/soot-infoflow-cmd;
 message: The project was not built since it depends on soot-infoflow, which has build path errors; code: 0; resource: ~/FlowDroid/soot-infoflow-integration;
 message: Project 'soot-infoflow-summaries' is missing required Java project: 'soot'; code: 964; resource: ~/FlowDroid/soot-infoflow-summaries;
 message: The project cannot be built until build path errors are resolved; code: 0; resource: ~/FlowDroid/soot-infoflow-summaries;
Steps To Reproduce
  1. Install sdkman using curl -s "https://get.sdkman.io" | bash
  2. Install maven using sdk install maven 3.8.7
  3. Clone FlowDroid using git clone https://github.com/secure-software-engineering/FlowDroid.git
  4. Set ANDROID_JARS environment variable. (See FlowDroid git repo for details)
  5. Install FlowDroid using mvn -DskipTests install. (See Flowdroid git repo for details)
  6. Open FlowDroid in VS code and go to soot-infoflow-cmd/src/soot/jimple/infoflow/cmd/MainClass.java.
    Run/Debug the main function
Environment
  • Operating System: Ubuntu 22.04.2 LTS x86_64
  • JDK version: 1.8
  • Visual Studio Code version: 1.77.3
  • Java extension version: v0.25.10
  • Java Debugger extension version: v0.49.1
Additional Information:

The missing project soot is located in ~/.m2/repository/org/soot-oss

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par reproduire le problème FlowDroid signalé ainsi que les erreurs d’importation du projet Java et de chemin de build présentes dans les journaux du serveur de langage vscode-java. Reproduisez le problème en ouvrant soot-infoflow-cmd/src/soot/jimple/infoflow/cmd/MainClass.java et en exécutant ou en déboguant sa fonction main après le build Maven. C’est terminé lorsque l’erreur indiquant qu’un projet Java requis est manquant est corrigée et que la fonction main peut être exécutée ou déboguée.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java, vscode
Domaine
developer-experience, tooling
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.