Keeping Target Control
April 5, 2013 | 2 min ReadShortly after you have created your Eclipse-based project, you must choose a target platform. The use of target platform definitions is now widespread but you can define these in several ways, the most important being the Directory and the Software Site.
The path you choose to take depends on the type of artifacts at hand. There are two types of Eclipse directories: The Repository format and the Runnable format. These are identified by the plugins/ and features/ subfolders)
- Repository format: The features and plug-ins are jar’d, maybe gziped, and could possibly be in the .blobstore. The repository format is read by the _Software Site-_type target definition entries.
- __Runnable format: The files and folders in plugins/ and features/ are ready to be consumed by a running instance of Eclipse. The Directory type target definition entries use the runnable format.
Undoubtedly, in the case of projects that should go on top of Eclipse, the Software Site is the correct choice. This gives projects the option of consuming p2-directories directly from the source. For example, you can enter any of the Eclipse Project Update Sites.
The problem with Software Sites is that a project relative-location is not possible. This means that if you want to keep your target platform contained in one location, and possibly independent from Internet access, then Directory entries are the way to go.
In some cases, the target platform will be in a repository format, but you actually want to consume it in a runnable format. For example, PDE can only consume the runnable format. You typically notice that something is amiss when PDE does not see the features that are jar’d in the features/ folder. There are several ways to transform the repository formats, but none of them are obvious. The simplest one I know is to create a throwaway target definition that points to the (possibly local) software site.
Then I use the Export Target Definition wizard to export all referenced features and plug-ins into runnable format.
The exported folder can then be copied to the final location and referenced by a Directory style entry.
How do you transform p2-repositories into runnable format?