Am I missing anything?
CodePudding user response:
You're not missing anything. Are you sure you ran the command line command correctly?
The same command works for me:
mvn archetype:generate -DgroupId=com.baeldung -DartifactId=parent-project
result:
[INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-quickstart:1.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: basedir, Value: C:\dev\testing
[INFO] Parameter: package, Value: com.baeldung
[INFO] Parameter: groupId, Value: com.baeldung
[INFO] Parameter: artifactId, Value: parent-project
[INFO] Parameter: packageName, Value: com.baeldung
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: C:\dev\testing\parent-project
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 45.571 s
[INFO] Finished at: 2022-09-09T11:16:06 02:00
[INFO] ------------------------------------------------------------------------
Check also the version of mvn you have installed
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: C:\apache-maven-3.8.1
Java version: 11.0.12, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-11.0.12
Default locale: no_NO, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
CodePudding user response:
I'm finally realized that my PowerShell environment will interpreted into wrong command. So the correct command in PowerShell should be:
mvn archetype:generate '-DgroupId=com.baeldung' '-DartifactId=parent-project'
If I put original command in Command Prompt, it will not produce any error.