You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Nicolas Modrzyk <he...@gmail.com> on 2008/08/28 04:25:17 UTC

include dependencies

Hi,

I have the following situation.
I have a first project describe as:

define "ui-fw" do
    package(:jar)
    package(:war).with(:libs=>libs)
  end

and another one,
define "ui-fw-portlet" do
    libs = projects("ui-fw"), ...
    compile.with libs
    package(:war).with(:libs=>libs)
  end

My problem being that buildr 1.2.10 is including the war file of ui-fw
as part of the war file of ui-fw-portlet.
Is this solved in 1.3 ? Or should I specifically exclude the war
artifact from the second package call ?

Thank you in advance,

Niko,

Re: include dependencies

Posted by Nicolas Modrzyk <he...@gmail.com>.
really late answer, but yes, that does the trick perfectly.
Thanks !

On Fri, Aug 29, 2008 at 5:01 AM, lacton <la...@users.sourceforge.net> wrote:
> On Thu, Aug 28, 2008 at 4:25 AM, Nicolas Modrzyk <he...@gmail.com> wrote:
>> Hi,
>>
>> I have the following situation.
>> I have a first project describe as:
>>
>> define "ui-fw" do
>>    package(:jar)
>>    package(:war).with(:libs=>libs)
>>  end
>>
>> and another one,
>> define "ui-fw-portlet" do
>>    libs = projects("ui-fw"), ...
>>    compile.with libs
>>    package(:war).with(:libs=>libs)
>>  end
>>
>> My problem being that buildr 1.2.10 is including the war file of ui-fw
>> as part of the war file of ui-fw-portlet.
>> Is this solved in 1.3 ? Or should I specifically exclude the war
>> artifact from the second package call ?
>
> Here's the way I would do it.
>
> <code>
> define 'ui-fw-portlet' do
>    compile.with project('ui-fw').package(:jar), ...
>    package :war
> end
> </code>
>
> Since project('ui-fw') creates several packages, you need to specify
> which one you want for ui-fw-portlet.
>
> Note that the War task is clever enough to automatically include the
> compile dependencies, so no need for :libs in this example.
>
> Lacton
>

Re: include dependencies

Posted by lacton <la...@users.sourceforge.net>.
On Thu, Aug 28, 2008 at 4:25 AM, Nicolas Modrzyk <he...@gmail.com> wrote:
> Hi,
>
> I have the following situation.
> I have a first project describe as:
>
> define "ui-fw" do
>    package(:jar)
>    package(:war).with(:libs=>libs)
>  end
>
> and another one,
> define "ui-fw-portlet" do
>    libs = projects("ui-fw"), ...
>    compile.with libs
>    package(:war).with(:libs=>libs)
>  end
>
> My problem being that buildr 1.2.10 is including the war file of ui-fw
> as part of the war file of ui-fw-portlet.
> Is this solved in 1.3 ? Or should I specifically exclude the war
> artifact from the second package call ?

Here's the way I would do it.

<code>
define 'ui-fw-portlet' do
    compile.with project('ui-fw').package(:jar), ...
    package :war
end
</code>

Since project('ui-fw') creates several packages, you need to specify
which one you want for ui-fw-portlet.

Note that the War task is clever enough to automatically include the
compile dependencies, so no need for :libs in this example.

Lacton

Re: include dependencies

Posted by Assaf Arkin <ar...@intalio.com>.
On Wed, Aug 27, 2008 at 7:25 PM, Nicolas Modrzyk <he...@gmail.com> wrote:
> Hi,
>
> I have the following situation.
> I have a first project describe as:
>
> define "ui-fw" do
>    package(:jar)
>    package(:war).with(:libs=>libs)
>  end
>
> and another one,
> define "ui-fw-portlet" do
>    libs = projects("ui-fw"), ...
>    compile.with libs
>    package(:war).with(:libs=>libs)
>  end
>
> My problem being that buildr 1.2.10 is including the war file of ui-fw
> as part of the war file of ui-fw-portlet.

projects("ui-fw") is shorthand for "give me all the packages created
by 'ui-fw'", which would include that WAR file.

Assaf

> Is this solved in 1.3 ? Or should I specifically exclude the war
> artifact from the second package call ?
>
> Thank you in advance,
>
> Niko,
>