Bug 502140 - Error message while exporting Committers Package from Eclipse Neon PDE Export
Summary: Error message while exporting Committers Package from Eclipse Neon PDE Export
Status: RESOLVED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2016-09-26 06:48 EDT by Alex Freidin CLA
Modified: 2018-12-03 09:03 EST (History)
1 user (show)

See Also:


Attachments
Fixed feature file (1.14 KB, text/xml)
2016-09-26 06:48 EDT, Alex Freidin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Freidin CLA 2016-09-26 06:48:34 EDT
Created attachment 264410 [details]
Fixed feature file

I am receiving an error message when exporting a product from my Eclipse Neon.
The message in the "Error Log" view is: 

Problems parsing the feature file:C:/work_area/eclipse_neon32/features/org.eclipse.epp.package.committers.feature_4.6.0.20160613-1800/feature.xml

The LOG has the following entry:

!ENTRY org.eclipse.pde.build 4 17 2016-09-13 18:08:59.516
!MESSAGE Could not create feature: file:C:/work_area/eclipse_neon32/features/org.eclipse.epp.package.committers.feature_4.6.0.20160613-1800/feature.xml.
!STACK 1
org.eclipse.core.runtime.CoreException: Problems parsing the feature file:C:/work_area/eclipse_neon32/features/org.eclipse.epp.package.committers.feature_4.6.0.20160613-1800/feature.xml.
	at org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.parseBuildFeature(BuildTimeFeatureFactory.java:85)
	at org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.createFeature(BuildTimeFeatureFactory.java:50)
	at org.eclipse.pde.internal.build.site.BuildTimeSite.createFeature(BuildTimeSite.java:458)
	at org.eclipse.pde.internal.build.site.compatibility.FeatureReference.getFeature(FeatureReference.java:39)
	at org.eclipse.pde.internal.build.site.BuildTimeSite.resolveFeatureReferences(BuildTimeSite.java:316)
	at org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:285)
	at org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:277)
	at org.eclipse.pde.internal.build.BuildScriptGenerator.generateFeatures(BuildScriptGenerator.java:249)
	at org.eclipse.pde.internal.build.BuildScriptGenerator.generate(BuildScriptGenerator.java:127)
	at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:255)
	at org.eclipse.pde.internal.core.exports.ProductExportOperation.run(ProductExportOperation.java:105)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Contains: Error parsing feature: "require" must include at least one "import" element.
!SUBENTRY 1 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-09-13 18:08:59.516
!MESSAGE Problems parsing the feature file:C:/work_area/eclipse_neon32/features/org.eclipse.epp.package.committers.feature_4.6.0.20160613-1800/feature.xml.
!SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2016-09-13 18:08:59.516
!MESSAGE Error parsing feature: "require" must include at least one "import" element.

Opening org.eclipse.epp.package.committers.feature_4.6.0.20160613-1800/feature.xml in the editor shows this:

<requires>
   <!--
        All requirements to features and the content of the product are defined 
        in the product configuration epp.product since Eclipse Neon. For further
        details see the following bug:

        Bug 332989 - Allow parts of a package to upgraded or removed
        https://bugs.eclipse.org/bugs/show_bug.cgi?id=332989
     -->
   </requires>

The block <requires> </requires> is indeed empty after the fix of "Bug 332989".
Moving the comments around the <requires> </requires> statements resolved the problem for me.
Comment 1 Gunnar Wagenknecht CLA 2016-09-26 07:01:00 EDT
Markus, does the EPP builder rely on an empty requires section or can the solution outlined here be applied?
Comment 2 Markus Knauer CLA 2016-09-26 08:21:47 EDT
Just guessing, but yes, Tycho will probably work without the empty element in the XML file, I don't see a reason why it shouldn't.

On the other hand I never tested the old PDE export with the EPP products, and my advice would be not to use that at all... the Tycho build is reliable and well tested.
Comment 3 Gunnar Wagenknecht CLA 2016-09-26 08:43:13 EDT
Ok, closing it as won't fix then.
Comment 4 Gunnar Wagenknecht CLA 2016-09-26 08:44:45 EDT
Actually, I have a better idea. I'll move it over to PDE to discuss if they would like to support it.
Comment 5 Gunnar Wagenknecht CLA 2016-09-26 08:45:59 EDT
PDE team, this one is for you to discuss if you'd like to support exporting packages from PDE.
Comment 6 Alex Freidin CLA 2016-09-26 08:48:55 EDT
Actually, EPP feature is not part of my product. I only export pure CDT product with its dependency features. The export wizard process seems to parse all existing features anyway and reports an error above.
Comment 7 Alex Freidin CLA 2016-09-26 09:18:39 EDT
I think that the issue is that empty <requires></requires> block in feature.xml is not allowed by PDE. Therefore, all features must obey to that requirement.
Other similar bugs are: bug 326207, bug 387616.
Comment 8 Gunnar Wagenknecht CLA 2016-09-26 10:07:54 EDT
See comment #2. Basically we'd like to avoid changing any feature.xml. Instead, PDE Build should be enhanced to support features with an empty requires section.
Comment 9 Lars Vogel CLA 2018-12-03 09:03:51 EST
Currently we are not actively enhancing PDE build anymore. Therefore, I close this bug as WONTFIX. 

Please reopen, if you plan to provide a fix.