I have a Maven 3.0.2 SNAPSHOT build which is simultaneously executed on multiple machines (via a Jenkins matrix build), deploying an artifact with the same GAV but a different classifier into a Nexus snapshot repository. We've seen some instances where the metadata seems to be incorrect.
Now, we do have some more investigation to do, for example making sure that use of Maven 2 wasn't the problem, but it occurred to me to wonder whether this use case is really supported at all. On the one hand, we have https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-UniqueSnapshotVersionsandClassifiers which (along with the related bug and linked conversations) seems to say it is. On the other hand, in my naive view maven seems to be downloading maven-metadata.xml files, updating them locally, and then uploading them again, and that would appear to create a race condition, where two builds on separate machines might download the same maven-metadata.xml content, update it independently, and then upload each their own versions, one of them in the end overwriting the other and removing the information about the other snapshot. It occurs to me that the same conflict could occur with versions if you build multiple versions concurrently, as there is a maven-metadata.xml file at that level too. In order to avoid this, it would seem the repository server would need to have a bit of smarts to deal with the potential concurrency, to merge the maven-metadata.xml files or simply manufacture one upon request. I can't find anywhere that actually says that repositories are expected to do this or that Nexus in particular actually does do it. Should concurrent deploy to a repository server of artifacts that have the same GA and differ only by version or classifier work reliably, or is my imagined race condition real? -Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org