devonfw / ide

Tool to automate setup and update of development environment (esp. for Java projects).
Apache License 2.0
33 stars 102 forks source link

devon mvn setup failed with tar: Cannot connect to C: resolve failed #1384

Open hohwille opened 2 months ago

hohwille commented 2 months ago
$ devon mvn setup
Success: run command mkdir
Starting installation of mvn in version 3.9.6 to /d/projects/mailarchive/software/mvn
Deleting old installation as it is a symlink: /d/projects/mailarchive/software/mvn
Trying to download mvn-3.9.6.tar.gz from https://archive.apache.org/dist/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
Artifact already exists at C:/Users/hohwille/Downloads/devonfw-ide/mvn-3.9.6.tar.gz
To force update please delete the file and run again.
Checksum 6eedd2cae3626d6ad3a5c9ee324bd265853d64297f07f033430755bd0e0c3a4b is correct
tar: Cannot connect to C: resolve failed

******** ATTENTION ********
Failed to run command tar
We are sorry for the inconvenience. Please check the above errors, resolve them and try again.
Exit code was 128

Looks like some strange bug with Windows vs. Bash path syntax...

jan-vcapgemini commented 1 month ago

I've tried the same using the latest version: 2024.01.001.

$ devon mvn setup
Success: run command mkdir
Starting installation of mvn in version 3.9.6 to /d/Projects/ideasy-test/software/mvn
Trying to download mvn-3.9.6.tar.gz from https://archive.apache.org/dist/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
Artifact already exists at /c/Users/username/Downloads/devonfw-ide/mvn-3.9.6.tar.gz
To force update please delete the file and run again.
Checksum 6eedd2cae3626d6ad3a5c9ee324bd265853d64297f07f033430755bd0e0c3a4b is correct
Success: run command tar
Successfully extracted archive mvn-3.9.6.tar.gz to /d/Projects/ideasy-test/updates/extracted/mvn
Success: run command mv
Successfully installed mvn
The software mvn has been added. You need to rerun 'devon' command without arguments or restart your terminal to update your PATH so the newly installed software will be found.
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: D:\Projects\ideasy-test\software\mvn
Java version: 17.0.11, vendor: Eclipse Adoptium, runtime: D:\Projects\ideasy-test\software\java
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Success: verify installation of mvn (/d/Projects/ideasy-test/software/mvn/bin/mvn)

Got no error though.

hohwille commented 1 month ago

Retesting with devonfw-ide in a project setup with IDEasy gives me this:

$ devon mvn setup
Updating java from version 21_35 to version 17.0.11_9...
Success: run command mkdir
Starting installation of java in version 17.0.11_9 to /d/projects/IDEasy/software/java
Trying to download java-17.0.11_9-windows.zip from https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_windows_hotspot_17.0.11_9.zip
Artifact already exists at C:/Users/hohwille/Downloads/devonfw-ide/java-17.0.11_9-windows.zip
To force update please delete the file and run again.
Checksum fdd6664d4131370398fbc8bfbb7b46dbfec4a22a090a511fe5c379dae188c390 is correct
Success: run command unzip
Successfully extracted archive java-17.0.11_9-windows.zip to /d/projects/IDEasy/updates/extracted/java
Creating backup by moving existing /d/projects/IDEasy/software/java to /d/projects/IDEasy/updates/backups/24-05-24
mv: cannot move '/d/projects/IDEasy/software/java' to '/d/projects/IDEasy/updates/backups/24-05-24/java': Permission denied

******** ATTENTION ********
Failed to move /d/projects/IDEasy/software/java to /d/projects/IDEasy/updates/backups/24-05-24.
Most probably this is a problem of windows file locks. In such case please terminate all processes locking the files and retry the operation.
Please visit https://github.com/devonfw/ide/blob/master/documentation/how-to-unlock-files.asciidoc for more information.
We are sorry for the inconvenience. Please check the above errors, resolve them and try again.
Command 'java setup silent' failed with exit code 255

******** ATTENTION ********
Failed to run devon java setup silent
We are sorry for the inconvenience. Please check the above errors, resolve them and try again.
Exit code was 255

Still I am unable myself to reproduce the initial error reported in this bug though it was also with version 2024.01.001.

hohwille commented 1 month ago

Maybe this is an error outside of devonfw-ide comming from git-bash/tar???

$ tar xvfz ~/Downloads/devonfw-ide/devonfw-ide-scripts-2024.01.001.tar.gz
tar (child): Cannot connect to C: resolve failed

gzip: stdin: unexpected end of file
tar: Child returned status 128
tar: Error is not recoverable: exiting now