Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] pulsar-client-all build failures due to shaded sources #20034

Closed
1 of 2 tasks
Apurva007 opened this issue Apr 6, 2023 · 4 comments
Closed
1 of 2 tasks

[Bug] pulsar-client-all build failures due to shaded sources #20034

Apurva007 opened this issue Apr 6, 2023 · 4 comments
Labels
type/bug The PR fixed a bug or issue reported a bug

Comments

@Apurva007
Copy link
Contributor

Search before asking

  • I searched in the issues and found nothing similar.

Version

Mac OS: Ventura 13.2.1
Pulsar Version: Build source code as per commit ID: d091675

Minimal reproduce step

Build Source code using following:

mvn clean -pl pulsar-client-all install -DskipTests

What did you expect to see?

Successful build

What did you see instead?

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:00 min
[INFO] Finished at: 2023-04-06T12:56:51-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.4.1:shade (default) on project pulsar-client-all: Error creating shaded jar: error in opening zip file /Users/atelang/.m2/raptor2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava-sources.jar -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Anything else?

This is caused by the change: #19956

If I comment this change, then the build passes.

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@Apurva007 Apurva007 added the type/bug The PR fixed a bug or issue reported a bug label Apr 6, 2023
@Apurva007
Copy link
Contributor Author

@tisonkun / @eolivelli Please can you clarify if you faced this issue?

@tisonkun
Copy link
Member

tisonkun commented Apr 6, 2023

Hi @Apurva007! I can build the whole project on the current master f568c8f with:

./mvnw clean install -DskipTests

For your specific issue, please check if /Users/atelang/.m2/raptor2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava-sources.jar an empty or malformed file. Generally, you can delete /Users/atelang/.m2/raptor2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava and rebuild, so that maven will fetch the dependency once more.

For usage question, I suggest you open a discussion on the Q&A forum the next time.

@Apurva007
Copy link
Contributor Author

@tisonkun Thanks for the response. Thats interesting. The sources jar actually did not exist before the build. It was created after I ran the maven build and then failed. It is possible that a malformed file is being generated. I actually tried deleted the listenablefuture folder in .m2 and tried running the build again. That also failed.
But if its working for you, then it might be a localized issue. I will close this issue and try to find the root cause on my side.
Thanks again!

@tisonkun
Copy link
Member

tisonkun commented Apr 7, 2023

Cherry-picking the result to here for anyone who encounter similar issue:

Thanks for responding on the issues page. I found the root cause. There was a bad guava sources jar in the artifactory that I was using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

No branches or pull requests

2 participants