user3619128
user3619128

Reputation: 285

child module not found in maven multi project execution

I created two projects(PROJECT-1,PROJECT-2) in the directory and i would like to execute both the projects in one click for that i create another project(PROJECT-3) in the directory and present these two projects((PROJECT-1,PROJECT-2) as modules and define packaging as pom Here i am using modules concept.

<modules>
  <module>D:/20-6-2014/PROJECT-1</module>
  <module>D:/20-6-2014/PROJECT-2</module>
</module>

I define the PROJECT-3 as parent for both the projects,while i run the PROJECT-3 it gives an error.

Error is: Child module D:\20-6-2014\PROJECT-3\PROJECT-1 of D:\20-6-2014\PROJECT-3\POM.XML does not exist.

Upvotes: 2

Views: 8487

Answers (1)

Jigar Joshi
Jigar Joshi

Reputation: 240956

your directory structure should be like as follows PROJECT-3 is your parent project for PROJECT-1 and PROJECT-2

|
|
----PROJECT-3
    |
    |
    ----pom.xml
    |
    |
    ----PROJECT-1
    |        |
    |        |
    |        ------pom.xml
    ----PROJECT-2
            |
            |
            -------pom.xml

and PROJECT-3's pom.xml should have

<modules>
  <module>PROJECT-1</module>
  <module>PROJECT-2</module>
</module>

Upvotes: 1

Related Questions