Return-Path: Delivered-To: apmail-ant-notifications-archive@locus.apache.org Received: (qmail 15735 invoked from network); 4 Jan 2008 15:11:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jan 2008 15:11:00 -0000 Received: (qmail 82389 invoked by uid 500); 4 Jan 2008 15:10:49 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 82359 invoked by uid 500); 4 Jan 2008 15:10:49 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 82350 invoked by uid 99); 4 Jan 2008 15:10:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2008 07:10:49 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2008 15:10:34 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 28E911A9832; Fri, 4 Jan 2008 07:10:39 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r608880 - in /ant/ivy/core/trunk/doc: concept.html configuration.html configuration/cacheDefaults.html configuration/caches.html configuration/caches/ configuration/caches/cache.html configuration/conf.html toc.json Date: Fri, 04 Jan 2008 15:10:38 -0000 To: notifications@ant.apache.org From: xavier@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080104151039.28E911A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: xavier Date: Fri Jan 4 07:10:36 2008 New Revision: 608880 URL: http://svn.apache.org/viewvc?rev=608880&view=rev Log: update documentation according to recent cache management changes Added: ant/ivy/core/trunk/doc/configuration/caches/ ant/ivy/core/trunk/doc/configuration/caches.html (with props) ant/ivy/core/trunk/doc/configuration/caches/cache.html (with props) Removed: ant/ivy/core/trunk/doc/configuration/cacheDefaults.html Modified: ant/ivy/core/trunk/doc/concept.html ant/ivy/core/trunk/doc/configuration.html ant/ivy/core/trunk/doc/configuration/conf.html ant/ivy/core/trunk/doc/toc.json Modified: ant/ivy/core/trunk/doc/concept.html URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/concept.html?rev=608880&r1=608879&r2=608880&view=diff ============================================================================== --- ant/ivy/core/trunk/doc/concept.html (original) +++ ant/ivy/core/trunk/doc/concept.html Fri Jan 4 07:10:36 2008 @@ -231,11 +231,27 @@ See the configuration page to see how to configure the circular dependency strategy you want to use. -

Cache and Change Management

-Ivy heavily relies on a local cache to avoid accessing remote repositories too often, thus saving a low of network bandwidth and time. To optimize the dependency resolution and the way the cache is used, Ivy assumes by default that a revision never changes. So once Ivy has a module in its cache (metadata and artifacts), it trusts the cache and do not even query the repository. This optimization is very useful in most cases, and causes no problem as long as you respect this paradigm: a revision never changes. Besides performance, there are several [[bestpractices good reasons]] to follow this principle. +

Cache and Change Management

+Ivy heavily relies on local cache(s) to avoid accessing remote repositories too often, thus saving a low of network bandwidth and time. + +

Cache types

+Ivy cache is composed of two different parts: +
    +
  • the repository cache
  • +The repository cache is where Ivy stores data downloaded from module repositories, along with some meta information concerning these artifacts, like their original location. +This part of the cache can be shared if you use a well suited [[configuration/lock-strategies lock strategy]]. +
  • the resolution cache
  • +This part of the cache is used to store resolution data, which is used by Ivy to reuse the results of a resolve process. +This part of the cache is overwritten each time a new resolve is performed, and should never be used by multiple processes at the same time. +
+ +While there is always only one resolution cache, you can [[configuration/caches define multiple repository caches]], each [[configuration/resolvers resolver]] being able to use a separate cache. + +

Change management

+To optimize the dependency resolution and the way the cache is used, Ivy assumes by default that a revision never changes. So once Ivy has a module in its cache (metadata and artifacts), it trusts the cache and do not even query the repository. This optimization is very useful in most cases, and causes no problem as long as you respect this paradigm: a revision never changes. Besides performance, there are several [[bestpractices good reasons]] to follow this principle. However, depending on your current build system and your dependency management strategy, you may prefer to update sometimes your modules. There are two kind of changes to consider: -

change in module metadata

+

Changes in module metadata

