redhat-developer / redhat-developer/vscode-java
Auto build will delete test resources in UT
未关闭
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
[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>
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 pom.xml 中的 Maven 配置开始,并使用 Java 重现该问题:启用自动构建后执行 Rebuild Project。将 src/test/resources/test.csv 与目标输出进行比较,并运行 aTest.java;完成意味着测试资源在重新构建后仍然可用,并且测试成功。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- build-system, testing
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100