Build multi module java maven project

Viewed 31

I'm new to maven and tried to set it up on a web project that contains several modules! But I am facing a little problem and I don't see how to solve it!

So I have :

MonEar
 |_ Module_db1
 |_ Module_db2
 |_ Module_war

and

<artifactId>Module_db1</artifactId>
<packaging>jar</packaging>
<name>Module_db1</name>
<parent>
    <groupId>MonAppMultiModule</groupId>
    <artifactId>app.multi.module</artifactId>
    <version>0.0.1-SNAPSHOT</version>
</parent>

in the parent pom: XML code:

    <modules>
    <module>Module_db1</module>
    <module>Module_db2</module>
    <module>Module_war</module>
    <module>MonEar</module>
</modules>

there is surely something that I did not understand but I do not see what! Could someone enlighten me?

thank you in advance

Edit: I forgot to specify that I had added the Module_db1 and Module_db dependencies in the Module_war pom. As follows : XML code:

 <dependency>
    <groupId>${project.parent.groupId}</groupId>
    <artifactId>Module_db1</artifactId>
    <version>${project.parent.version}</version>
</dependency>
<dependency>
    <groupId>${project.parent.groupId}</groupId>
    <artifactId>Module_db1</artifactId>
    <version>${project.parent.version}</version>
</dependency>
0 Answers
Related