You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Henrik Thostrup Jensen <th...@gmail.com> on 2009/01/12 15:02:44 UTC

Specifying local files in repository

Hi

I am trying to setup buildr for an existing project, but have run into
some problems specifying dependencies:

1. I would like buildr to use jars installed in /usr/share/java,
instead of downloading them. The typical repository structure is not
used in /usr/share/java, it is just a directory with jar files in it.

2. The build requires some jars which are not available in any
repository (AFAIK), but only locally. These are installed somewhere
else than /usr/share/java.

Can this be done?
And can be done using $HOME/buildr.rb?


Also a note on the buildr installation (gem + classic ruby):

When installing dependencies gem installed the newest version, but
buildr requires some older versions, which I had to specify manually
before gem would install buildr. It is not a huge issue, but would be
nice if it worked out of the box.

Thanks.

-- 
   - Henrik

Re: Specifying local files in repository

Posted by Alex Boisvert <bo...@intalio.com>.
On Mon, Jan 12, 2009 at 6:02 AM, Henrik Thostrup Jensen
<th...@gmail.com>wrote:

> 1. I would like buildr to use jars installed in /usr/share/java,
> instead of downloading them. The typical repository structure is not
> used in /usr/share/java, it is just a directory with jar files in it.
>
> 2. The build requires some jars which are not available in any
> repository (AFAIK), but only locally. These are installed somewhere
> else than /usr/share/java.


This is somewhat covered in
http://incubator.apache.org/buildr/artifacts.html

Basically, you can use files directly,

  compile.with 'log4j.jar'

With some environment variable, assuming LIBS=/usr/share/lib

  compile.with "#{ENV["LIBS"]}/log4j.jar"

Or you can map artifacts to local files, e.g.,

  log4j = artifact('log4j:log4j:jar:1.0').from('log4j.jar')
  compile.with log4j

So there's a few ways of going at it depending on your needs.

alex