You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/03 15:56:30 UTC

[GitHub] [pulsar] tisonkun commented on issue #17047: [Bug] Maven deployment failed on project pulsar-presto-connector-original

tisonkun commented on issue #17047:
URL: https://github.com/apache/pulsar/issues/17047#issuecomment-1236149132

   I think I found the root cause. After the first run, we have both:
   
   ```
   [DEBUG] Transforming META-INF/services/org.apache.pulsar.shade.org.glassfish.jersey.internal.inject.InjectionManagerFactory using org.apache.maven.plugins.shade.resource.ServicesResourceTransformer
   [DEBUG] Transforming META-INF/services/org.glassfish.jersey.internal.inject.InjectionManagerFactory using org.apache.maven.plugins.shade.resource.ServicesResourceTransformer
   ```
   
   ... in the path. And perhaps due to `ServicesResourceTransformer` first treat them as different files, but after relocated, they are under the same name, so when shaded into the final jar file, it failed on:
   
   ```
   Caused by: java.util.zip.ZipException: duplicate entry: META-INF/services/org.apache.pulsar.shade.org.glassfish.jersey.internal.inject.InjectionManagerFactory
       at java.util.zip.ZipOutputStream.putNextEntry (ZipOutputStream.java:241)
       at java.util.jar.JarOutputStream.putNextEntry (JarOutputStream.java:115)
       at org.apache.maven.plugins.shade.resource.ServicesResourceTransformer.modifyOutputStream (ServicesResourceTransformer.java:125)
       at org.apache.maven.plugins.shade.DefaultShader.shade (DefaultShader.java:155)
       at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute (ShadeMojo.java:500)
       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
   ```
   
   This should be an upstream issue to resolve. As long as we hold the dependency and relocation logic, it's always there. We may try to get rid of the dependency of `jersey-hk2-2.34.jar` and hope there're no more bad cases.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org