redhat-developer / redhat-developer/vscode-java

Project 'myproject' is missing required Java project: 'somelib'

未关闭
#1,191 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Gradle
主要语言
TypeScript
星标
2.3k
派生
547
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

I am using the vsocde-java extension with a gradle java project.

Receiving error "Project 'java_server' is missing required Java project: 'chesslib'

  • Operating System: Linux Mint 19.2
  • JDK version: OpenJDK 1.8
    Version: 1.40.2

Commit: f359dd69833dd8800b54d458f6d37ab7c78df520
Date: 2019-11-25T14:54:40.719Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 4.15.0-72-generic

My gradle configuration builds and runs fine, but the plugin complains still.

My build.gradle is as follows....

apply plugin: 'java'

// Use maven repository
repositories {
    mavenCentral()
    google()
}

dependencies {
    implementation 'org.eclipse.jetty:jetty-servlet:9.4.19.v20190610'
    implementation 'org.eclipse.jetty:jetty-client:9.4.19.v20190610'
    implementation 'mysql:mysql-connector-java:8.0.16'
    implementation 'org.apache.commons:commons-dbcp2:2.7.0'
    implementation 'org.jdbi:jdbi3-core:3.10.1'
    implementation 'com.google.firebase:firebase-admin:6.11.0'
    compile 'com.google.apis:google-api-services-oauth2:v1-rev155-1.25.0'
    // implementation 'com.google.gms:google-services:4.3.3'

    compile project('chesslib')
    runtime files('../../chesslib/build/libs/chesslib-1.1.12.jar')
}

task runServer(type: JavaExec) {
   classpath = sourceSets.main.runtimeClasspath 
   main = 'ChessServer'
} 

task runClient(type: JavaExec) {
   classpath = sourceSets.main.runtimeClasspath 
   main = 'ChessClient'
   standardInput = System.in // without this, using Scanner on System.in won't work
}

task runCLITestApp(type: JavaExec) {
   classpath = sourceSets.main.runtimeClasspath 
   main = 'CLITestApp'
   standardInput = System.in
}

My settings.gradle is as follows...

include   ':chesslib'
project(':chesslib').projectDir = new File(settingsDir, '../../chesslib')

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用提供的 build.gradle 和 settings.gradle 重现报告,包括外部 chesslib 项目的路径。然后检查 extension 如何导入 Gradle 项目依赖项,以及如何处理 compile project('chesslib'); 当配置的项目能够解析且不再出现 missing-required-project 错误时,该 issue 即完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, vscode
领域
build-system, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。