Child module pom xml does not exist

This exception happens when you are working with Maven and try to add maven module to the parent project and don’t follow the maven specification to create Parent and its child module. It means you have created Parent module and try to add child module just putting parent dependencies in child pom.xml.

  • You will see this exception while running mvn install command where parent tries to find child module during build.
C:\Users\JavaHonk\git\JavaHonk\JavaHonkParent>mvn install
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.wfs.JavaHonk:parent:1.0-SNAPSHOT (C:\Users\JavaHonk\git\JavaHonk\JavaHonkParent\pom.xml) has 1 error
[ERROR]     Child module C:\Users\JavaHonk\git\JavaHonk\JavaHonkParent\optionExpiry of C:\Users\JavaHonk\git\JavaHonk\JavaHonkParent\pom.xml does not exist
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
C:\Users\JavaHonk\git\JavaHonk\JavaHonkParent>
  • Solution: To fix this issue include pom.xml file in parent as below and if child project folder does not exists create folder as below and copy paste child pom.xml from child project to parent child module as below:

Child module pom xml does not exist

  • For more information how to create multiple maven project please visit my other tutorial here and for maven official documentation please visit this URL

Leave a Reply

Your email address will not be published. Required fields are marked *