question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Maven deployment failed on project pulsar-presto-connector-original

See original GitHub issue

Search before asking

  • I searched in the issues and found nothing similar.

Version

Pulsar branch-2.8

$ mvn --version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/xxx/.sdkman/candidates/maven/current
Java version: 11.0.16, vendor: Amazon.com Inc., runtime: /Users/xxx/.sdkman/candidates/java/11.0.16-amzn
Default locale: zh_CN_#Hans, platform encoding: UTF-8
OS name: "mac os x", version: "12.3.1", arch: "x86_64", family: "mac"

Minimal reproduce step

It has succeeded before. But it failed twice in a row when I tried to deploy it again. I have already removed the staging repository. See

image

Follow https://github.com/apache/pulsar/wiki/Release-process#5-stage-artifacts-in-maven (Apache Committer is required)

mvn clean install -DskipTests

export APACHE_USER=$USER
export APACHE_PASSWORD=$MY_PASSWORD
export GPG_TTY=$(tty)
curl -s -o /tmp/mvn-apache-settings.xml https://raw.githubusercontent.com/apache/pulsar/master/src/settings.xml
mvn deploy -DskipTests -Papache-release --settings /tmp/mvn-apache-settings.xml

What did you expect to see?

mvn deploy should succeed.

What did you see instead?

Recently I encounted a problem when I ran the mvn deploy step in https://github.com/apache/pulsar/wiki/Release-process#5-stage-artifacts-in-maven.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.4:shade (default) on project pulsar-presto-connector-original: Error creating shaded jar: duplicate entry: META-INF/services/org.apache.pulsar.shade.org.glassfish.jersey.internal.inject.InjectionManagerFactory -> [Help 1]

[INFO] pulsar-broker-auth-athenz .......................... SUCCESS [ 17.252 s]
[INFO] pulsar-client-auth-athenz .......................... SUCCESS [ 17.002 s]
[INFO] Pulsar SQL :: Parent ............................... SUCCESS [  4.238 s]
[INFO] Pulsar SQL :: Pulsar Presto Connector Packaging .... FAILURE [  6.922 s]
[INFO] Pulsar SQL :: Pulsar Presto Connector .............. SKIPPED
[INFO] Pulsar SQL :: Java Version Trim Agent .............. SKIPPED
[INFO] Pulsar SQL :: Pulsar Presto Distribution ........... SKIPPED

We can see the previous artifacts were deployed successfully.

Anything else?

There were warning logs about the “overlapping resource”

