googleapis / googleapis/google-cloud-java

[java-shared-config] Ignore provided scoped dependencies from maven-dependency-plugin

Đang mở
#13,743 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
priority: p3 type: cleanup
Ngôn ngữ chính
Java
Star
2.1k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
154

Mô tả

This came up in an offline discussion with @burkedavison as part of https://github.com/googleapis/java-shared-config/pull/815.

The `downstream / dependencies (11, java-spanner)` in the PR was failing with the following error:

```
[INFO] --- maven-dependency-plugin:3.5.0:analyze (default-cli) @ google-cloud-spanner ---
Error: Used undeclared dependencies found:
Error: org.graalvm.sdk:nativeimage:jar:24.0.1:provided
```
However, this dependency is intentionally scoped as `provided` making this failure a false positive.

Potential Solution: Set the maven-dependency-plugin's `ignoreNonCompile` parameter to `true` (https://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html#ignoreNonCompile) to ignore `provided` scoped dependencies when `mvn dependency:analyze` is called. The configuration change will likely be at:

https://github.com/googleapis/java-shared-config/blob/3c3c6307ea88dc56f5901a95c295d1b2d53a3559/java-shared-config/pom.xml#L144-L158

cc/ @suztomo

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.