You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Carlton Brown <cb...@silverpop.com> on 2009/08/26 21:20:13 UTC

checkModified and changing pattern

Question - 

 

According to the documentation, if you wish to use a snapshot strategy,
it's necessary to specify a changingPattern for the resolver (or define
the dependency as changing).   This is very clear.   

 

Elsewhere in the documentation it is also suggested that this must be
used together with the checkModified pattern, but it doesn't exactly say
why.    What would be the expected result of using a changingPattern
without checkModified?   I don't understand the interplay between these
two attributes or why they must be specified separately.

 

Thanks,

Carlton



***CONFIDENTIALITY NOTICE and DISCLAIMER*** 
This message and any attachment are confidential and may be
privileged or otherwise protected from disclosure and solely for
the use of the person(s) or entity to whom it is intended. If you
have received this message in error and are not the intended
recipient, please notify the sender immediately and delete this
message and any attachment from your system. If you are not the
intended recipient, be advised that any use of this message is
prohibited and may be unlawful, and you must not copy this
message or attachment or disclose the contents to any other person.

RE: checkModified and changing pattern

Posted by Carlton Brown <cb...@silverpop.com>.
In testing with a locally built trunk version 2.2.0.20090824122546, I found that the changingPattern attribute is not sufficient to trigger re-caching of a changed artifact unless the checkmodified attribute is also used (unless both the publishing and consuming resolves have shared the same cache).    

So it appears at least that the cache management document is consistent with the behavior of the code.   I think if this is the expected behavior, then these attributes should make explicit reference to one another in the documentation.

-----Original Message-----
From: Mitch Gitman [mailto:mgitman@gmail.com] 
Sent: Sunday, August 30, 2009 10:52 PM
To: ivy-user@ant.apache.org
Subject: Re: checkModified and changing pattern

Carlton, since no one else has gotten back yet on your question, I would ask
you, why not just run an experiment and see if changingPattern behaves any
differently with or without lastmodified="true"? Actually, I'd be curious
myself. The documentation is ambiguous on this score.

My intuition says:

   - A changingPattern in combination with lastmodified="true" means, even
   if the repository ivy.xml file is newer than the cached one, don't download
   the module unless the revision also matches the pattern.
   - A changingPattern in combination with lastmodified="false" means,
   always download the module if the revision value matches the pattern; don't
   even bother checking the timestamp on the ivy.xml (if there even is an
   ivy.xml).

Well, that's what my intuition says, but my intuition has been wrong before.
The only value I can see in the second scenario above (if it even exists) is
if there is no ivy.xml. If there is an ivy.xml, then if the artifacts have
been updated, the ivy.xml will have been updated too via ivy:publish.

On Wed, Aug 26, 2009 at 12:20 PM, Carlton Brown <cb...@silverpop.com>wrote:

> Question -
>
>
>
> According to the documentation, if you wish to use a snapshot strategy,
> it's necessary to specify a changingPattern for the resolver (or define
> the dependency as changing).   This is very clear.
>
>
>
> Elsewhere in the documentation it is also suggested that this must be
> used together with the checkModified pattern, but it doesn't exactly say
> why.    What would be the expected result of using a changingPattern
> without checkModified?   I don't understand the interplay between these
> two attributes or why they must be specified separately.
>
>
>
> Thanks,
>
> Carlton
>
>
>
> ***CONFIDENTIALITY NOTICE and DISCLAIMER***
> This message and any attachment are confidential and may be
> privileged or otherwise protected from disclosure and solely for
> the use of the person(s) or entity to whom it is intended. If you
> have received this message in error and are not the intended
> recipient, please notify the sender immediately and delete this
> message and any attachment from your system. If you are not the
> intended recipient, be advised that any use of this message is
> prohibited and may be unlawful, and you must not copy this
> message or attachment or disclose the contents to any other person.

***CONFIDENTIALITY NOTICE and DISCLAIMER*** 
This message and any attachment are confidential and may be
privileged or otherwise protected from disclosure and solely for
the use of the person(s) or entity to whom it is intended. If you
have received this message in error and are not the intended
recipient, please notify the sender immediately and delete this
message and any attachment from your system. If you are not the
intended recipient, be advised that any use of this message is
prohibited and may be unlawful, and you must not copy this
message or attachment or disclose the contents to any other person.

Re: checkModified and changing pattern

Posted by Mitch Gitman <mg...@gmail.com>.
Carlton, since no one else has gotten back yet on your question, I would ask
you, why not just run an experiment and see if changingPattern behaves any
differently with or without lastmodified="true"? Actually, I'd be curious
myself. The documentation is ambiguous on this score.

My intuition says:

   - A changingPattern in combination with lastmodified="true" means, even
   if the repository ivy.xml file is newer than the cached one, don't download
   the module unless the revision also matches the pattern.
   - A changingPattern in combination with lastmodified="false" means,
   always download the module if the revision value matches the pattern; don't
   even bother checking the timestamp on the ivy.xml (if there even is an
   ivy.xml).

Well, that's what my intuition says, but my intuition has been wrong before.
The only value I can see in the second scenario above (if it even exists) is
if there is no ivy.xml. If there is an ivy.xml, then if the artifacts have
been updated, the ivy.xml will have been updated too via ivy:publish.

On Wed, Aug 26, 2009 at 12:20 PM, Carlton Brown <cb...@silverpop.com>wrote:

> Question -
>
>
>
> According to the documentation, if you wish to use a snapshot strategy,
> it's necessary to specify a changingPattern for the resolver (or define
> the dependency as changing).   This is very clear.
>
>
>
> Elsewhere in the documentation it is also suggested that this must be
> used together with the checkModified pattern, but it doesn't exactly say
> why.    What would be the expected result of using a changingPattern
> without checkModified?   I don't understand the interplay between these
> two attributes or why they must be specified separately.
>
>
>
> Thanks,
>
> Carlton
>
>
>
> ***CONFIDENTIALITY NOTICE and DISCLAIMER***
> This message and any attachment are confidential and may be
> privileged or otherwise protected from disclosure and solely for
> the use of the person(s) or entity to whom it is intended. If you
> have received this message in error and are not the intended
> recipient, please notify the sender immediately and delete this
> message and any attachment from your system. If you are not the
> intended recipient, be advised that any use of this message is
> prohibited and may be unlawful, and you must not copy this
> message or attachment or disclose the contents to any other person.