asdf-java icon indicating copy to clipboard operation
asdf-java copied to clipboard

Plugin does not retain downloaded java archive after install

Open gurpreet3737 opened this issue 4 years ago • 3 comments

After installing java, plugin deletes downloaded java archive from /tmp directory, even after setting configuration in .asdfrc file to not to remove package after install.

There should be a way to retain archive who wish to retain it in asdf_install_dir, possibly in archives folder, so that one can copy the archives to other system and perform install from the same, instead of downloading them again and again.

gurpreet3737 avatar Feb 04 '21 22:02 gurpreet3737

After installing java, plugin deletes downloaded java archive from /tmp directory, even after setting configuration in .asdfrc file to not to remove package after install.

@gurpreet3737 Which configuration setting are you using for this?

joschi avatar Mar 11 '21 07:03 joschi

I appended configuration "always_keep_download = yes" in the asdfrc file for retaining the downloaded archive as specified in the asdf documentation. But plugin still removes the archive file. I manually configured function install in the function file to copy the downloaded archive to a separate folder "archives" before removing it. functions.txt

Changes in the file are in the lines 68, 80-83, and 99.

I know this is not a clean solution, but for the time being it solved my problem. But after the plugin update all my changes were removed. Please add this functionality in the plugin.

gurpreet3737 avatar Mar 12 '21 15:03 gurpreet3737

I was looking into this issue, because for testing "my issue" I downloaded the same JVM version quite some times. Unfortunately "the proper fix" was not trivial and I've started a discussion about this feature on the ASDF GitHub repository: https://github.com/asdf-vm/asdf/discussions/905.

delgurth avatar Mar 22 '21 19:03 delgurth