Hello Yi,
Is your parent pom in a parent directory of your module project? If not, you need to add <relativePath> element to your module project and refer to it in parent pom using relative path as well. E.g.; if your directory structure look like this:
Workspace/
parent-project/
pom.xml
child-project/
pom.xml
Assuming your parent-project pom.xml entries looks like:
<groupId>com.example</groupId>
<artifactId>example-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
you need to add:
<modules>
<module>../child-project</module>
</modules>
and in child-project pom.xml you need to specify parent pom with a relative path:
<parent>
<groupId>com.example</groupId>
<artifactId>example-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../parent-project</relativePath>
</parent>
I hope it helps! Let us know if you have any other problems.