title: One Java Project with multiple Git repos
body: <p>We have one big java web-project, and we are using Git locally, and we have Stash as an in-house Git Server to commit/push our code to.</p>
  
  <p>The following are all separate repo's in our git:</p>
  
  <pre><code>repo - java/spring/maven/hibernate entity and dao's jar
  repo - java/spring/maven - business services 1 which makes use of the previous jar
  repo - java/spring/maven - business services 2 which makes use of the previous jar
  repo - java/spring/maven - business services 3 which makes use of the previous jar
  repo - java/spring/maven/smartgwt - business services 2 which makes use of the previous 3 business service jars.
  </code></pre>
  
  <p>All of these build separately with their own maven pom.xml file.  In this architecture, when we add a new DAO method, we put a similar Business Service call in, 
  and then we add a web-service GET to handle a call to that new business service.</p>
  
  <p>One of my colleagues doesn't like git and finds it too much work to manage these separate repos, for that reason and many others, he would prefer to go back to svn.
  He also thinks branching will become too much work for each repo.  I personally think it would be crazy to go back to svn, and I think sub-modules might be a better way to go.</p>
  
  <p>Would a better solution be to:</p>
  
  <pre><code>repo - Project_BackEnd, which contains 3 or more sub-modules
  submodule- java/spring/maven - business services 1 which makes use of the previous jar
  submodule- java/spring/maven - business services 2 which makes use of the previous jar
  submodule- java/spring/maven - business services 3 which makes use of the previous jar
  
  repo - Project_FrontEnd
  submodule - java/spring/maven/smartgwt - business services 2 which makes use of the previous 3 business service jars.
  </code></pre>
  
  <p>I did take a look for a specific example of Git with multiple java Spring projects, but didn't find anything.  I apologize if this is a duplicate of other questions.</p>
  
  <p>UPDATE:
  Although I do not mind separate git repos for different aspects of one overall project, my co-workers who are no more git experts than I, find it cumbersome and don't see the overall future benefits of git and I don't want us to go backwards to SVN.</p>
  
  <p>I've done a lot of research between sub-modules and sub-trees, and I don't know if any of these would suit our needs, and I understand they have their pros/cons.</p>
  
  <p>It might be easier to just create git-repo for the backend.  Since we are using maven, we could have a parent maven project, and then create maven modules.  That way the various back-end libraries would have their own pom.xml files and still build different jars.</p>
  
  <p>Any change to any of these sub-modules would then trigger a change, and the CI could do a build on that project.   </p>
  
  <p>Thoughts?</p>