Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any consideration for maven project and sbt project and play framework to share one single repository?

I got working on a set of maven projects, one scala project and one Play project.

With default configuration, the default repositories for each of them are:

  • maven @ /Users/Barry/.m2/repository
  • sbt @ /Users/Barry/.ivy2
  • activator @ /Users/geek/Runtimes/activator-1.2.1/repository

Why there are so many different repositories? When I use all of the 3 build tools, can I choose to store all the libraries in a single repository?

And Play 2.1 also has cache directory, which will lead to chaos while I rebuild the maven projects with same release version, and then compile the play project with same dependencies from the maven projects.

Is there any good practice for this case?

Thanks.

like image 717
Barry Zhong Avatar asked Jun 12 '14 13:06

Barry Zhong


1 Answers

In such cases you can use fourth, remote repository to share artifacts between them: although each build tool needs its own local 'cache', you will have common repository for all them and then you can clear those caches from time to time if it takes too much space.

You can create the remote repository with a tool like Sonatype Nexus, or just treat a local or network directory as a remote repository (Maven supports this kind of remote repositories, I think that SBT too).

like image 84
iirekm Avatar answered Sep 20 '22 16:09

iirekm