Skip to content

Maven project creation fails on Windows - cmd.exe ignores PowerShell settings #1454

@anushi13prsnl

Description

@anushi13prsnl

Description:
Problem:
VS Code's "Create Maven Project" command fails on Windows with "The filename, directory name, or volume label syntax is incorrect" error.

Root Cause:
The Maven extension is using cmd.exe instead of PowerShell, despite terminal settings configured for PowerShell.

Error Message:
The terminal process "cmd.exe /c ""mvn org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate -DarchetypeArtifactId="maven-archetype-quickstart"..."" terminated with exit code: 1.

Settings Tried (all ignored):

  • terminal.integrated.defaultProfile.windows: "PowerShell"
  • terminal.integrated.automationProfile.windows: {"path": "powershell.exe"}
  • terminal.integrated.shell.windows: "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"

Workaround:
Manual command in PowerShell works fine.

Environment:

  • VS Code Version: [check Help → About]
  • OS: Windows 11/10
  • Extension Pack for Java Version: [check in Extensions]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions