Why PowerShell will treat dot ( . ) different than Command Prompt?

Viewed 18

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

enter image description here

When running in the PowerShell, the output will be:

-DarchetypeGroupId=org
.apache.maven.archetypes

enter image description here

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

enter image description here

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?

0 Answers
Related