-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Labels
Description
Describe the bug
Bundled mvnw binary is broken on Unix-like plaforms (such as Linux) since 0.45.0
To Reproduce
- Try creating a new Maven project with the "maven-archetype-quickstart" archetype
- Observe cryptic errors in the terminal:
Executing task: "/home/xenu/.vscode-server/extensions/vscjava.vscode-maven-0.45.0/resources/maven-wrapper/mvnw" org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate -DarchetypeArtifactId="maven-archetype-quickstart" -DarchetypeGroupId="org.apache.maven.archetypes" -DarchetypeVersion="1.4" -DgroupId="com.example" -DartifactId="demo" -DoutputDirectory="/home/xenu/git/java-new"
/usr/bin/bash: line 1: /home/xenu/.vscode-server/extensions/vscjava.vscode-maven-0.45.0/resources/maven-wrapper/mvnw: Permission denied
Expected behavior
No errors.
Environments (please complete the following information as much as possible):
- OS: Debian 13 on WSL2
- VS Code version: 1.106.3
- Extension version: 0.45.0
Additional context
This caused by the fact that the bundled mvnw script has no executable bit set and also has the wrong line endings (CRLF instead of LF). It is a regression from 0.44.0.
0.45.0:
$ file vscjava.vscode-maven-0.45.0/extension/resources/maven-wrapper/mvnw
vscjava.vscode-maven-0.45.0/extension/resources/maven-wrapper/mvnw: POSIX shell script, ASCII text executable, with CRLF line terminators
$ stat -c "%A" vscjava.vscode-maven-0.45.0/extension/resources/maven-wrapper/mvnw
-rw-rw-rw-
0.44.0:
$ file vscjava.vscode-maven-0.44.0/extension/resources/maven-wrapper/mvnw
vscjava.vscode-maven-0.44.0/extension/resources/maven-wrapper/mvnw: POSIX shell script, ASCII text executable
$ stat -c "%A" vscjava.vscode-maven-0.44.0/extension/resources/maven-wrapper/mvnw
-rwxrwxr-x
Reactions are currently unavailable