Previous Topic

Next Topic

Book Contents

Book Index

Creating a PAR Project

You have two options for creating a PAR Project. From scratch if you do not have a ready PAR file in the format supported by the PAR Editor. By transforming a ready PAR file into a project in Eclipse.

From Scratch

To create a PAR Project from scratch, following the instructions:

  1. In an Eclipse navigation view, e.g. Package Explorer, use the File > New > Project menu command.
  2. In the New Project dialog, go to OSGi and select PAR Project.
  3. Specify a name for the project and if needed enter a location for it different from the default one. Click Next to continue or use Finish to have the project created with default settings.
  4. In the next dialog, PAR Content, specify the following properties for the PAR file:
  5. To complete project generation, click Finish.

The new project will appear in Eclipse containing the META-INF directory with the provisioning descriptor provisioning.xml and with supplementary TGT descriptor <project_name>.tgt and backend descriptor <project_name>.mprm.

From a Ready PAR File

If you have a ready PAR file following the structure described in Overview, you can easily import it as a PAR Project in Eclipse and change it if needed with the help of PAR Editor. Follow the next steps:

  1. In an Eclipse navigation view, e.g. Package Explorer, use the File > New > Other menu command.
  2. In the Select a Wizard dialog, select the OSGi > PAR Project from Existing PAR File option. Click Next.
  3. In the PAR Project from Existing PAR File dialog, specify the location of the .par file whose content will be transformed into an Eclipse project. Click Next.
  4. Finally, specify a name for the project and optionally a location for it different from the default one.
  5. Click Finish to complete project generation based on the content and properties of the PAR file.

The new project will appear in Eclipse. It will contain the META-INF directory with the provisioning descriptor provisioning.xml and with supplementary TGT descriptor <project_name>.tgt and backend descriptor <project_name>.mprm, and the components present in the archive.

Next, you can configure the PAR file properties and content, and upload it to the Software Repository or install it to an OSGi runtime.