diff --git a/doc/concept.html b/doc/concept.html index f5bda62e..68f30ef7 100644 --- a/doc/concept.html +++ b/doc/concept.html @@ -230,7 +230,23 @@ Prior to Ivy 1.4 circular dependencies where causing a failure in Ivy. As of Ivy 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. + +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

+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. +

Changes in artifacts

+Some people, especially those coming from maven 2 land, like to use one special revision to handle often updated modules. In maven 2 this is called a SNAPSHOT version, and some argue that it helps saves disk space to keep only one version for the high number of intermediary builds you can make whilst developing. + +Ivy supports this kind of approach with the notion of changing revision. A changing revision is just that: a revision for which Ivy should consider that the artifacts may change over time. To handle this, you can either specify a dependency as changing on the [[ivyfile/dependency]] tag, or use the changingPattern and changingMatcher attributes on your [[configuration/resolvers]] to indicate which revision or group of revisions should be considered as changing. + +Once Ivy knows that a revision is changing, it will follow this principle to avoid checking your repository too often: if the module metadata has not changed, it will considered the whole module (including artifacts) as not changed. Even if the module descriptor file has changed, it will check the publication data of the module to see if this is a new publication of the same revision or not. Then if the publication date has changed, it will check the artifacts last modified timestamps, and download them accordingly. + +So if you want to use changing revisions, use the [[ant:publish]] task to publish your modules, it will take care of updating the publication date, and everything will work fine. And remember to set checkModified=true" on your resolver too! diff --git a/doc/configuration/resolvers.html b/doc/configuration/resolvers.html index c0885041..2a43aafc 100644 --- a/doc/configuration/resolvers.html +++ b/doc/configuration/resolvers.html @@ -95,12 +95,12 @@ All resolvers of the same type share some common attributes detailed here: No Yes - changingPatternIndicates for which revision pattern this resolver should check lastmodified date to know if an artifact file is up to date. since 1.4 + changingPatternIndicates for which revision pattern this resolver should check lastmodified date to know if an artifact file is up to date. since 1.4. See cache and change management for details. No, defaults to none Yes Yes - changingMatcherThe name of the pattern matcher to use to match a revision against the configured changingPattern. since 1.4 + changingMatcherThe name of the pattern matcher to use to match a revision against the configured changingPattern. since 1.4. See cache and change management for details. No, defaults to exactOrRegexp Yes Yes diff --git a/doc/ivyfile/dependency.html b/doc/ivyfile/dependency.html index 14070585..b1cb8286 100644 --- a/doc/ivyfile/dependency.html +++ b/doc/ivyfile/dependency.html @@ -114,12 +114,12 @@ If you prefer more verbose mapping declaration, everything is also possible with

Artifact restriction

Moreover, the dependency element also supports an artifact restriction feature (since 0.6). -See dependency artifact restriction for details.

+See dependency artifact restriction for details.

Forcing revision

Finally, the dependency element also supports an a force attribute (since 0.8), which gives an indication -to conflicts manager to force the revision of a dependency to the one given here.
-See conflicts manager for details.

+to conflicts manager to force the revision of a dependency to the one given here. +See conflicts manager for details. since 1.4 this tag supports extra attributes

Attributes

@@ -143,7 +143,7 @@ See conflicts manager for details.
No, defaults to defaultconf attribute of dependencies element if neither conf attribute nor conf children element is given transitivetrue to resolve this dependency transitively, false otherwise (since 1.2) No, defaults to true - changingtrue if the dependency artifacts may change without revision change, false otherwise (since 1.2). Artifacts update will be looked after only if the publication date of the ivy file has changed. Note that this is not a recommended use and that it avoid some cache optimization in ivy. + changingtrue if the dependency artifacts may change without revision change, false otherwise (since 1.2). See cache and change management for details. No, defaults to false diff --git a/doc/terminology.html b/doc/terminology.html index 6df1e6ad..371574a9 100644 --- a/doc/terminology.html +++ b/doc/terminology.html @@ -26,12 +26,6 @@