I have the following project structure.
|-- module1
| `-- pom.xml
`-- module2
`-- pom.xml
I want to build module2 jar and it should contain module1's jar. In the pom.xml of module 2 , I have added module1 as a dependency. But even after providing relativePath, it is unable to build module1.The error I get is, "The POM for com.abc.xyz:module1:1.0 is missing, no dependency information available" . I tried the following. But it did not work. Please help to resolve this issue.
<project>
<parent>
<groupId>com.abc.xyz</groupId>
<artifactId>module2</artifactId>
<version>1.0</version>
<relativePath>../module2/pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>com.abc.xyz</groupId>
<artifactId>module1</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>