typedb / bazel-distribution

Bazel rules for assembling and deploying software distributions (see @vaticle for usage example)
https://bazel.build
Apache License 2.0
155 stars 53 forks source link

Issue using the maven rule #376

Open yeshamavani opened 1 year ago

yeshamavani commented 1 year ago

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 commented 1 year ago

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:

Good luck!

yeshamavani commented 1 year ago

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 -- https://github.com/yeshamavani/mavenpublish/pull/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 commented 1 year ago

@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.