adoroszlai opened a new pull request, #8416:
URL: https://github.com/apache/ozone/pull/8416

   ## What changes were proposed in this pull request?
   
   `hdds-hadoop-dependency-client` provides a filtered view of some Hadoop 
modules, excluding various transitive dependencies.  The module is otherwise 
empty:
   
   ```
   [INFO] --- dependency:3.8.1:analyze-only (analyze) @ 
hdds-hadoop-dependency-client ---
   [WARNING] Unused declared dependencies found:
   [WARNING]    com.nimbusds:nimbus-jose-jwt:jar:9.40:compile
   [WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
   [WARNING]    org.apache.hadoop:hadoop-annotations:jar:3.4.1:compile
   [WARNING]    org.apache.hadoop:hadoop-hdfs-client:jar:3.4.1:compile
   [WARNING]    org.xerial.snappy:snappy-java:jar:1.1.10.7:compile
   ```
   
   It is used as a dependency to add the transitive ones for Ozone's 
common/client modules.  These are flagged by `dependency:analyze`, e.g.:
   
   ```
   [INFO] --- dependency:3.8.1:analyze-only (analyze) @ ozone-filesystem-common 
---
   [WARNING] Used undeclared dependencies found:
   [WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
   [WARNING]    org.apache.hadoop:hadoop-hdfs-client:jar:3.4.1:compile
   [WARNING] Unused declared dependencies found:
   [WARNING]    
org.apache.ozone:hdds-hadoop-dependency-client:jar:2.1.0-SNAPSHOT:compile
   ```
   
   Such noise makes it hard to spot real dependency problems.
   
   This PR changes `hdds-hadoop-dependency-client` in the following way:
   
   - Custom exclusion is defined only for `hadoop-common`, other modules get 
the default exclusions from root POM.
   - Type is changed to `pom`.  Common/client modules now use 
`hdds-hadoop-dependency-client` as parent instead of dependency.
   - `hadoop-common` is declared in `dependencyManagement` instead of 
`dependencies`.  This way child modules inherit the exclusion, but each module 
can/should declare the actual dependencies it requires.
   
   Thus, the modules being changed by this PR no longer have warnings related 
to `hadoop-common` and any other `hadoop-*` dependencies.  (They have warnings 
related to other dependencies, and some other modules still have warnings 
related to `hadoop-*`.  Those will be fixed by follow-up tasks.)
   
   HDDS/Ozone modules' `dependency` definitions have to be moved to root POM, 
