buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: Download dependency
Date Wed, 17 Feb 2010 15:41:23 GMT
On Tue, Feb 16, 2010 at 8:58 PM, Anders Janmyr <anders.janmyr@jayway.com>wrote:

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

Strange.  I can't reproduce this with Buildr 1.3.5 (Ubuntu/x86) and I don't
see how it could happen unless your calling install() on the artifact.
Here's the buildfile I'm using:

google_artifact = artifact('google:google-collect:jar:1.0').tap do |a|
  unless a.exist?
    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_jar.invoke
    a.from(google_jar)
    # I commented this to test whether the artifact gets installed w/o
calling install()
    #a.install
  end
end

define 'core' do
  project.version = '0.1'
  project.group = 'com.example'
  compile.with 'commons-lang:commons-lang:jar:2.4', google_artifact
  package :jar
end

Can you send me your actual buildfile?  (Or a stripped-down version that
installs the artifact on your system?)

alex

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message