[Bug]: shading causes Gradle failure as jar and test tasks are not properly wired
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java
- 领域
- build-system
调研方向
从 gradle/shading.gradle 的第 59-63 行开始,并使用 ./gradlew :docs:examples:junit4:generic:jar :docs:examples:junit4:generic:test 重现失败。调查 shading 配置如何连接 jar 和 test 任务。完成标准是该命令在没有 Gradle 隐式依赖失败的情况下完成。
由索引模型根据 Issue 内容生成。
描述
Module
Core
Testcontainers version
1.21.1
Using the latest Testcontainers version?
Yes
Host OS
all
Host Arch
all
Docker version
n/a
What happened?
The following part of the build script causes the failure: https://github.com/testcontainers/testcontainers-java/blob/63189c8678f81c8ef4c431e4468ee74640682654/gradle/shading.gradle#L59-L63
The shading configuration should be adjusted or removed (e.g. https://github.com/testcontainers/testcontainers-java/issues/8612)
$ ./gradlew :docs:examples:junit4:generic:jar :docs:examples:junit4:generic:test
Configuration on demand is an incubating feature.
> Task :docs:examples:junit4:generic:test FAILED
[Incubating] Problems report is available at: file:///Users/kevincooney/git/testcontainers-java/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':docs:examples:junit4:generic:test' (type 'Test').
- Gradle detected a problem with the following location: '/Users/kevincooney/git/testcontainers-java/docs/examples/junit4/generic/build/libs/generic.jar'.
Reason: Task ':docs:examples:junit4:generic:test' uses this output of task ':docs:examples:junit4:generic:jar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':docs:examples:junit4:generic:jar' as an input of ':docs:examples:junit4:generic:test'.
2. Declare an explicit dependency on ':docs:examples:junit4:generic:jar' from ':docs:examples:junit4:generic:test' using Task#dependsOn.
3. Declare an explicit dependency on ':docs:examples:junit4:generic:jar' from ':docs:examples:junit4:generic:test' using Task#mustRunAfter.
For more information, please refer to https://docs.gradle.org/8.13/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
Relevant log output
Additional Information
No response
- 主要语言
- Java
- 星标
- 8.7k
- 派生
- 1.9k
- 平均合并
- 20 小时 43 分钟
- 30 天内合并 PR
- 4
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
testcontainers/testcontainers-java 的其他 Issue
-
[Bug]: Build fails with "Unknown cli flag: --scripts-prepend-node-path" due to outdated Spotless plugin可能已有人在做 @dhruv9b 于 36 天前认领。 未关闭type/bug
难度 2/5 1-3 小时 新手友好度 78/100
testcontainers/testcontainers-java#11997 · 1 条评论 ·
维护者通常 1 天内回复
-
[Enhancement]: Document why singleton containers are required under Spring's test context caching可能已有人在做 @zakaullah075 于 53 天前认领。 未关闭type/enhancement
难度 1/5 1 小时以内 新手友好度 85/100
testcontainers/testcontainers-java#11967 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug]: Cannot reuse Selenium BrowserWebDriverContainers under Linux可能已有人在做 @kdelay 于 75 天前认领。 未关闭type/bug
难度 2/5 1-3 小时 新手友好度 78/100
testcontainers/testcontainers-java#11941 ·
维护者通常 1 天内回复
-
[Bug]: DockerDesktopClientProviderStrategy is always applicable可能已有人在做 @seonwooj0810 于 124 天前认领。 未关闭type/bug
难度 2/5 1-3 小时 新手友好度 74/100
testcontainers/testcontainers-java#11829 · 1 条评论 ·
维护者通常 1 天内回复
-
[Enhancement]: cleanup document after removing junit4 support可能已有人在做 @SJvaca30 于 131 天前认领。 未关闭type/enhancement
难度 2/5 1-3 小时 新手友好度 65/100
testcontainers/testcontainers-java#11578 ·
维护者通常 1 天内回复
查看 testcontainers/testcontainers-java 的全部 Issue
相似的 Issue
-
[Bug] Logo style setting missing and `classic` style not applied across multiple platforms (v3.1.0)未关闭
难度 2/5 1-3 小时 新手友好度 75/100
Stirling-Tools/Stirling-PDF#8382 · 1 个 reaction ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 70/100
维护者通常 4 天内回复
-
enhancement untriaged
难度 2/5 1-3 小时 新手友好度 78/100
opensearch-project/sql#5842 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
openhab/openhab-addons#21882 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
YunaiV/ruoyi-vue-pro#1273 ·
维护者通常 3 天内回复