Bug 297895 - Flexible bundle root location for Plug-in/Bundle projects
Summary: Flexible bundle root location for Plug-in/Bundle projects
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.6 M5   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 153023 309050
  Show dependency tree
 
Reported: 2009-12-15 15:37 EST by Darin Wright CLA
Modified: 2011-07-05 11:30 EDT (History)
6 users (show)

See Also:


Attachments
patch (397.30 KB, patch)
2010-01-20 15:23 EST, Darin Wright CLA
no flags Details | Diff
remaining patch for DS (5.11 KB, application/octet-stream)
2010-01-20 15:26 EST, Darin Wright CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2009-12-15 15:37:25 EST
This is related to bug 154079, but does not cover all of the scenarios mentioned there.

We would like to support a plug-in project structure (bundle project) that allows for a flexible bundle root location, and supports running/debugging out of the workspace. Ideally, PDE build will also be able to understand this structure in order to export/build such projects.

The proposal is to allow a plug-in project to specify a bundle root location which is a project relative path in the workspace. This will be stored as a project specific setting (in PDE's project scope preference settings).

To support running/debugging from the workspace, runtime artifacts will be located in the bundle root location. For example:

* META-INF/MANIFEST.MF 
* OSGI-INF/
* plugin.xml
* fragment.xml 
* feature.xml 
* about.xml

At run/debug time, PDE can generate a dev.properties with bundle relative paths, and a bundles.info that identifies bundle roots. One difference is that output folders in dev.properties may now have entries like "../bin", since output folders may not necessarily be nested in the bundle root. Tom has verified that OSGi already supports this relative path format.

The build.properties file is a build/tooling artifact rather than runtime artifact, so it can still be located in the project root. However, the format of paths in build.properties needs to be determined - i.e. if paths are project relative or bundle-root relative (or a mix depending on the property specified). As well, we may need build.properties to tell PDE build where the bundle root is located (unless PDE reads the relevant project .settings file instead).
Comment 1 Darin Wright CLA 2009-12-15 15:42:55 EST
(In reply to comment #0)
> This is related to bug 154079, but does not cover all of the scenarios
> mentioned there.

Sorry, this is related to bug 153023 (not 154079).
Comment 2 Darin Wright CLA 2010-01-20 15:23:44 EST
Created attachment 156703 [details]
patch
Comment 3 Darin Wright CLA 2010-01-20 15:25:43 EST
I've released this patch to PDE, such that the tooling now supports a flexible bundle root location for PDE projects. The UI does not expose the ability to create such projects yet. It is available from the project creation API.

I will attach a sepearate patch for DS (I don't have commit rights there).
Comment 4 Darin Wright CLA 2010-01-20 15:26:56 EST
Created attachment 156704 [details]
remaining patch for DS
Comment 5 Darin Wright CLA 2010-01-20 15:28:30 EST
Note: PDE build does not support the flexible root (yet). However, the PDE editors/actions/etc., as well as running/debugging from the workspace do.

API is provided in IBundleProjectDescription to set a bundle root location for newly created projects, and in IBundleProjectService to modify the bundle root location for existing projects.
Comment 6 Chris Aniszczyk CLA 2010-01-20 15:30:10 EST
Committed the DS patch.
Comment 7 Thomas Watson CLA 2011-07-05 11:30:38 EDT
(In reply to comment #0)
about.xml
> 
> At run/debug time, PDE can generate a dev.properties with bundle relative
> paths, and a bundles.info that identifies bundle roots. One difference is that
> output folders in dev.properties may now have entries like "../bin", since
> output folders may not necessarily be nested in the bundle root. Tom has
> verified that OSGi already supports this relative path format.
> 

Note that the bug fix in bug320546 has broken this support.  A fix is being covered in bug351083