buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <>
Subject Re: ant refugees
Date Sun, 13 Sep 2009 14:34:22 GMT
Hi Gilles,

On Sat, Sep 12, 2009 at 7:17 AM, Gilles Gaillard <
> wrote:

> I think I'm one of these ant 'refugees' you spoke about in your July mail
> exchanges.
> Since I noticed you didn't make any progress in publishing the page you
> were speaking
> about in your mails (I know free time is a rare thing ... but users like to
> see updates
> and news produced regularly ;-) I thought that the following questions
> could also help
> you to understand what kind of questions such a refugee could expect an
> answer to.

Yes, good initiative.  I'm sure it can help people reading this list or
searching the mailing list archive at a later time.

So here the list of questions, divided in two parts:
> 1. Basics
> - where does buildr expect to find ant itself

In your local Maven2 repository.  If it's not available, it will try to
download it from one of your configured remote repositories.

- where does buildr expect to find ant scripts

Buildr doesn't use ant scripts directly but there are several ways to
integrate with ant:

1) use ant tasks directly by using Antwrap (preferred)

  Buildr.ant(name) do |ant|
    ant.copy :todir =>'foo' do
      ant.fileset :dir=>'bar'
    ant.replace :file=>"", :token=>"@foo@", :value=>'bar'

2) call ant's main() directly using RJB [options] [target]

3) invoke ant using java and Ruby's

system('java -Dant.home=c:\ant [options] [target]

4) invoke ant using ant's shell scripts

system('ant -buildfile foo.xml')

The last three allow you to call ant scripts directly.

> - for syntactic reasons linked to ant history, I must currently keep on
> using ant-1.6.2
>  is that a blocker point - where do I specify the ant version I want to use
> ?

In buildr.yml, simply add:

ant: 1.6.2

- my projects layout looks like the standard one you described but is not
> exactly the same.
>  For example, the 'target' build directory is named here 'build'. Where in
> buildr can I
>  change the layout or the directory names ?


> - As a first step wouln't it be better for my use-case to use ant-wrapper
> without buildr ?

Depends if you want to take multiple small steps and refactor in-between or
one giant step and be done with it ;)

> 2. Next steps
> As a next step, I would like to improve my build and reduce the complexity
> of scripts usage
> by implementing an upper layer by using buildr/ruby making all ant public
> targets available.
> Is that the way you expect ant users to proceed, what advices would you
> give me for that
> purpose ?

Personally, I don't see much gain in reducing complexity by moving to Rake +
Antwrap alone.

If your build fits Buildr's model of compile, package, test, etc. then I
would make the jump to Buildr directly.

Perhaps a good approach is to try on one project and refine the approach
until you've gotten the significant gains (productivity, complexity, ...)
before you move to other projects.

Last note, I would have expected to find an 'Overview' page somewhere
> between 'Getting Started'
> and 'Projects' that gives an overview of the system and how it works.

Agreed.  We sort of assume familiarity with Maven2.  I'm working on
something that will address some of this but it's not ready yet....


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