to expose Ozone modules to `ozone-common`, `ozone-filesystem`, etc., which now 
have `hdds-hadoop-dependency-client` as parent.
   
   https://issues.apache.org/jira/browse/HDDS-12187
   
   ## How was this patch tested?
   
   CI:
   https://github.com/adoroszlai/ozone/actions/runs/14908849637
   
   Compared dependency warnings:
   
   ```diff
   @@ -3,13 +3,6 @@
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ hdds ---
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ 
hdds-annotation-processing ---
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ hdds-config ---
   -[INFO] --- dependency:3.8.1:analyze-only (analyze) @ 
hdds-hadoop-dependency-client ---
   -[WARNING] Unused declared dependencies found:
   -[WARNING]    com.nimbusds:nimbus-jose-jwt:jar:9.40:compile
   -[WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
   -[WARNING]    org.apache.hadoop:hadoop-annotations:jar:3.4.1:compile
   -[WARNING]    org.apache.hadoop:hadoop-hdfs-client:jar:3.4.1:compile
   -[WARNING]    org.xerial.snappy:snappy-java:jar:1.1.10.7:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ hdds-interface-client 
---
    [WARNING] Unused declared dependencies found:
    [WARNING]    javax.annotation:javax.annotation-api:jar:1.3.2:compile
   @@ -17,9 +10,8 @@
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ hdds-test-utils ---
    [WARNING] Used undeclared dependencies found:
    [WARNING]    org.junit.platform:junit-platform-engine:jar:1.12.2:provided
   +[INFO] --- dependency:3.8.1:analyze-only (analyze) @ 
hdds-hadoop-dependency-client ---
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ hdds-common ---
   -[WARNING] Used undeclared dependencies found:
   -[WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
    [WARNING] Unused declared dependencies found:
    [WARNING]    org.slf4j:jcl-over-slf4j:jar:2.0.17:compile
    [WARNING]    javax.annotation:javax.annotation-api:jar:1.3.2:compile
   @@ -29,19 +21,15 @@
    [WARNING]    
com.google.errorprone:error_prone_annotations:jar:2.29.2:compile
    [WARNING]    org.jetbrains.kotlin:kotlin-stdlib:jar:1.9.25:compile
    [WARNING]    io.jaegertracing:jaeger-client:jar:1.8.1:compile
   -[WARNING]    
org.apache.ozone:hdds-hadoop-dependency-client:jar:2.1.0-SNAPSHOT:compile
    [WARNING]    io.dropwizard.metrics:metrics-core:jar:3.2.6:compile
    [WARNING] Non-test scoped test only dependencies found:
    [WARNING]    org.bouncycastle:bcutil-jdk18on:jar:1.80:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ hdds-erasurecode ---
    [WARNING] Used undeclared dependencies found:
    [WARNING]    org.apache.commons:commons-lang3:jar:3.17.0:compile
   -[WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
    [WARNING] Non-test scoped test only dependencies found:
    [WARNING]    org.apache.commons:commons-lang3:jar:3.17.0:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ hdds-client ---
   -[WARNING] Used undeclared dependencies found:
   -[WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ hdds-interface-server 
---
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ hdds-managed-rocksdb 
---
    [WARNING] Used undeclared dependencies found:
   @@ -96,38 +84,16 @@
    [WARNING]    io.netty:netty-handler-proxy:jar:4.1.109.Final:compile
    [WARNING]    io.netty:netty-codec-http2:jar:4.1.109.Final:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ ozone-common ---
   -[WARNING] Used undeclared dependencies found:
   -[WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
   -[WARNING]    org.apache.hadoop:hadoop-hdfs-client:jar:3.4.1:compile
    [WARNING] Unused declared dependencies found:
    [WARNING]    io.netty:netty-handler-proxy:jar:4.1.109.Final:compile
    [WARNING]    io.netty:netty-codec-http2:jar:4.1.109.Final:compile
   -[WARNING]    
org.apache.ozone:hdds-hadoop-dependency-client:jar:2.1.0-SNAPSHOT:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ ozone-client ---
   -[WARNING] Used undeclared dependencies found:
   -[WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ 
ozone-filesystem-common ---
   -[WARNING] Used undeclared dependencies found:
   -[WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
   -[WARNING]    org.apache.hadoop:hadoop-hdfs-client:jar:3.4.1:compile
   -[WARNING] Unused declared dependencies found:
   -[WARNING]    
org.apache.ozone:hdds-hadoop-dependency-client:jar:2.1.0-SNAPSHOT:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ ozone-filesystem ---
   -[WARNING] Used undeclared dependencies found:
   -[WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
    [WARNING] Unused declared dependencies found:
    [WARNING]    org.apache.ozone:ozone-client:jar:2.1.0-SNAPSHOT:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ ozone-cli-shell ---
   -[WARNING] Used undeclared dependencies found:
   -[WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
   -[WARNING]    org.apache.hadoop:hadoop-hdfs-client:jar:3.4.1:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ ozone-cli-admin ---
   -[WARNING] Used undeclared dependencies found:
   -[WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
   -[WARNING]    org.apache.hadoop:hadoop-annotations:jar:3.4.1:compile
   -[WARNING]    org.apache.hadoop:hadoop-hdfs-client:jar:3.4.1:compile
   -[WARNING] Unused declared dependencies found:
   -[WARNING]    
org.apache.ozone:hdds-hadoop-dependency-client:jar:2.1.0-SNAPSHOT:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ ozone-csi ---
    [WARNING] Unused declared dependencies found:
    [WARNING]    ch.qos.reload4j:reload4j:jar:1.2.26:compile
   @@ -158,10 +124,6 @@
    [WARNING] Unused declared dependencies found:
    [WARNING]    org.kohsuke.metainf-services:metainf-services:jar:1.11:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ ozone-httpfsgateway ---
   -[WARNING] Used undeclared dependencies found:
   -[WARNING]    org.apache.hadoop:hadoop-auth:jar:3.4.1:compile
   -[WARNING]    org.apache.hadoop:hadoop-common:jar:3.4.1:compile
   -[WARNING]    org.apache.hadoop:hadoop-hdfs-client:jar:3.4.1:compile
    [WARNING] Unused declared dependencies found:
    [WARNING]    org.glassfish.jersey.core:jersey-server:jar:2.46:compile
    [WARNING]    org.eclipse.jetty:jetty-server:jar:9.4.57.v20241219:compile
   @@ -171,7 +133,6 @@
    [WARNING]    org.eclipse.jetty:jetty-webapp:jar:9.4.57.v20241219:compile
    [WARNING]    org.glassfish.jaxb:jaxb-runtime:jar:2.3.9:compile
    [WARNING]    org.glassfish.jersey.inject:jersey-hk2:jar:2.46:compile
   -[WARNING]    
org.apache.ozone:hdds-hadoop-dependency-client:jar:2.1.0-SNAPSHOT:compile
    [WARNING]    
org.apache.ozone:ozone-filesystem-common:jar:2.1.0-SNAPSHOT:compile
    [INFO] --- dependency:3.8.1:analyze-only (analyze) @ ozone-insight ---
    [WARNING] Used undeclared dependencies found:
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to