Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Can't build headless featurebased RCP
Can't build headless featurebased RCP [message #964599] Tue, 30 October 2012 16:53 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 3
Registered: October 2012
Junior Member
I have troubles to get a headless featurebased RCP build. The error is: productBuild.xml:69: Unable to find feature: myotherfeature

My directory structure:
- workspace
|- myfeature
| |- feature.xml
| |- ...
|- myotherfeature
| |- headless
| | |-
| |- my.product
| |- feature.xml
|- ...

As you see, the features were created in the workspace, there is no dedicated "features" folder, because the features are "feature-projects" generated by eclipse in the workspace.

The file is a copy from the headless-directory of pde-plugin. I set following:

topLevelElement = feature
topLevelElementd = myotherfeature
builddirectory=<path to my workspace>
base=<path to parent directory of my eclipse-root>
baseLocation=<points to the eclipse root>

All other settings are irrelevant for my problem, I think.

The product-file has only one dependency: myotherfeature. This feature has its own dependencies, like myfeature and other plugins/features.

I can build the RCP in eclipse by clicking the link on the right of the product-editor overview-tab. AND also I can start the RCP directly using the "Start Eclipse application" link on the left.

If I change in the product-property to something, that does not exist, then there is the error, that it can't find the element in <workspace>/features/myotherfeature/my.product. Why it is searching in <workspace>/features and not just only in <workspace>? Maybe this is a hint for my problem.

Maybe this is a bug, because I can build another project, which is based on plugins only, there are no features.

Do I miss something? Any suggestions?
Re: Can't build headless featurebased RCP [message #966930 is a reply to message #964599] Thu, 01 November 2012 10:50 Go to previous message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 3
Registered: October 2012
Junior Member
I think, I have found the problem:

In ( Plugin, - Package), there is the method: findFeatureXMLs(). It contains this code:

if (file.exists()) {
  //path is a feature itself
} else if (new File(sitePaths[i], DEFAULT_FEATURE_LOCATION).exists()) {
  //path is a eclipse root and contains a features subdirectory
  foundFeatures = Utils.findFiles(new File(sitePaths[i]), DEFAULT_FEATURE_LOCATION, Constants.FEATURE_FILENAME_DESCRIPTOR);
} else {
  // treat as a flat directory containing features
  foundFeatures = Utils.findFiles(new File(sitePaths[i]), ".", Constants.FEATURE_FILENAME_DESCRIPTOR); //$NON-NLS-1$

The problem is, that while creating plugins and features in eclipse, the script creates a "features" folder in the build folder. I set my "build-folder" to my workspace folder. This will force the if-else if-else code to run into the else-if instead of the else, because the script creates the "features" folder before.
Previous Topic:Question about Eclipse plug-in capabilities
Next Topic:Not able to import only one particular project in eclipse
Goto Forum:

Current Time: Sat May 21 01:02:44 GMT 2022

Powered by FUDForum. Page generated in 0.04659 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top