On Mon, Mar 8, 2010 at 6:28 PM, Alex Boisvert <[email protected]> wrote:
> On Mon, Mar 8, 2010 at 2:04 PM, Jesus M. Rodriguez <[email protected]>wrote:
>
>> I'm trying to package up our model classes in their own jar file with
>> the name of model.jar.
>>
>> I got it to generate the jar file with just my model classes but can't
>> figure out how to give it a different name.
>>
>>  package(:jar).clean.include
>> 'target/classes/org/fedoraproject/candlepin/model',
>> :path=>"org/fedoraproject/candlepin/"
>>
>> The next part is excluding those classes from the war file, any tips
>> on this would also be helpful.
>>
>> Thanks in advance,
>>
>>
> Hi Jesus,
>
> To change the name you use the :id parameter,
>
> package :jar, :id=>'candlepin'
>
> To exclude classes from the .war, you have to use the (unintuitive) path +
> exclude combination,
>
> package(:war).path('WEB-INF/classes').exclude('org/fedoraproject/candlepin/model/**/*')

That doesn't seem to work. The war file still has all of the model
classes in it.
I tried a few things:

package(:war).path('WEB-INF/classes').exclude('**/model/**/*')
...('WEB-INF/classes/**/model/**')
...('WEB-INF/classes/org/fedoraproject/candlepin/model/**')
...('org/fedoraproject/candlepin/model')

and quite a few others :)

jesus

Reply via email to