[ 
https://issues.apache.org/jira/browse/KAFKA-16359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17825772#comment-17825772
 ] 

Apoorv Mittal commented on KAFKA-16359:
---------------------------------------

Though by the time fix and release happens, below workaround might suppress the 
warning for now (not a good practice but a workaround for now):
{code:java}
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration combine.children="append">
          <!-- warnings as errors. -->
          <showWarnings>true</showWarnings>
          <failOnWarning>true</failOnWarning>
          <fork>true</fork>
          <compilerArgs>
            ...
            ...    
            <!-- This is needed to ignore warnings from the kafka-clients SDK 
jar about
            "bad path element"
            -->
            <arg>-Xlint:-path</arg>
            ...
          </compilerArgs> {code}
Similar shadow jar issue encountered by launchdarkly and others, reference 
https://github.com/launchdarkly/java-server-sdk/issues/240

> kafka-clients-3.7.0.jar published to Maven Central is defective
> ---------------------------------------------------------------
>
>                 Key: KAFKA-16359
>                 URL: https://issues.apache.org/jira/browse/KAFKA-16359
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 3.7.0
>            Reporter: Jeremy Norris
>            Assignee: Apoorv Mittal
>            Priority: Critical
>
> The {{kafka-clients-3.7.0.jar}} that has been published to Maven Central is 
> defective: it's {{META-INF/MANIFEST.MF}} bogusly include a {{Class-Path}} 
> element:
> {code}
> Manifest-Version: 1.0
> Class-Path: zstd-jni-1.5.5-6.jar lz4-java-1.8.0.jar snappy-java-1.1.10
> .5.jar slf4j-api-1.7.36.jar
> {code}
> This bogus {{Class-Path}} element leads to compiler warnings for projects 
> that utilize it as a dependency:
> {code}
> [WARNING] [path] bad path element 
> ".../.m2/repository/org/apache/kafka/kafka-clients/3.7.0/zstd-jni-1.5.5-6.jar":
>  no such file or directory
> [WARNING] [path] bad path element 
> ".../.m2/repository/org/apache/kafka/kafka-clients/3.7.0/lz4-java-1.8.0.jar": 
> no such file or directory
> [WARNING] [path] bad path element 
> ".../.m2/repository/org/apache/kafka/kafka-clients/3.7.0/snappy-java-1.1.10.5.jar":
>  no such file or directory
> [WARNING] [path] bad path element 
> ".../.m2/repository/org/apache/kafka/kafka-clients/3.7.0/slf4j-api-1.7.36.jar":
>  no such file or directory
> {code}
> Either the {{kafka-clients-3.7.0.jar}} needs to be respun and published 
> without the bogus {{Class-Path}} element in it's {{META-INF/MANIFEST.MF}} or 
> a new release should be published that corrects this defect.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to