Community
Participate
Working Groups
Created attachment 284613 [details] Simple project to demonstrate problem Steps Good: * Download JDK 11 * Download "Eclipse IDE for RCP and RAP Developers" * Create Simple plugin and product (attached) * Run Product Export Wizard * Result: An exported product Steps Bad: * Download JDK 11 * Download Oomph * Run to install "Eclipse IDE for RCP and RAP Developers" ** Ensure that Bundle Pool IS being used * Import the above created project * Result: The following error occurred while executing this line: C:\dev\ws\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\package.org.eclipse.pde.container.feature.win32.win32.x86_64.xml:182: The following error occurred while executing this line: C:\Users\user\.p2\pool\plugins\org.eclipse.pde.build_3.10.800.v20200410-1419\scripts\genericTargets.xml:240: A problem occured while invoking the director. Adding the following to the genericTargets.xml: <property name="p2.director.log" value="c:/users/user/Desktop/director.log" /> <record name="c:/users/user/Desktop/build.log" loglevel="verbose"/> Gives: Missing requirement: Theplugin 1.0.0.202010291855 (theplugin 1.0.0.202010291855) requires 'osgi.ee; (&(osgi.ee=JavaSE)(version=11))' but it could not be found After going through a load of analysis and debugging I narrowed this down to a slight difference in the config.ini for the "eclipse.p2.data.area". Using a bundle pool the value is written as a URI, i.e.: * Non-Bundle-Pool = eclipse.p2.data.area=@config.dir/../p2 * Bundle-Pool = eclipse.p2.data.area=file\:/C\:/Users/qatester/.p2/ When "org.eclipse.pde.internal.core.target.ProfileBundleContainer.getProfileFileLocation()" is then run the following returns false: p2DataArea = new File(p2Area); if (p2DataArea == null || !p2DataArea.isDirectory()) The mean there is no reference repository which I'm guessing is where the profiles are located to be used as part of the export process. I feel that this needs to be URI aware, or Oomph needs to write the value without the "file:\" component. I tried the following which seemed to work: try { if (URIUtil.isFileURI(new URI(p2Area))) { p2DataArea = new File(new URI(p2Area)); } else { p2DataArea = new File(p2Area); } } catch (URISyntaxException e) { throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, "No Config Area")); }
> I tried the following which seemed to work: > > try { > if (URIUtil.isFileURI(new URI(p2Area))) { > p2DataArea = new File(new URI(p2Area)); > } > else { > p2DataArea = new File(p2Area); > } > } catch (URISyntaxException e) { > throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, "No Config Area")); > } Forget that, I don't know why I thought it worked, but it doesn't :(
Patches would be welcome !
I think it's a dup of bug 545653 . Please reopen if you disagree. *** This bug has been marked as a duplicate of bug 545653 ***