[FIXED] How can I generate a parent POM file using Maven?

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under
CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.


I’m trying to build a Multi-Module Project with Maven. I’m stuck in the first step 6.1 of the post.

mvn archetype:generate -DgroupId=com.baeldung -DartifactId=parent-project

Enter image description here

Am I missing anything?


I have finally realized that my PowerShell environment will interpret into the wrong command. So the correct command in PowerShell should be:

mvn archetype:generate '-DgroupId=com.baeldung' '-DartifactId=parent-project'

If I put the original command in a Command Prompt, it will not produce any error.

See also: How to disable/override PowerShell dot notation

Answered By – Will Huang
Answer Checked By – Clifford M. (JavaFixing Volunteer)


people found this article helpful. What about you?