buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jabbar <aja...@gmail.com>
Subject Re: buildr newbie.
Date Sat, 02 Feb 2008 10:43:38 GMT
Hello Victor,

I've managed to get the ear packaging stuff working now :)

Now the fun starts learning and integrating jee5 with tapestry 5.


Thanks for your ear task

On 17/01/2008, Victor Hugo Borja <vic.borja@gmail.com> wrote:
> 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:
>
> my_project/
>      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)
>      my_utils/
>         src/main/java                        #  Utility
> java code
>      my_model/
>         src/main/java                        # A Hibernate
> capable project, some hbm.xml and DAOs
>      my_ejb/
>         src/main/java                        #  Business
> implementation
>      my_webservice
>         src/main/java                        #  A
> webservice interface to my ejb
>
>
> 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
>    package(:jar)
> end
>
> define 'my_model' do
>    compile.with Jar(:spring, :hibernate)
>    package(:jar)
> end
>
> define 'my_ejb' do
>       compile.with projects(:my_utils, :my_model), artifacts(:spring,
> :logging)
>       ejb = package(:ejb)  # use the attached ejb.rb
>       ejb.doclet_cp = Jar(/j2ee|xdoclet/, :weblogic)
>       ejb.doclet do |ant|
>         ant.packageSubstitution :packages => "ejb", :substituteWith => "
> ejb.iface"
>         ant.remoteinterface
>         ant.localinterface
>         ant.homeinterface
>         ant.localhomeinterface
>         ant.session
>         ant.deploymentdescriptor :destDir => ejb.doclet_meta , :validateXML
> => "true"
>         ant.weblogic :destDir => ejb.doclet_meta, :validateXML => "true",
>                      :version => "8.1", :createtables => "Disabled"
>      end
> end
>
> define 'my_webservice' do
>     package(:war)
> end
>
> 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'),
>                   project('my_webservice').package(:war)
>     ear.add :ejb => project('my_ejb').package(:jar)
> end
>
> ------
>
> 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 <ajazam@gmail.com> 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.


-- 
Thanks

 A Jabbar Azam

Mime
View raw message