Search code examples
eclipsemavenmaven-2project-structure

How to Split Maven project into different modules?


I am completely newbie to Maven, I've a requirement to split my project into four different projects like

  1. web project
  2. model project
  3. DAOs project
  4. Tests project

Finally packaging should be single war file only for deployment. Please tell me the best way to do that, using Spring 3.2 + Hibernate + Eclipse Juno.

Please tell me the procedure and give me that sample application link. Please explain.

And finally I don't know what exactly difference between Maven and Maven 2.


Solution

  • Have you tried to look into this:
    http://books.sonatype.com/mvnex-book/reference/multimodule.html

    It contains an example that I think can help you to get started i.e. it describes multi module projects. You can then use it as a base reference for your case.

    There is some article that describes between Maven 1 and Maven 2 here:
    http://community.scmgalaxy.com/blog/view/19418