Maven child module does not exist
The question is: Should there be a pom.xml right below projectName-war
Simply put yes.
You have already figured out the trick, and since you haven't provided a project descriptor aka pom.xml to maven, it won't be able to call the projectName-war a valid child module.
There must absolutely be a pom.xml file under projectName-war, and it must have an artifact id that matches the one under the parent declaring the module, i.e.
<artifactId>projectName-war</artifactId>
Child module [...]projectName\projectName-war\pom.xml of [...]projectName\pom.xml does not exist
If you are getting the above error when using mvn install from command line (the same pom may work in eclipse) you have to change your pom.xml little
Instead of the below:
<modules>
<module>../my-util</module>
<module>../my-server</module>
</modules>
Follow the below (enclose in a profilers):
<profiles>
<profile>
<modules>
<module>../my-util</module>
<module>../my-server</module>
</modules>
</profile>
</profiles>
This issue usually comes when you copy and paste the child projects. For example, We have individual child projects as below
<artifactId>business-layer</artifactId> with project name as business-layer
<artifactId>service-layer</artifactId> with project name as **xyz**-layer
<modules>
<module>business-layer</module>
<module>**service-layer**</module>
</modules>
You project name during the initial build should be same as the module name. This need not require the tag to be added as the purpose of profiles tag is to trigger builds with specific actions