Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a plugin to be purged from cache #91

Open
greenwoodma opened this issue Jul 10, 2019 · 3 comments
Open

Allow a plugin to be purged from cache #91

greenwoodma opened this issue Jul 10, 2019 · 3 comments

Comments

@greenwoodma
Copy link
Contributor

If a plugin is corrupted on disk (during a failed download for instance) then it will fail to load and currently the only way to get it working again is to manually remove the files from the users ~/.m2 folder.

One solution would be to add a button to the plugin manager allowing a cached copy of a plugin to be purged from the local cache.

A useful side effect of this would be that you could purge a SNAPSHOT plugin in order to ensure you got the latest version bypassing the 24 hour waiting period between checks. See #74

@greenwoodma
Copy link
Contributor Author

Obviously this should involve purging the jar for the plugin artifact, but what about it's dependencies? They could just as easily be corrupted. I think it would get way too complex though, so I'm assuming we should just focus on removing the main jar file.

@johann-petrak
Copy link
Contributor

The download mechanism does not verify a file content checksum to make sure the download was successful? Is there no way to enable this? When I look at the files in a maven repo, I see md5 and sha1 checksum files so I would have assumed that in most cases this should get detected by the downloader (except maybe when a process gets killed right between failed download and verification and there is no mechanism to recheck later).
Obviously if that would be available, it would also work for the dependencies.
Similar for the snapshot refresh: is there no way in the download mechanism to force a refresh or override a default waiting period through the API?

@greenwoodma
Copy link
Contributor Author

Good question. Verifying the checksum would be a useful step even if we still want to add the ability to purge from the cache.

As far as I remember there wasn't an obvious way of forcing a refresh of the snapshot versions also, and we've discussed this before, we don't want to force a check everytime on SNAPSHOT plugins, but when I figure out the checksum I'll have another look at what the options are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants