Community
Participate
Working Groups
Created attachment 168909 [details] My product file that generated the deployed application I created a product definition based on my minimal launch config (jface, swt, core.runtime for the application). My launch config launches. Both my launch config and the .product file do not include any optional dependencies. When I click on the product editor "Eclipse Product export wizard" link it generates my product directory with the launcher and required plugins, but it includes extra, optional plugins like javax.servlet_2.5.0.v200910301333.jar PW
Created attachment 168910 [details] The entire dialog project
On Windows, the container feature generated looks as follows. Anderw, do you know why extra bundles might be included? <feature id="org.eclipse.pde.container.feature" version="1.0"> <plugin id="org.eclipse.equinox.launcher" version="1.1.0.v20100507" /> <plugin arch="x86" fragment="true" id="org.eclipse.equinox.launcher.win32.win32.x86" os="win32" version="1.1.0.v20100503" ws="win32" /> <plugin arch="x86" id="org.eclipse.core.commands" os="win32" unpack="false" version="3.6.0.I20100512-1500" ws="win32" /> <plugin arch="x86" id="org.eclipse.core.contenttype" os="win32" unpack="false" version="3.4.100.v20100505-1235" ws="win32" /> <plugin arch="x86" id="org.eclipse.core.jobs" os="win32" unpack="false" version="3.5.0.v20100515" ws="win32" /> <plugin arch="x86" id="org.eclipse.core.runtime" os="win32" unpack="false" version="3.6.0.v20100505" ws="win32" /> <plugin arch="x86" id="org.eclipse.core.runtime.compatibility.registry" os="win32" unpack="true" version="3.3.0.v20100520" ws="win32" /> <plugin arch="x86" id="org.eclipse.equinox.app" os="win32" unpack="false" version="1.3.0.v20100512" ws="win32" /> <plugin arch="x86" id="org.eclipse.equinox.common" os="win32" unpack="false" version="3.6.0.v20100503" ws="win32" /> <plugin arch="x86" id="org.eclipse.equinox.preferences" os="win32" unpack="false" version="3.3.0.v20100503" ws="win32" /> <plugin arch="x86" id="org.eclipse.equinox.registry" os="win32" unpack="false" version="3.5.0.v20100503" ws="win32" /> <plugin arch="x86" id="org.eclipse.jface" os="win32" unpack="false" version="3.6.0.I20100520-0800a" ws="win32" /> <plugin arch="x86" id="org.eclipse.osgi" os="win32" unpack="false" version="3.6.0.v20100517" ws="win32" /> <plugin arch="x86" id="org.eclipse.swt" os="win32" unpack="false" version="3.6.0.v3649" ws="win32" /> <plugin arch="x86" id="z.ex.dialog" os="win32" unpack="false" version="1.0.0.qualifier" ws="win32" /> </feature>
This is a side effect of the changes for bug 272061 and only affects exports that are doing p2 metadata. There is a step during the build that mirrors requirements from the context repos to the build repo. Bug 272061 added the current target to the list of context repos, so now we generally have metadata available for bundles in the eclipse install. This metadata was not previously available for bundles not included in the product. p2 is deciding to install these optional dependencies since metadata is available for them. Pascal, does the resolver have any way to not included optional dependencies? The only thing build itself could do is not include optional dependencies when doing the mirror from the context repos into the build repo. This would be a change in behaviour for headless builds, we could make a special case for export from the UI
Created attachment 169899 [details] possible fix Possible fix to not include optional dependencies when mirroring from the context repos to the build repo. Only affects export from the UI. Perhaps a better change would be to introduce a new option for this.
Discussed with Andrew, moving to 3.7. Andrew suggested adding a new "exclude optional" option (off by default). The UI could turn this on or have a check box for it.
(In reply to comment #3) > The only thing build itself could do is not include optional dependencies when > doing the mirror from the context repos into the build repo. This would be a > change in behaviour for headless builds, we could make a special case for > export from the UI This inflated my product build output from 98mb (3.5) to 128mb (3.6). I'm not entirely clear on how this already isn't a change in behavior. Perhaps I am missing something. Is there no way for me to avoid including the optional dependencies? Is there a custom target I could implement to do the director install non-greedy (assuming that is the problem child)?
Too late for 3.7.
This was fixed by a contribution from bug 338878. Export is now using optional=false. There is no UI to control this, but it is possible to set an ant runtime property in the preferences "p2.mirror.slicing.includeOptional=true" to get the old behaviour *** This bug has been marked as a duplicate of bug 338878 ***