[GRADLE-2364] Cannot run build with --offline after attempting build with a broken repository Created: 26/Jun/12 Updated: 04/Jan/13 Resolved: 05/Dec/12 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 1.4-rc-1 |
Type: | Bug | ||
Reporter: | Gradle Forums | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 2 |
Description |
Last week, the maven repository we use for snapshots went down due to a hardware failure. Unfortunately, it went down late at night and the morning after some of our developers tried to build. Since the ttl was up, gradle tried to download the new artifacts but was unable to reach the nexus repository. Once the build had failed, they tried to build using --offline but were unable to build as gradle complained about not having the artifact, despite the artifact sitting in the filestore. After some more testing, it seems that gradle keeps metadata information in another directory and will invalidate the file in the filestore before checking to see if it can access the repository. Thus, when trying to build offline, gradle will complain about not having the artifact. Is this the desired behavior or do we have the configuration of the repository wrong? Is there a workaround to this other than setting the snapshot ttl to a long time and only grabbing the latest dependencies with --refresh-dependencies? We currently set the ttl to 30 minutes for snapshot dependencies and are running with gradle 1.0 with linux and windows machines. |
Comments |
Comment by Daz DeBoer [ 26/Jun/12 ] |
Gradle is removing the reference to an expired cached artifact prior to the attempt to reach the repository. So if the repository is not accessible, you are not able to recover by switching to running your build with --offline. This is not the behaviour we would want; it would be better if we waited until we successfully resolved the latest artifact before expiring the current cache entry. I can't think of any workaround once the cache entry has been removed. |
Comment by Jonathan Imperial [ 31/Jul/12 ] |
Any update on this? |
Comment by Daz DeBoer [ 31/Jul/12 ] |
We're currently working through a backlog of dependency management bug fixes: this is in the list, but I can't give you an update on when it will be fixed. |