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

mvn clean slow on Windows - alternative implementation #536

Closed
atlib77 opened this issue Dec 16, 2021 · 5 comments
Closed

mvn clean slow on Windows - alternative implementation #536

atlib77 opened this issue Dec 16, 2021 · 5 comments

Comments

@atlib77
Copy link

atlib77 commented Dec 16, 2021

Hi,

I've noticed that running 'clean' goal is really slow on Windows, especially compared to a Linux. I do understand file operations are much quicker on linux for sure. But I'm I mean e.g. 10 seconds vs <1 second difference!

So I wondered if the 'target' folder could simply be renamed to e.g. target_timestamp and let the build continue (renaming the folder is superquick). Then the daemon could take care of actually deleting the renamed folder afterwards in some low-prio background process.

Obviously it could be done in maven directly, but since it doesn't have the concept of a daemon, it couldn't go as far/fast.

btw, thanks for a great program! It really makes using maven much more bearable :)

@ppalaga
Copy link
Contributor

ppalaga commented Dec 16, 2021

Interesting idea! But cleaning is not necessarily just deleting the whole target folder. The clean plugin allows for defining some exceptions for files/folders that should not be cleaned. Hence there is some logic implementing that and I guess it would be hardly maintainable outside the clean plugin. Having said that I'd see this as a feature for the clean plugin.

@gnodet
Copy link
Contributor

gnodet commented Dec 16, 2021

It should be possible to implement a custom extension / lifecycle to provide a fast clean phase implementation moving the folder and deleting it in the background (or not).

@gnodet
Copy link
Contributor

gnodet commented Dec 16, 2021

@atlib77 an experimental extension is available in this PR #538

@atlib77
Copy link
Author

atlib77 commented Dec 17, 2021

Awesome! Left a comment on the PR #538

@gnodet gnodet added this to the No fix/wont't fix milestone Jan 7, 2022
@gnodet
Copy link
Contributor

gnodet commented Jan 7, 2022

Closing this issue as it has been moved to the clean plugin. https://issues.apache.org/jira/browse/MCLEAN-95

@gnodet gnodet closed this as completed Jan 7, 2022
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

3 participants