Since pretty often module metadata are not considered by module providers with as much attention as their API or behavior (if they even provide module metadata), it happens more than we would like that we have to update module metadata: a dependency has been forgotten, or another one is missing, ... In this case, setting checkModified="true" on your dependency resolver will be the solution. This flag tells to Ivy to check if module metadata has been modified compared to the cache. Ivy first checks the metadata last modified timestamp on the repository to download it only if necessary, and then update it when needed. Modified: ant/ivy/core/trunk/doc/configuration.html URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/configuration.html?rev=608880&r1=608879&r2=608880&view=diff ============================================================================== --- ant/ivy/core/trunk/doc/configuration.html (original) +++ ant/ivy/core/trunk/doc/configuration.html Fri Jan 4 07:10:36 2008 @@ -33,8 +33,7 @@ - - + @@ -70,11 +69,12 @@ property properties settings - cacheDefaults include classpath typedef lock-strategies + caches + cache latest-strategies version-matchers triggers @@ -117,8 +117,6 @@ 0..n settingsconfigures ivy with some defaults 0..1 - cacheDefaultsset up default values for cache(s) - 0..1 includeincludes another settings file 0..n classpathadd a location in the classpath used to load plugins @@ -127,6 +125,8 @@ 0..n lock-strategiesdefines lock strategies 0..1 + cachesdefines repository cache managers + 0..1 latest-strategiesdefines latest strategies 0..1 parsersdefines module descriptor parsers @@ -150,9 +150,7 @@ statusesdefines the list of available statuses 0..1 - - - + Added: ant/ivy/core/trunk/doc/configuration/caches.html URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/configuration/caches.html?rev=608880&view=auto ============================================================================== --- ant/ivy/core/trunk/doc/configuration/caches.html (added) +++ ant/ivy/core/trunk/doc/configuration/caches.html Fri Jan 4 07:10:36 2008 @@ -0,0 +1,79 @@ + + + + + + + + + + + + + Propchange: ant/ivy/core/trunk/doc/configuration/caches.html ------------------------------------------------------------------------------ svn:eol-style = native Added: ant/ivy/core/trunk/doc/configuration/caches/cache.html URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/configuration/caches/cache.html?rev=608880&view=auto ============================================================================== --- ant/ivy/core/trunk/doc/configuration/caches/cache.html (added) +++ ant/ivy/core/trunk/doc/configuration/caches/cache.html Fri Jan 4 07:10:36 2008 @@ -0,0 +1,56 @@ + + + + + + + + + + + + + Propchange: ant/ivy/core/trunk/doc/configuration/caches/cache.html ------------------------------------------------------------------------------ svn:eol-style = native Modified: ant/ivy/core/trunk/doc/configuration/conf.html URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/configuration/conf.html?rev=608880&r1=608879&r2=608880&view=diff ============================================================================== --- ant/ivy/core/trunk/doc/configuration/conf.html (original) +++ ant/ivy/core/trunk/doc/configuration/conf.html Fri Jan 4 07:10:36 2008 @@ -29,10 +29,8 @@ Configures some important ivy info: default cache, default resolver, ... -Default cache is used whenever a cache is not provided. It usually points to a directory in your filesystem. This should not point to a directory used as a repository! -Since 2.0 Once the settings are loaded, the value of the defaultCache (either configured or the default value) is stored in an Ivy variable: ivy.cache.dir. -Since 2.0 A new [[configuration/cache]] tag is provided where you can fully configure the cache. As of 2.0 beta 1, we recommend using the cache tag even though configuring using the attributes available on this tag is still possible. - +Default cache is the default directory used for both the resolution and repository cache(s). It usually points to a directory in your filesystem. If you want to isolate resolution cache from repository cache, we recommend setting both the resolutionCacheDir attribute on this tag and the basedir attribute on [[configuration/caches]] instead of using defaultCache. +See [[concept cache concept]] for details on Ivy cache concept. Default resolver is used whenever nothing else is configured in the modules section of the configuration file. It should give the name of a dependency resolver defined in the resolvers section of the configuration file. @@ -52,8 +50,10 @@ AttributeDescriptionRequired - defaultCachea path to a directory to use as default cache. We recommend using the basedir on the [[configuration/cache]] tag instead + defaultCachea path to a directory to use as default basedir for both resolution and repository cache(s) No, defaults to .ivy2/cache in user home + resolutionCacheDirthe path of the directory to use to put all resolution cache data since 2.0 + No, defaults to defaultCache defaultResolverthe name of the default resolver to use No, but all modules should be configured in the modules section if not provided defaultLatestStrategythe name of the default latest strategy to use @@ -76,8 +76,7 @@ No, defaults to false - - + Modified: ant/ivy/core/trunk/doc/toc.json URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/toc.json?rev=608880&r1=608879&r2=608880&view=diff ============================================================================== --- ant/ivy/core/trunk/doc/toc.json (original) +++ ant/ivy/core/trunk/doc/toc.json Fri Jan 4 07:10:36 2008 @@ -165,13 +165,6 @@ ] }, { - "id":"configuration/cacheDefaults", - "title":"cacheDefaults", - "children": [ - - ] - }, - { "id":"configuration/include", "title":"include", "children": [ @@ -197,6 +190,19 @@ "title":"lock-strategies", "children": [ + ] + }, + { + "id":"configuration/caches", + "title":"caches", + "children": [ + { + "id":"configuration/caches/cache", + "title":"cache", + "children": [ + + ] + } ] }, {