I want to delete a directory from local repo before building a multi-module project. I wrote a plugin for that and the directory get deleted indeed, but it gets deleted too late.
What I mean: my project "Project" has a dependency "com.test" that is not present in local repo. I run mvn clean install. What happens is that maven is scanning for projects and all the dependencies that it needs, downloading them (I guess though artifact resolver) to my local repo. Then my plugin is hooked to the "pre-clean" phase and it removes the directory ".m2/repository/com". Now when "Project" actually needs dependency "com.test" for the compile, this dependency is not present (my plugin removed it) and maven fails. Why do I have such a weird case? Imagine I have releases artifacts that actually do not change their version, but do change their contents. Maven will not update my local repo unless their are snapshots, right? Well snapshot is not an option right now (due to corporate things). That is why I first need to remove "com.test" then kick in the artifact resolver. Thank you, Eugene. -- View this message in context: http://maven.40175.n5.nabble.com/Scanning-for-Projects-before-tp5790393p5790400.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
