exodus icon indicating copy to clipboard operation
exodus copied to clipboard

Moving Maven Java project to Bazel

Open arkadyb opened this issue 5 years ago • 6 comments

Medium and documentation states to use Zinc to with scala-maven-plugin to analyse the project. It does not seem to work for Java project. I dont get any analysis folders generated. Is there any guide for Java project?

arkadyb avatar Aug 30 '19 12:08 arkadyb

@arkadyb, The scala-maven-plugin is able to analyse Java source files. Have you followed the instructions of the prerequisites page to the letter?

Namely , added the scala-maven-plugin to your maven plugins list with incremental recompile mode and also added a dependency on scala-library to your dependencies list? Do you mind sharing your pom.xml configuration?

natansil avatar Aug 30 '19 20:08 natansil

Hi @natansil, what is the expected output of the zinc plugin? How do i know if it actually worked? Having done all the listed prerequisites, but getting Exception in thread "main" com.wixpress.build.maven.MissingPomException: Failed to read artifact descriptor for group-id:artifact-id:jar:1.0.0-SNAPSHOT.

arkadyb avatar Sep 02 '19 01:09 arkadyb

@arkadyb I suspect some version conflicts.

Please supply: The pom.xml where you configured the plugin and dependency (you can of-course react any thing you don't want to share)

Please also supply all the commands your running and their full response Especially, the full stack Trace of exceptions

Also, which Maven version are you using? And which bazel version.

Thank you for your cooperation!

natansil avatar Sep 02 '19 19:09 natansil

@arkadyb, Maybe the path to your local .m2 repository is incorrect? -Dlocal.maven.repository.path=<PATH-TO-LOCAL-.m2-REPO> should be something like /Users/natans/.m2/repository (for macs at least)

natansil avatar Sep 04 '19 10:09 natansil

@arkadyb I had that same error when using ~/.m2/repository as my maven repo path. I needed to change it to the full path.

bigkraig avatar Sep 26 '19 21:09 bigkraig

Thank you @bigkraig. I've added a note in docs to only use full absolute paths.

natansil avatar Sep 27 '19 19:09 natansil