buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Janmyr <anders.jan...@jayway.com>
Subject Re: Download dependency
Date Mon, 22 Feb 2010 07:48:37 GMT
Hi,

I would not say mystery solved, but problem solved.

I still think my first try should work.

 google_zip = download "target/google-collect-1.0.zip" =>
   'http://google-collections.googlecode.com/files/google-collect-1.0.zip'
 google_jar = file("target/zip/google-collect-1.0/google-collect-1.0.jar" =>
   unzip('target/zip'=>google_zip))
 google_artifact = artifact('google:google-collect:jar:1.0').from(google_jar)

I'll take a look at the mystery as soon as I can.
Maybe it has something to to with file_task.
If an artifact is dependent on a file that doesn't exist, then buildr
tries to find out how
to create this missing file and then everything follows from there.

I think that artifact should check if the file exist, and then just
stop, without doing anything else.
This is probably how artifact works without from, but it seems that
from changes it.

I'll get back to you when I have investigated the issue properly.

Anders


On Tue, Feb 16, 2010 at 6:45 PM, Anders Janmyr <anders.janmyr@jayway.com> wrote:
> Hi,
>
> I have an artifact that is constructed from a zip-file, like this
>
>  google_zip = download "target/google-collect-1.0.zip" =>
> 'http://google-collections.googlecode.com/files/google-collect-1.0.zip'
>  google_jar = file("target/zip/google-collect-1.0/google-collect-1.0.jar"
> => unzip('target/zip'=>google_zip))
>  google_artifact = artifact('google:google-collect:jar:1.0').from(google_jar)
>
>  define 'core' do
>    compile.with 'commons-lang:commons-lang:jar:2.4', google_artifact
>    package :jar
>  end
>
> If I build once and then clean and build againm the zip-file is
> downloaded again, even though
> the artifact is already in the repository. This seems wrong to me. Am
> I doing something wrong?
>
> And by the way, I'm giving a presentation on Buildr in Stockholm,
> Sweden next week since I think
> Buildr is so good :)
>
> http://jwsbuildr10.eventbrite.com/ (In Swedish)
>
> Regards
> Anders
>
> --
> http://anders.janmyr.com/
>



-- 
http://anders.janmyr.com/

Mime
View raw message