Wednesday, June 11, 2014

Configuring Maven MultiModule Project

Declaration of parent pom
<groupId>SoftMavenProjectDemo</groupId>
<artifactId>ParentPom</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>DtoServiceSample</module>
<module>ControllerLayerSample</module>
<module>DaoServiceSample</module>
</modules>


for module DaoServiceSample



<parent>
    <groupId>SoftMavenProjectDemo</groupId>
    <artifactId>ParentPom</artifactId>
    <version>0.0.1-SNAPSHOT</version>
  </parent>

  <artifactId>DaoServiceSample</artifactId>
  <name>DaoServiceSample</name>
  <url>http://maven.apache.org</url>

  if dependency for dto module is to be added

  SoftMavenProjectDemo is same as parent pom groupid
   <dependency>
     <groupId>SoftMavenProjectDemo</groupId>
   <artifactId>DtoServiceSample</artifactId>
      <version>0.0.1-SNAPSHOT</version>
    </dependency>

No comments:

Post a Comment