GoogleCloudPlatform / GoogleCloudPlatform/cloud-opensource-java

Enforcer rule to work with partial dependency graph for reportOnlyReachable=true

Đang mở
#833 0 bình luận 0 reaction 1 người được giao Được @suztomo nhận Xem trên GitHub
enhancement p3
Ngôn ngữ chính
Java
Star
163
Fork
80
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Enforcer rule to work with partial dependency graph for reportOnlyReachable=true

I was testing the enforcer rule with Ray's grpc Java example https://github.com/saturnism/grpc-java-by-example/tree/master/chat-example/chat-vaadin-client . It failed to build dependency graph due to missing dependency:

```
[ERROR] Could not find artifact org.jboss.logging:jboss-logging:pom:3.0.0.Beta5-SNAPSHOT
[ERROR] Paths to the missing artifact:
[WARNING] Rule 0: com.google.cloud.tools.dependencies.enforcer.LinkageCheckerRule warned with message:
Unable to build a dependency graph: Could not resolve dependencies for project org.test:chat-vaadin-client:war:1.0-SNAPSHOT: Failed to collect dependencies at
com.vaadin:vaadin-server:jar:8.1.6
-> com.vaadin:vaadin-push:jar:8.1.6
-> com.vaadin.external.atmosphere:atmosphere-runtime:jar:2.4.11.vaadin2
-> org.atmosphere.jboss.as:jboss-as-websockets:jar:0.5
-> org.jboss.as:jboss-as-server:jar:7.1.1.Final
-> org.jboss.as:jboss-as-controller:jar:7.1.1.Final
-> org.jboss.msc:jboss-msc:jar:1.0.2.GA
-> org.jboss.logging:jboss-logging-processor:jar:1.0.0.Beta5
-> org.jboss.logging:jboss-logging:jar:3.0.0.Beta5-SNAPSHOT
```

This error prevents me to read any linkage error from partial dependency graph. The tool would be more informative if it continues to run Linkage Checker even when a dependency cannot be resolved.

- A dependency that's not supposed to publish in public Maven repository
Vaadin 8.1's buildhelper module is only needed during build time (and thus specified `provided`) (https://github.com/GoogleCloudPlatform/cloud-opensource-java/issues/834#issuecomment-519585027)
- Some artifacts are removed from Maven Central
`xerces:xerces-impl:jar:2.6.2` and `xml-apis:xml-apis:jar:2.6.2` are no longer found in Maven Central https://github.com/GoogleCloudPlatform/cloud-opensource-java/issues/792#issue-471246752

![image](https://user-images.githubusercontent.com/28604/62736194-d4859e80-b9fa-11e9-81bb-59b206022aaf.png)

This enhancement idea would make sense especially when the enforcer rule is used with `reportOnlyReachable = true`. The missing dependency might be unreachable from users project.

Branch partial_deps.

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.