buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Janmyr <>
Subject Re: Download dependency
Date Wed, 17 Feb 2010 04:58:51 GMT
Hi Alex,

> artifact(...).from(...) only changes the source of the artifact for a given
> execution.   It doesn't actually install the artifact in the local Maven2
> repo.   If you want to install it, you can do something along the lines of:
It actually does install the artifact into the repository. I'll show a
session below.
But I will use your suggestion anyway.


[505:repository]$ find google
find: google: No such file or directory

[565:words (master)]$ buildr test=no
(in /Users/andersjanmyr/Projects/words, development)
Building words
Skipping tests for words
Skipping tests for words:web
Completed in 0.017s

506:repository]$ find google

Completed in 0.017s
[566:words (master)]$ buildr clean
(in /Users/andersjanmyr/Projects/words, development)
Cleaning words
Completed in 0.042s
[567:words (master)]$ buildr test=no
(in /Users/andersjanmyr/Projects/words, development)
Building words
google-collect-1..: 100% |.................................|
1.5MB/1.5MB Time: 00:00:25
Installed /Users/andersjanmyr/Projects/words/target/zip/google-collect-1.0/google-collect-1.0.jar
as google:google-collect:jar:1.0
Compiling words:core into /Users/andersjanmyr/Projects/words/core/target/classes
Compiling words:core:test into
Skipping tests for words:core
Packaging words-core-1.0.0.jar
Compiling words:cli into /Users/andersjanmyr/Projects/words/cli/target/classes
Note: /Users/andersjanmyr/Projects/words/cli/src/main/java/words/cli/
uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Skipping tests for words
Compiling words:cli:test into
Skipping tests for words:cli
Skipping tests for words:web
Completed in 28.227s

> google_artifact = artifact('google:google-collect:jar:1.0').tap do |a|
>  unless a.exist?
>    google_zip = download "target/" => '
>    google_jar = file("target/zip/google-collect-1.0/google-collect-1.0.jar"
> => unzip('target/zip'=>google_zip))
>    google_jar.invoke
>    a.from(google_jar)
>    a.install
>  end
> end
>> And by the way, I'm giving a presentation on Buildr in Stockholm,
>> Sweden next week since I think Buildr is so good :)
>> (In Swedish)
> That's awesome!  Thanks for spreading the word.
> alex


View raw message