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

Issue using the maven rule #376

Open
yeshamavani opened this issue Mar 28, 2023 · 3 comments
Open

Issue using the maven rule #376

yeshamavani opened this issue Mar 28, 2023 · 3 comments
Assignees

Comments

@yeshamavani
Copy link

Hello
I am new to maven as well as bazel
I am currently working on a POC to check how we can build and deploy java maven monorepo structure repositories to maven central
This is the link to my git repo monorepo -- https://github.com/yeshamavani/mavenpublish

I have added the hhtp_archive in my WORKSPACE file pointing to the repository
But I am still facing the error
can I get some help on this, as mentioned I am new to bazel and infact maven as well but seeing the benefits of bazel over maven we would like to start with bazel itself.

image
image

I even tried placing this particular http_archive at the start/ end of the file but still no luck.

Hope to here from you.

@alexjpwalker
Copy link
Member

Hi @yeshamavani ! Delighted to hear you're in the process of adopting Bazel - we've found it results in faster builds and more scalable build infrastructure overall.

Unfortunately cyclic dependencies in the WORKSPACE file are one challenge to overcome. I'd suggest trying a few things:

  • Maybe move the vaticle_bazel_distribution http_archive closer to the top of the file (currently it is at the bottom);
  • Maybe delete the bazel_skylib http_archive and/or the rules_jvm_external http_archive. To the best of my knowledge, vaticle_bazel_distribution already depends on both.

Good luck!

@yeshamavani
Copy link
Author

Hello @alexjpwalker
I tried to play around with the placement of vaticle_bazel_distribution but this time I have a new error
Here is a link to my PR -- yeshamavani/mavenpublish#2 that I am working on

I have used https://github.com/wix/greyhound as a reference and tried loading vaticle-bazel and rules_jvm_external just the way they did but still I have no luck
Can I please get some help over this I have to submit a POC to my team on this.
image

@alexjpwalker
Copy link
Member

@yeshamavani I'm guessing from that error message that you have two Bazel targets named sharedlibrary in the same package (BUILD file). Target names must be unique within each BUILD file, as must be the files that they output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants