View Source

h1. Introduction

Shared libraries are Petals artifacts that allow to mutualize Java librairies and make them usable by several Petals components.
A component can use a shared library if, and only if, it is associated with it.
Such an association can be done through several ways:
* With the [Petals Maven plug-in|petalscomponents:Maven Petals Plug-in ] (useful in continuous integration).
* By hand: it consists in adding an element in the jbi.xml of the component.
* With the studio.

Only the last case is described here.

h1. Using the studio

In the studio's menu, select *File > New > Petals Utilities > Configured Component* or click the icon showing a jar with a star inside.

!petals-studio-helpers-comp-with-sl-1.jpg!

\\
A dialog opens up.

!petals-studio-helpers-comp-with-sl-2.jpg!

\\
Type in an URL where to download a Petals component or select it on your local hard drive.
Then, define the location of the *output component*, the one that will be configured to use the selected shared libraries.

!petals-studio-helpers-comp-with-sl-3.jpg!

\\
The only remaining step is to define the shared libraries to use.
You can either select a shared library on your local hard drive (*Add a File...*)

!petals-studio-helpers-comp-with-sl-4.jpg!

\\
... or you can specify an URL where to download it (*Add an URL...*).

!petals-studio-helpers-comp-with-sl-5.jpg!

\\
Shared library information will be determined by introspecting the artifact.
Or you can also set manually this information by clicking *Specify Manually*.

!petals-studio-helpers-comp-with-sl-6.jpg!

\\
Once everything is set in the dialog, click *Finish*.

!petals-studio-helpers-comp-with-sl-7.jpg!