redhat-developer / redhat-developer/vscode-java
Auto build will delete test resources in UT
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
[provide a description of the issue]
Environment
- Operating System:Windows11
- JDK version:17
- Visual Studio Code version:1.87.0
- Java extension version:v1.28.1
Steps To Reproduce
- have a maven project like this
src/main/java
a.java
src/main/resources
test.json
src/test/java
aTest.java
src/test/resources
test.csv - After run Java: Rebuild Project, I found that test.csv is copied to the target, but deteled in a while.
So I run test in the aTest.java, I got a message that test.csv is not found. - If I turn off auto build, success.
Is it possible that auto build cleaned the resources?
pom.xml
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Maven configuration in pom.xml and reproduce the issue using Java: Rebuild Project with auto build enabled. Compare src/test/resources/test.csv with the target output and run aTest.java; done means the test resource remains available and the test succeeds after rebuilding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100