[WARNING] aopalliance-repackaged-2.6.1.jar, hk2-api-2.6.1.jar, hk2-locator-2.6.1.jar, hk2-utils-2.6.1.jar, jakarta.inject-2.6.1.jar, javax.annotation-api-1.3.2.jar, javax.ws.rs-api-2.1.jar, jersey-client-2.34.jar, jersey-common-2.34.jar, jersey-entity-filtering-2.34.jar, jersey-hk2-2.34.jar, jersey-media-json-jackson-2.34.jar, jersey-media-multipart-2.34.jar, jetty-io-9.4.48.v20220622.jar, jetty-security-9.4.27.v20200227.jar, jetty-server-9.4.48.v20220622.jar, jetty-servlet-9.4.48.v20220622.jar, jetty-util-9.4.48.v20220622.jar, jetty-util-ajax-9.4.48.v20220622.jar, managed-ledger.jar, osgi-resource-locator-1.0.3.jar, pulsar-client-admin-original.jar, pulsar-client-original.jar, pulsar-metadata.jar, pulsar-presto-connector-original.jar define 1 overlapping resource: 
[WARNING]   - META-INF/MANIFEST.MF
[WARNING] managed-ledger.jar, pulsar-client-admin-original.jar, pulsar-client-original.jar, pulsar-metadata.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/DEPENDENCIES
[WARNING]   - META-INF/NOTICE
[WARNING] jetty-io-9.4.48.v20220622.jar, jetty-security-9.4.27.v20200227.jar, jetty-server-9.4.48.v20220622.jar, jetty-servlet-9.4.48.v20220622.jar, jetty-util-9.4.48.v20220622.jar, jetty-util-ajax-9.4.48.v20220622.jar, managed-ledger.jar, pulsar-client-admin-original.jar, pulsar-client-original.jar, pulsar-metadata.jar, pulsar-presto-connector-original.jar define 1 overlapping resource: 
[WARNING]   - META-INF/LICENSE
[WARNING] pulsar-client-admin-original.jar, pulsar-presto-connector-original.jar define 233 overlapping classes and resources: 
[WARNING]   - META-INF/maven/org.apache.pulsar/pulsar-client-admin-original/pom.properties
[WARNING]   - META-INF/maven/org.apache.pulsar/pulsar-client-admin-original/pom.xml
[WARNING]   - org.apache.pulsar.client.admin.internal.BaseResource
[WARNING]   - org.apache.pulsar.client.admin.internal.BaseResource$1
[WARNING]   - org.apache.pulsar.client.admin.internal.BaseResource$2
[WARNING]   - org.apache.pulsar.client.admin.internal.BaseResource$3
[WARNING]   - org.apache.pulsar.client.admin.internal.BookiesImpl
[WARNING]   - org.apache.pulsar.client.admin.internal.BookiesImpl$1
[WARNING]   - org.apache.pulsar.client.admin.internal.BookiesImpl$2
[WARNING]   - org.apache.pulsar.client.admin.internal.BookiesImpl$3
[WARNING]   - 223 more...
[WARNING] pulsar-client-original.jar, pulsar-presto-connector-original.jar define 276 overlapping classes and resources: 
[WARNING]   - META-INF/maven/org.apache.pulsar/pulsar-client-original/pom.properties
[WARNING]   - META-INF/maven/org.apache.pulsar/pulsar-client-original/pom.xml
[WARNING]   - findbugsExclude.xml
[WARNING]   - org.apache.pulsar.client.impl.AbstractBatchMessageContainer
[WARNING]   - org.apache.pulsar.client.impl.AcknowledgmentsGroupingTracker
[WARNING]   - org.apache.pulsar.client.impl.AuthenticationUtil
[WARNING]   - org.apache.pulsar.client.impl.AuthenticationUtil$1
[WARNING]   - org.apache.pulsar.client.impl.Backoff
[WARNING]   - org.apache.pulsar.client.impl.BackoffBuilder
[WARNING]   - org.apache.pulsar.client.impl.BatchMessageAcker
[WARNING]   - 266 more...
[WARNING] aopalliance-repackaged-2.6.1.jar, hk2-api-2.6.1.jar, hk2-locator-2.6.1.jar, hk2-utils-2.6.1.jar, jakarta.inject-2.6.1.jar, jersey-client-2.34.jar, jersey-common-2.34.jar, jersey-entity-filtering-2.34.jar, jersey-hk2-2.34.jar, jersey-media-json-jackson-2.34.jar, jersey-media-multipart-2.34.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/LICENSE.md
[WARNING]   - META-INF/NOTICE.md
[WARNING] jersey-client-2.34.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/org.glassfish.jersey.core/jersey-client/pom.properties
[WARNING]   - META-INF/maven/org.glassfish.jersey.core/jersey-client/pom.xml
[WARNING] jersey-common-2.34.jar, jersey-media-json-jackson-2.34.jar, pulsar-presto-connector-original.jar define 1 overlapping resource: 
[WARNING]   - META-INF/NOTICE.markdown
[WARNING] jersey-common-2.34.jar, pulsar-presto-connector-original.jar define 12 overlapping classes and resources: 
[WARNING]   - META-INF.versions.11.org.glassfish.jersey.internal.jsr166.JerseyFlowSubscriber
[WARNING]   - META-INF.versions.11.org.glassfish.jersey.internal.jsr166.JerseyFlowSubscriber$1
[WARNING]   - META-INF.versions.11.org.glassfish.jersey.internal.jsr166.SubmissionPublisher
[WARNING]   - META-INF.versions.11.org.glassfish.jersey.internal.jsr166.SubmissionPublisher$1
[WARNING]   - META-INF.versions.11.org.glassfish.jersey.internal.jsr166.SubmissionPublisher$2
[WARNING]   - META-INF.versions.11.org.glassfish.jersey.internal.jsr166.SubmissionPublisher$3
[WARNING]   - META-INF.versions.11.org.glassfish.jersey.internal.jsr166.SubmissionPublisher$4
[WARNING]   - META-INF.versions.11.org.glassfish.jersey.internal.jsr166.SubmissionPublisher$5
[WARNING]   - META-INF.versions.11.org.glassfish.jersey.internal.jsr166.SubmissionPublisher$6
[WARNING]   - META-INF.versions.11.org.glassfish.jersey.internal.jsr166.SubmissionPublisherFactory
[WARNING]   - 2 more...
[WARNING] osgi-resource-locator-1.0.3.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/org.glassfish.hk2/osgi-resource-locator/pom.properties
[WARNING]   - META-INF/maven/org.glassfish.hk2/osgi-resource-locator/pom.xml
[WARNING] jakarta.inject-2.6.1.jar, pulsar-presto-connector-original.jar define 8 overlapping classes and resources: 
[WARNING]   - META-INF/maven/org.glassfish.hk2.external/jakarta.inject/pom.properties
[WARNING]   - META-INF/maven/org.glassfish.hk2.external/jakarta.inject/pom.xml
[WARNING]   - javax.inject.Inject
[WARNING]   - javax.inject.Named
[WARNING]   - javax.inject.Provider
[WARNING]   - javax.inject.Qualifier
[WARNING]   - javax.inject.Scope
[WARNING]   - javax.inject.Singleton
[WARNING] jersey-media-json-jackson-2.34.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/org.glassfish.jersey.media/jersey-media-json-jackson/pom.properties
[WARNING]   - META-INF/maven/org.glassfish.jersey.media/jersey-media-json-jackson/pom.xml
[WARNING] jersey-entity-filtering-2.34.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/org.glassfish.jersey.ext/jersey-entity-filtering/pom.properties
[WARNING]   - META-INF/maven/org.glassfish.jersey.ext/jersey-entity-filtering/pom.xml
[WARNING] jersey-media-multipart-2.34.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/org.glassfish.jersey.media/jersey-media-multipart/pom.properties
[WARNING]   - META-INF/maven/org.glassfish.jersey.media/jersey-media-multipart/pom.xml
[WARNING] jersey-hk2-2.34.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/org.glassfish.jersey.inject/jersey-hk2/pom.properties
[WARNING]   - META-INF/maven/org.glassfish.jersey.inject/jersey-hk2/pom.xml
[WARNING] hk2-locator-2.6.1.jar, pulsar-presto-connector-original.jar define 101 overlapping classes and resources: 
[WARNING]   - META-INF/maven/org.glassfish.hk2/hk2-locator/pom.properties
[WARNING]   - META-INF/maven/org.glassfish.hk2/hk2-locator/pom.xml
[WARNING]   - org.jvnet.hk2.external.generator.ServiceLocatorGeneratorImpl
[WARNING]   - org.jvnet.hk2.external.runtime.Hk2LocatorUtilities
[WARNING]   - org.jvnet.hk2.external.runtime.Hk2LocatorUtilities$1
[WARNING]   - org.jvnet.hk2.external.runtime.ServiceLocatorRuntimeBean
[WARNING]   - org.jvnet.hk2.internal.AnnotatedElementAnnotationInfo
[WARNING]   - org.jvnet.hk2.internal.AutoActiveDescriptor
[WARNING]   - org.jvnet.hk2.internal.CacheKey
[WARNING]   - org.jvnet.hk2.internal.CacheKey$1
[WARNING]   - 91 more...
[WARNING] aopalliance-repackaged-2.6.1.jar, pulsar-presto-connector-original.jar define 28 overlapping classes and resources: 
[WARNING]   - META-INF/maven/org.glassfish.hk2.external/aopalliance-repackaged/pom.properties
[WARNING]   - META-INF/maven/org.glassfish.hk2.external/aopalliance-repackaged/pom.xml
[WARNING]   - org.aopalliance.aop.Advice
[WARNING]   - org.aopalliance.aop.AspectException
[WARNING]   - org.aopalliance.instrument.Instrumentation
[WARNING]   - org.aopalliance.instrument.InstrumentationError
[WARNING]   - org.aopalliance.instrument.Instrumentor
[WARNING]   - org.aopalliance.instrument.UndoNotSupportedException
[WARNING]   - org.aopalliance.intercept.ConstructorInterceptor
[WARNING]   - org.aopalliance.intercept.ConstructorInvocation
[WARNING]   - 18 more...
[WARNING] hk2-api-2.6.1.jar, pulsar-presto-connector-original.jar define 7 overlapping classes and resources: 
[WARNING]   - META-INF/maven/org.glassfish.hk2/hk2-api/pom.properties
[WARNING]   - META-INF/maven/org.glassfish.hk2/hk2-api/pom.xml
[WARNING]   - org.jvnet.hk2.annotations.Contract
[WARNING]   - org.jvnet.hk2.annotations.ContractsProvided
[WARNING]   - org.jvnet.hk2.annotations.InhabitantAnnotation
[WARNING]   - org.jvnet.hk2.annotations.Optional
[WARNING]   - org.jvnet.hk2.annotations.Service
[WARNING] hk2-utils-2.6.1.jar, pulsar-presto-connector-original.jar define 4 overlapping classes and resources: 
[WARNING]   - META-INF/maven/org.glassfish.hk2/hk2-utils/pom.properties
[WARNING]   - META-INF/maven/org.glassfish.hk2/hk2-utils/pom.xml
[WARNING]   - org.jvnet.hk2.component.MultiMap
[WARNING]   - org.jvnet.hk2.component.MultiMap$1
[WARNING] managed-ledger.jar, pulsar-presto-connector-original.jar define 299 overlapping classes and resources: 
[WARNING]   - META-INF/maven/org.apache.pulsar/managed-ledger/pom.properties
[WARNING]   - META-INF/maven/org.apache.pulsar/managed-ledger/pom.xml
[WARNING]   - MLDataFormats.proto
[WARNING]   - org.apache.bookkeeper.mledger.AsyncCallbacks
[WARNING]   - org.apache.bookkeeper.mledger.AsyncCallbacks$AddEntryCallback
[WARNING]   - org.apache.bookkeeper.mledger.AsyncCallbacks$ClearBacklogCallback
[WARNING]   - org.apache.bookkeeper.mledger.AsyncCallbacks$CloseCallback
[WARNING]   - org.apache.bookkeeper.mledger.AsyncCallbacks$DeleteCallback
[WARNING]   - org.apache.bookkeeper.mledger.AsyncCallbacks$DeleteCursorCallback
[WARNING]   - org.apache.bookkeeper.mledger.AsyncCallbacks$DeleteLedgerCallback
[WARNING]   - 289 more...
[WARNING] pulsar-metadata.jar, pulsar-presto-connector-original.jar define 54 overlapping classes and resources: 
[WARNING]   - META-INF/maven/org.apache.pulsar/pulsar-metadata/pom.properties
[WARNING]   - META-INF/maven/org.apache.pulsar/pulsar-metadata/pom.xml
[WARNING]   - org.apache.pulsar.metadata.api.CacheGetResult
[WARNING]   - org.apache.pulsar.metadata.api.GetResult
[WARNING]   - org.apache.pulsar.metadata.api.MetadataCache
[WARNING]   - org.apache.pulsar.metadata.api.MetadataSerde
[WARNING]   - org.apache.pulsar.metadata.api.MetadataStore
[WARNING]   - org.apache.pulsar.metadata.api.MetadataStoreConfig
[WARNING]   - org.apache.pulsar.metadata.api.MetadataStoreConfig$MetadataStoreConfigBuilder
[WARNING]   - org.apache.pulsar.metadata.api.MetadataStoreException
[WARNING]   - 44 more...
[WARNING] javax.annotation-api-1.3.2.jar, pulsar-presto-connector-original.jar define 3 overlapping resources: 
[WARNING]   - META-INF/LICENSE.txt
[WARNING]   - META-INF/maven/javax.annotation/javax.annotation-api/pom.properties
[WARNING]   - META-INF/maven/javax.annotation/javax.annotation-api/pom.xml
[WARNING] jetty-io-9.4.48.v20220622.jar, jetty-security-9.4.27.v20200227.jar, jetty-server-9.4.48.v20220622.jar, jetty-servlet-9.4.48.v20220622.jar, jetty-util-9.4.48.v20220622.jar, jetty-util-ajax-9.4.48.v20220622.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/NOTICE.txt
[WARNING]   - about.html
[WARNING] jetty-security-9.4.27.v20200227.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/org.eclipse.jetty/jetty-security/pom.properties
[WARNING]   - META-INF/maven/org.eclipse.jetty/jetty-security/pom.xml
[WARNING] javax.ws.rs-api-2.1.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/javax.ws.rs/javax.ws.rs-api/pom.properties
[WARNING]   - META-INF/maven/javax.ws.rs/javax.ws.rs-api/pom.xml
[WARNING] jetty-server-9.4.48.v20220622.jar, pulsar-presto-connector-original.jar define 3 overlapping resources: 
[WARNING]   - META-INF/maven/org.eclipse.jetty/jetty-server/pom.properties
[WARNING]   - META-INF/maven/org.eclipse.jetty/jetty-server/pom.xml
[WARNING]   - jetty-dir.css
[WARNING] jetty-servlet-9.4.48.v20220622.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/org.eclipse.jetty/jetty-servlet/pom.properties
[WARNING]   - META-INF/maven/org.eclipse.jetty/jetty-servlet/pom.xml
[WARNING] jetty-util-ajax-9.4.48.v20220622.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/org.eclipse.jetty/jetty-util-ajax/pom.properties
[WARNING]   - META-INF/maven/org.eclipse.jetty/jetty-util-ajax/pom.xml
[WARNING] jetty-util-9.4.48.v20220622.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/org.eclipse.jetty/jetty-util/pom.properties
[WARNING]   - META-INF/maven/org.eclipse.jetty/jetty-util/pom.xml
[WARNING] jetty-io-9.4.48.v20220622.jar, pulsar-presto-connector-original.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/org.eclipse.jetty/jetty-io/pom.properties
[WARNING]   - META-INF/maven/org.eclipse.jetty/jetty-io/pom.xml
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/

