[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 天內回覆