On Thu, 11 Nov 2004 17:53:15 +0000, Steve Loughran <[EMAIL PROTECTED]> wrote:
> On Thu, 11 Nov 2004 12:20:51 -0500, Russell Gold <[EMAIL PROTECTED]> wrote:
>  > Only in the case where two projects simultaneously upgrade to the same
>  > version of a dependency and are also scheduled to build at the same
>  > time. Otherwise, the projects which use the same version they used to
>  > simply point to the cache.
> 
> Now I'm confused.

I think we are getting to the use case issue now...

> 
> If you have a central cache, surely the classpath would point to the
> files in the central cache. in both projects.
> so for one project a file they thought was there would suddenly
> disappear, CC would fail, etc, etc.

Why would they disappear? The idea of the cache is that it holds the
downloaded version of a particular dependency, say NekoHTML-0.9.1.jar.
Once it is downloaded, there is no reason to remove it and download it
again, since Andy Clark is not going to re-release the same version. 
If one project upgrades to 0.9.3, it will download that version,
placing *both* jars in the cache. The project using the old version
will still see it. The project using the new version will download it
and then see it. If at some later time, the second project also
upgrades to 0.9.3, it will find it already present. This is why it is
important not to rename the jars on download.

When you distribute the project, you often want to use the standard
names, which do not include the version. To do this, I use (for ant
1.5.1) something like:

    <copy todir="${archive.dir}/jars">
        <mapper type="regexp"
from="^.*[/\\][a-z]*[/\\]([A-Za-z0-9]*)-.*\.([a-z]*)$$" to="\1\.\2"/>
        <fileset refid="distributed.jars" />
    </copy>

where "distributed.jars" was a fileset created by the dependencies
task. This mapper is really hard to look at. So my project now
includes a new mapper type, letting me write instead:

    <copy todir="${archive.dir}/jars">
        <dependencies-mapper/>
        <fileset refid="distributed.jars" />
    </copy>


> 
> 
>  > > Like I said, I will change default behaviour to only fetch missing
> stuff.
>  >
>  > And also please avoid the copying. Under most conditions, it is
>  > preferable simply to point to the cache. In general, you only need to
>  > get private copies when you are building a distribution.
>  >
> 
> I want the opinon of other developers on this topic.

Agreed. I had hoped some of them would chime in.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to