Here is a simple command:
echo -DarchetypeGroupId=org.apache.maven.archetypes
When running in the Command Prompt, the output will be:
-DarchetypeGroupId=org.apache.maven.archetypes
When running in the PowerShell, the output will be:
-DarchetypeGroupId=org
.apache.maven.archetypes
When running in the PowerShell with echo.exe
command:
echo.exe -DarchetypeGroupId=org.apache.maven.archetypes
The output will be:
-DarchetypeGroupId=org .apache.maven.archetypes
The tiny different will cause me unable to run many commands when using Apache Maven CLI in the PowerShell environment. Such as:
mvn archetype:generate -DgroupId=com.baeldung -DartifactId=parent-project -B
I can't find out what's the main reason cause for this issue in PowerShell. Does anyone know what's the language feature on PowerShell cause this issue?