[Yanel-dev] shared library

Paul Bakker p.bakker at sourcesense.com
Fri Oct 15 15:02:23 CEST 2010


Dear Cedric,

Your proposed method works fine. Thanks.

Now I have a follow-up question. Suppose I have several resource types, some
of which have dependencies in their dependencies.xml on the same artifacts.
Would there then be a way to maintain these dependencies also in a more
centralized fashion?
I know it won't work adding the dependencies to the dependencies.xml of the
'shared' resource type.

Best,
Paul

2010/10/14 Paul Bakker <p.bakker at sourcesense.com>

> Dear Cedric,
>
> Thanks a lot. I'll try your approach.
>
> Best,
> Paul
>
> 2010/10/14 Cedric Staub <cedric.staub at wyona.com>
>
> Hi
>>
>> On Wed, Oct 13, 2010 at 05:35:12PM +0100, Paul Bakker wrote:
>> > Can you recommend an approach for where to put utility classes that
>> contain
>> > methods that could be used by several resource types?
>>
>> Personally, I like to do it this way:
>>
>> 1. I create a new resource type, e.g. my-shared-resource.
>>
>> 2. I let the resource type be packaged into a jar file by creating a
>> pom.xml file within src/build. Here's an example from our newly released
>> konakart-yanel-realm's shared resource:
>>
>> <?xml version=3D"1.0"?>
>> <project>
>>  <modelVersion>4.0.0</modelVersion>
>>  <groupId>wyona-org-yanel</groupId>
>>  <artifactId>yanel-resource- at NAME@</artifactId>
>>  <version>@VERSION@</version>
>> </project>
>>
>> 3. Then you'll need to add that resource to the dependencies of your
>> other resources by writing it into src/build/dependencies.xml:
>>
>> <dependency groupId=3D"wyona-org-yanel"
>> artifactId=3D"yanel-resource-konakart-shared" version=3D"0.0.1-dev-rXXX"=
/>
>>
>> 4. And last but not least, add the resource to your realm's
>> resource-types.xml. But make sure to put it at the top of the list, so
>> it gets compiled before all the other resources.
>>
>> You can look at our konakart-yanel-realm as an example:
>>
>> http://svn.wyona.com/repos/public/yanel/contributions/realms/konakart-ya=
nel-realm/
>>
>> The shared resource there is simply called "shared".
>>
>> Greetings,
>> Cedric
>> --
>> Yanel-development mailing list Yanel-development at wyona.com
>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wyona.org/pipermail/yanel-development/attachments/2010101=
5/6626d4e0/attachment.htm


More information about the Yanel-development mailing list