redhat-developer / redhat-developer/vscode-java

“Failed to configure project” when resources nested inside source folder

Open
#1,590 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Gradle
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

The VS Code Java plugin cannot import a project from a build.gradle file that places a test resources directory inside a test source directory. Gradle itself, however, supports this.

Environment
  • Operating System: macOS 10.15.6
  • JDK version: OpenJDK 14.0.2
  • Visual Studio Code version: 1.48.1
  • Java extension version: 0.65.0
Steps To Reproduce

Populate build.gradle with the following simple configuration:

plugins {
    id 'java'
}

sourceSets {
    test.java.srcDirs = ['test']
    test.resources.srcDirs = ['test/res']
}
Current Result

The VS Code plugin will produce a Failed to configure project error (with no further information, AFAICT).

However, gradle test will execute perfectly happily.

Expected Result

It should import the project with test/res copied to the test resources folder, just as gradle itself does.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the project configuration shown in build.gradle, then trace the VS Code Java plugin's Gradle import handling for nested test resources. Done means the project imports without the “Failed to configure project” error and test/res is copied to the test resources folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.