You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tom Parker (JIRA)" <ji...@codehaus.org> on 2007/06/07 09:23:59 UTC
[jira] Updated: (MNG-3035) Maven caches missing snapshot
dependencies, so further builds fail without checking the repo until the
cache expires or -U is included to flush the cache
[ http://jira.codehaus.org/browse/MNG-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tom Parker updated MNG-3035:
----------------------------
Attachment: MNG-3035.zip
See attached pom files and script to build them in the correct order and simulate two different users. The script has been tested on linux and probably won't work on windows. Be careful as the script will mess around with your ~/.m2/repository. You cannot reliably build anything else while the script is running.
The part of the puzzle that I left out is this:
When Alice deploys Common 1.2, she creates Common-1.2-20070607.071016-1.jar in the shared repo.
When Bob checks a second time for a missing snapshot, he only attempts to download Common-1.2-SNAPSHOT.jar which doesn't exist.
> Maven caches missing snapshot dependencies, so further builds fail without checking the repo until the cache expires or -U is included to flush the cache
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MNG-3035
> URL: http://jira.codehaus.org/browse/MNG-3035
> Project: Maven 2
> Issue Type: Bug
> Components: Artifacts and Repositories
> Affects Versions: 2.0.5
> Reporter: Tom Parker
> Priority: Minor
> Attachments: MNG-3035.zip
>
>
> The problem is caused by a slightly obscure sequence, in this example, I use two projects, Server & Common. Server depends on Common:
> Alice updates Server to depend on Common-1.2-SNAPSHOT instead of 1.1-SNAPSHOT and commits that change.
> Bob syncs that change and attempts a build of Server, maven checks for Common-1.2-SNAPSHOT in the local repo, finds it missing and checks the global repo, where it is also missing. Maven records this information in a cache and fails the build.
> Alice deploys Common-1.2-SNAPSHOT to the global repo.
> Bob attempts to build Server again, maven checks it's cached information and finds that Common-1.2-SNAPSHOT wasn't in the global repo last time, so fails the build.
> Maven should not fail the build due to missing dependencies simply because the cache says the dependency was missing last time. It should check the configured repos before failing.
--
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