buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <>
Subject Re: buildr + XMLBeans documentation?
Date Sun, 20 Dec 2009 03:03:49 GMT
Hi Will,

On Sat, Dec 19, 2009 at 4:24 PM, Will Rogers <> wrote:

> I have not been able to find any documentation for buildr's XMLBeans
> support other than a short comment within addon/buildr/xmlbeans.rb
> itself. That comment got it working for me, but I have more questions.
> Is there documentation hiding somewhere?

No, the XMLBeans plugin is all of 100 lines and essentially just wraps the
Ant task and wires it with the project.   I consider it fairly well
commented but I understand it can look like crazy lingo at first if you are
new to Buildr.

If not, can anyone help me with these two questions?
> 1. In the few examples I've been able to find so far on the web, I've
> seen buildfiles with "require 'tasks/xmlbeans'", but the documentation
> in xmlbeans.rb says to use "require 'buildr/xmlbeans'". What's the
> difference? Which is preferred?

require 'buildr/xmlbeans' will use the Buildr-provided plugin.

require 'tasks/xmlbeans' will use a project-specific plugin (located under
the 'tasks' directory of your project).   It's possible your project has a
specific version that may have been tweaked.

> 2. Is there a way to make a task that generates and compiles the
> XMLBeans only, without going on to compile the rest of the project?

The plugin is composed of 2 parts,

1) the class method XMLBeans.compile() which is just a wrapper around the
Ant task and that you can use directly.  It won't do anything else besides
call the Ant task.

2) the instance method compile_xml_beans() which is mixed-in to the
project.  This one wires things up so that the XMLBeans are generated before
the compile task, and after the compile task is done, the generated files
are copied to the target directory.

(I'm just reading the Ruby source and paraphrasing)

It sounds like you want to use the first one.

Feel free to ask more questions.  Like I said, Buildr can be intimidating at
first but the discoveries are definitely rewarding.


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