Best way to cross platform delete Maven repo as build step?

What looks like an old Maven bug forces us to manually delete part of the agent .m2 repo to make sure the build get fresh SNAPSHOT libs.

This is getting very annoying, especially when you have to deal with multiple agents.

I'd like to add a build step so that each every build delete part of the .m2/repository before starting (which ideally could be a shared build step and corss platform)

Would someone recommend a particular build step to achieve what seems to be a simple task ?

I'd go for an Ant task intuitively, but I figure there could be a more direct solution.


Please sign in to leave a comment.