buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: war packaging : tld
Date Thu, 29 Apr 2010 14:20:13 GMT
On Thu, Apr 29, 2010 at 12:51 AM, Jean-Philippe Caruana <
jeanphilippe1.caruana@orange-ftgroup.com> wrote:

> Hi,
>
> I'm currently working on moving our build from maven1 to buildr. I already
> done that (with lacton) on another project, but I'm still facing the same
> difficulties with tld files in a war : I have to add them "by hand" in the
> WEB-INF/tld folder :
>
>    war.path('WEB-INF/tld').tap do |path|
>      Buildr::group('struts-bean', 'struts-html', 'struts-logic',
> 'struts-nested', 'struts-tiles', :under=>'struts', :type=>'tld',
> :version=>'1.1').each do  |tld|
>        path.include tld
>      end
>    end
>
> But I'd like to write :
> compile.with Buildr::group('struts-bean', 'struts-html', 'struts-logic',
> 'struts-nested', 'struts-tiles', :under=>'struts', :type=>'tld',
> :version=>'1.1')
>
> When I do that, tld files are added in the WEB-INF/classes folder and
> that's wrong.
>
>
> My question is : is there another way to do it or is it ok to use
> compile.with ? (then, I'll provide a patch with spec)
>

The way I would write this today is,

define "my-project" do
  war = package(:war)

  taglibs = group('struts-bean', 'struts-html', 'struts-logic',
'struts-nested', 'struts-tiles',
            :under=>'struts', :type=>'tld', :version=>'1.1')

  war.path('WEB-INF/tld').include taglibs
end

which I think is respectable.

If we want to make this part of Buildr core, I would suggest adding a new
option to the :war packaging,

  package(:war).with :taglibs => [...]

that would be similar to the way package(:war).with :libs => [...] works.

alex

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