Hi, I am writing to you concerning MNG-4142<http://jira.codehaus.org/browse/MNG-4142>. The title of the bug is misleading - it should be "Maven locks maven-metadata-local.xml-s and never updates snapshots". This Maven bug has been around for quite a while and is preventing us from being able to use a distributed build system properly. We use Hudson, and although there is the possibility to run each build with a private repository, this is not a reasonable solution, if you have a large number of builds (due to the amount of space you will need for each node).
We have been hitting this a lot lately. We have Hudson running with 7-8 nodes (using different operating systems and Maven 2.2.1). The problem can be described as follows: - You build a SNAPSHOT module and install it locally. You work on it for a few days and commit your code. - In the meantime, there are other changes to the module. However, your maven-metadata-local.xml contains a line that tells Maven not to update snapshots (even with -U, it will not do so). You end up using older snapshots locally and the only solution is to remove the artifact's local metadata file (or edit it manually). When it comes down to regular dependencies, I have written a small plugin that works around the issues of locked maven-metadata-local.xml files containing localCopy set to true. (Check this<https://build-force.googlecode.com/svn/trunk/dependencies-cleaner>for more info). However, when it comes down to parents, the situation is much more trickier as the projects get loaded and interpolated long before the actual build phases start. I would like to ask why is the proposed patch not being accepted/reviewed? I have confirmed that this bug exists also under Maven 3.0. The proposed patch (by David Rousselie) is also applicable to Maven 3, if you copy the five lines of changes<http://jira.codehaus.org/secure/attachment/43860/MNG-4142.patch>to the DefaultRepositoryMetadataManager.java class. Will there be another 2.2.x release in which this could be included? If not, could this bug and patch be reviewed for 3.1? Writing workaround plugins is not a good idea, and so is using a modified Maven in your company. Therefore, I would like to request that this issue be fixed in the next version of Maven, as it's quite critical. Thanks in advance and looking forward to your replies, Regards, Martin Todorov
