My projects consists of three sub-projects, and my parent pom looks like:
<groupId>com.bwort.core</groupId>
<artifactId>bwort</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>bwort</name>
<modules>
<module>proj1</module>
<module>proj2</module>
<module>proj3</module>
</modules>
Now my project needs to dependent this project below, which comprises three subprojects, with a parent pom. In particular, it already has a parent as below: https://github.com/cmusphinx/sphinx4/blob/master/pom.xml
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<groupId>edu.cmu.sphinx</groupId>
<artifactId>sphinx4-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
My question is, how can I declare the dependency in my parent pom file? I can add another module to my parent pom:
<module>sphinx4</module>
But since this library already defined its own parent "oss-parent", then how can I make my parent pom as its parent?
What's the right way for my project to depend on this project? Thank you.
EDITTED: My pom.xml
<project >
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.bwort.core</groupId>
<artifactId>bwort</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>wikipedia</artifactId>
<packaging>jar</packaging>
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>edu.cmu.sphinx</groupId>
<artifactId>sphinx4-core</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>edu.cmu.sphinx</groupId>
<artifactId>sphinx4-data</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>