Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here is what I do and have done. I make a <a href="http://www.sonatype.com/books/mvnex-book/reference/multimodule.html" rel="noreferrer">multi-module Maven</a> project where I basically keep all my core reusable code.</p> <p>Then for all my other web projects (projects that make a WAR) I use SBT, Gradle, and even Ant with Maven plugins in some cases. <em>Those projects hold there own config (like db host and creds)</em>.</p> <pre><code>framework - pom.xml - db-module - pom.xml - src/main/resources # possible classpath loading config here - etc... - mail-module - pom.xml - etc... - service-module - pom.xml - etc... </code></pre> <p>Other projects then just depend on the framework and for SBT projects (play 2.0) you can set it up so that one of your resolvers is a local maven repo: <a href="https://github.com/harrah/xsbt/wiki/Getting-Started-Library-Dependencies" rel="noreferrer">https://github.com/harrah/xsbt/wiki/Getting-Started-Library-Dependencies</a></p> <p><strong>EDIT for clarification:</strong> Framework pom.xml is the parent project. You can make the mail-module depend on the db-module and then in your separate web app project you can just depend on the mail-module and you will get both the mail-module and the db -module.</p> <p>Many people throw Maven under the bus but it still does multi-module projects better than anything else.</p> <p>More explanation:</p> <ul> <li><p><a href="http://www.sonatype.com/books/mvnex-book/reference/multimodule-web-spring-sect-intro.html#fig-multimodule-web-spring-projects" rel="noreferrer">http://www.sonatype.com/books/mvnex-book/reference/multimodule-web-spring-sect-intro.html#fig-multimodule-web-spring-projects</a></p></li> <li><p>Download the example maven pom files here: <a href="http://www.sonatype.com/book/mvn-examples-1.0.zip" rel="noreferrer">http://www.sonatype.com/book/mvn-examples-1.0.zip</a> ... Chapter 7 is the multi-module.</p></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload