buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor Hugo Borja" <>
Subject Re: buildr newbie.
Date Thu, 17 Jan 2008 16:24:16 GMT
Hello Jabbar,

First of all, thanks for trying out buildr.

I currently have a project using the EAR task, using a single buildfile and
some subprojects,
my directory structure is something like:

     buildfile                                   #   A buildfile to rule
them all, and in buildr bind them :)
     tasks/ejb.rb                             #  My ejb task using xdoclet
(still needs a lot of love to be integrated on buildr)
        src/main/java                        #  Utility java code
        src/main/java                        # A Hibernate capable project,
some hbm.xml and DAOs
        src/main/java                        #  Business implementation
        src/main/java                        #  A webservice interface to my

My buildfile looks something *like* this:
require File.expand_path('tasks/ejb', File.dirname(__FILE__)) # I've
attached my current ejb task (it needs a lot of love to be integrated on
buildr trunk)

define 'my_utils' do
   compile.with Jar(:spring, :commons_lang) # Jar is a custom function of
mine that receives filters like regexps and returns artifacts matching it

define 'my_model' do
   compile.with Jar(:spring, :hibernate)

define 'my_ejb' do
      compile.with projects(:my_utils, :my_model), artifacts(:spring,
      ejb = package(:ejb)  # use the attached ejb.rb
      ejb.doclet_cp = Jar(/j2ee|xdoclet/, :weblogic)
      ejb.doclet do |ant|
        ant.packageSubstitution :packages => "ejb", :substituteWith => "
        ant.deploymentdescriptor :destDir => ejb.doclet_meta, :validateXML
=> "true"
        ant.weblogic :destDir => ejb.doclet_meta, :validateXML => "true",
                     :version => "8.1", :createtables => "Disabled"

define 'my_webservice' do

define 'my_ear' do   #  I have a single project to produce the EAR
    ear = package(:ear)
    ear.push Jar(:spring, :hiberante),
                  projects('my_utils', 'my_model'),
    ear.add :ejb => project('my_ejb').package(:jar)


When I run my_project:my_ear:package, it creates the ear archive under
my_ear/target  directory.

Don't expect the above code to run unmodified, It's just an example as I
cannot copy the actual source files.
I hope this clarifies things a bit.

We apprecitate your interest in using buildr, and would like to hear
comments about what parts you find confusing on the current documentation,
and patches are welcome :).

Happy buildring.

On Jan 17, 2008 9:38 AM, Jabbar <> wrote:

> Hello,
> I would like to use buildr on one of my projects. But I am a bit
> confused. I have a project which is called contacts which contains sub
> projects entity, session and presentation.
> Do I have to have one buildfile in the root of contacts, or do I have
> to have a buildfile in the root of each subprojects directories. I
> have read the documentation, but have found parts of it confusing. I
> found the example buildfile in the projects section of the manual
> confusing. It looks like all the information describing the project is
> there, yet the documentation implies there are multiple build files.
> The project contacts will be an ear project. I have already got a
> build of buildr from yesterdays (16/1/2008) svn trunk, so I should be
> able to try the ear stuff. It was fun trying to create a buildr
> package on my windows box, NOT. Hopefully the effort will be worth it.
> I didn't want to use Ant or Maven.
> --
> Thanks
>  A Jabbar Azam

Quaerendo invenietis.

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