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/**/*')

(I'm hoping to simplify the latter one day)

alex

Reply via email to