redhat-developer / redhat-developer/vscode-java

module-info.java generated in wrong location

Open
#3,805 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Copied from https://github.com/microsoft/vscode-gradle/issues/1611

Describe the bug
I try to generate a module-info.java file in gradle java project, the file will be displayed in the src/test/resources/ Instead of src/main/java/. I had to manually move the files to the correct location.

To Reproduce
Ctrl + Shift + P select Java: create module-info.java in gradle java project.

Expected behavior
The module-info.java should be placed within src/main/java

Screenshots
If applicable, add screenshots to help explain your problem.
屏幕截图 2024-09-29 213906

Does the bug still exist if you disable all other extensions?
Yes

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 issue by running the Java: create module-info.java command in a Gradle Java project, then trace the extension entry point that chooses the destination. Done means the generated file is placed in src/main/java/ rather than src/test/resources/, with the behavior verified against the reported reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.