Are you willing to submit a PR?

  • I’m willing to submit a PR!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
tisonkuncommented, Sep 12, 2022

@BewareMyPower upstream fix is pending to release. You can assign this issue to me and I will do the upgrade after it’s done.

1reaction
BewareMyPowercommented, Aug 11, 2022

Run mvn clean deploy solves this issue, I’ve updated it in here. But it still looks like a bug for Pulsar, so keep this issue open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven repository deployment failed - java - Stack Overflow
I am doing a springboot restapi with crud functions. When I'm trying to deploy the project, this error occurred. [ERROR]Failed to execute ...
Read more >
Maven error: "Deployment failed: repository element was not ...
You are trying to build your project with Maven and see the error: "Deployment failed: repository element was not specified in the POM ......
Read more >
Apache Maven Deploy Plugin – Introduction
deploy :deploy is used to automatically install the artifact, its pom and the attached artifacts produced by a particular project.
Read more >
Error while deploying a jar that contains a pom.xml ... - JFrog
While deploying a jar built by maven that contains the pom.xml inside the META-INF folder and uses a property for the artifact version,...
Read more >
Solved: maven deploy fails to upload in nexus
I'm getting the following error in Jenkins. ... (default-deploy) on project REDACTED: Failed to deploy artifacts: Could not transfer artifact REDACTED ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found