I want to build a project without referring to my local Maven repo at all, but on the other hand I don't want it to be pruned, as other projects on my disk use it.
How can I disable local repo for some particular project?
Ideally, I'd like to create new repo in target
directory and then automatically clean it after build.
Question maven: Is it possible to override location of local repository via the use of command line option or env variable? explains only how to change location of local repo for some particular build or in settings. I'm interested in permanent solution in POM.