[ http://jira.codehaus.org/browse/MNG-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_99631 ]
David Hoffer commented on MNG-3006: ----------------------------------- We have discovered that fundamentally what is going on here is that maven2 is not, by default, really configured to work well in a company with an automated build system where artifact release versions change often. The main issue here is that maven2, by default, only checks for version updates daily. This may be fine for situations where you have a few static maven dependencies but is really bad for corporate component/application development where you are making/consuming lots of locally generated artifacts. If I always run maven with the -U option this problem does not occur because maven then always checks for newer versions much like it does if you have no prior artifact version. When I release a component artifact (to our proxy server) I also have lots of other components/applications with dependencies on it using set notation for the version. Builds of these other components/applications must be able to find the just released component on our proxy server. The default behavior of maven is to not find the new release until tomorrow! In our environment I can see no reason for the daily update option for the local/corporate repo usage. I have a hard time seeing a large benefit to it for remote repos as well, other than using a bit more network bandwidth. This feature should be reworked so that I can say either globally (or possibly per project) that I want to always check for updates. I suggest that this be configured in the settings.xml file for the global settings. Also the -U option is misnamed as it implies it only effects snapshots when in fact it effects snapshots and releases. > Maven does not always download artifacts from specified repos > ------------------------------------------------------------- > > Key: MNG-3006 > URL: http://jira.codehaus.org/browse/MNG-3006 > Project: Maven 2 > Issue Type: Bug > Components: Artifacts and Repositories > Affects Versions: 2.0.6 > Environment: Windows XP SP2 > Reporter: David Hoffer > Fix For: 2.1.x > > Attachments: settings.xml > > > Performing maven2 builds does not always downloaded requested artifacts from > specified repos before complaining that the required artifact is not > available and giving up. However if I delete my local repo then it always > works. > Here is the failure log: > [12:42:04]: Couldn't find a version in [1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, > 1.7, 1.8, 1.9, 1.10, 1.9-SNAPSHOT, 1.11-SNAPSHOT] to match range [1.11,) > [12:42:04]: com.xrite.retail:retail-commons-classic:jar:null > [12:42:04]: > [12:42:04]: from the specified remote repositories: > [12:42:04]: central (http://xrbuild3:8081/artifactory/repo), > [12:42:04]: snapshots (http://xrbuild3:8082/artifactory/repo) > An HTTP port monitor shows that maven refuses to contact the servers until I > delete my local repo. Maven should always check the remote server before > giving up. > I will attach my settings.xml. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira