Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 Build Identifier: I20090611-1540 During headless startup of org.eclipse.core.AntRunner, if "-pluginCustomization" argument is given, it is incorrectly forwarded to AntRunner application as application argument. This is the cause of bug 294502. Since bug 294502 is already fixed this behavior is not blocking for users, however it produces confusing output information. For headless AntRunner call: "%java%" -cp "%eclipse_startup%" org.eclipse.core.launcher.Main -pluginCustomization plugin_customization.ini -application org.eclipse.ant.core.antRunner -buildfile %script% -verbose -data %workspace% -Dworkspace.dir=%workspace% test User will see output information: Unknown argument: -pluginCustomization Unknown target: plugin_customization.ini I believe we should remove "-pluginCustomization" and its file name argument from EnvironmentInfo.nonFrameworkArgs after it was processed. Moreover, if in config.ini eclipse.pluginCustomization is set, then "-pluginCustomization" from command line is just ignored so we should also remove it then from EnvironmentInfo.nonFrameworkArgs. I suggest to make change in Activator class of org.eclipse.equinox.preferences in method processCommandLine() and remove "-pluginCustomization" and its file name argument from EnvironmentInfo.nonFrameworkArgs. Do we have any possibility to change this String array? Cause interface EnvironmentInfo has only getter methods... We can do it in EclipseEnvironmentInfo which implements EnvironmentInfo, but then it is needed to change package visibility. Reproducible: Always
I do not agree that we should remove any nonFrameworkArgs. We have never removed others arguments that have been processed from this list. I think it is confusing to all of a sudden start removing special case arguments from this list. It is meant to be a constant list of arguments as passed in to eclipse from the command line.
Arguments are removed in org.eclipse.equinox.internal.app.CommandLineArgs processCommandLine(EnvironmentInfo envInfo). All arguments such as "-product", "-application", "-plugins" are removed from appArgs. If not removing from nonFrameworkArgs then maybe we should remove "-pluginCustomization" here?
(In reply to comment #2) > Arguments are removed in org.eclipse.equinox.internal.app.CommandLineArgs > processCommandLine(EnvironmentInfo envInfo). All arguments such as "-product", > "-application", "-plugins" are removed from appArgs. If not removing from > nonFrameworkArgs then maybe we should remove "-pluginCustomization" here? We could do that, but I think we have been reluctant to remove new arguments from the list passed to an application on start. Who knows what applications may be dependent on the argument being passed through.
(In reply to comment #3) > We could do that, but I think we have been reluctant to remove new arguments > from the list passed to an application on start. Who knows what applications > may be dependent on the argument being passed through. Is "-pluginCustomization" argument dedicated to be used by particular application? If it is, then we should parse it out in AntRunner. However I tested headless scenario with p2.director application. If user adds "-pluginCustomization" p2.director will not install feature but throw message: P2 headless call: %JAVA% -cp %LAUNCHER% org.eclipse.core.launcher.Main -application org.eclipse.equinox.p2.director -metadataRepository "%METADATA_REPOSITORY%" - artifactRepository "%ARTIFACT_REPOSITORY%" -destination "%DESTINATION_ECLIPSE%" -installIU %INSTALLATION_UNIT% -profile %PROFILE% -bundlepool "%BUNDLEPOOL%" -profile %PROFILE% -roaming -nl en !ENTRY org.eclipse.equinox.p2.core 4 0 2009-11-23 12:43:54.484 !MESSAGE Unknown option -pluginCustomization. Use -help for a list of known options. As I see not only AntRunner has problems with "-pluginCustomization" being passed as application argument.
(In reply to comment #4) > %JAVA% -cp %LAUNCHER% org.eclipse.core.launcher.Main -application > org.eclipse.equinox.p2.director -metadataRepository "%METADATA_REPOSITORY%" - > artifactRepository "%ARTIFACT_REPOSITORY%" -destination "%DESTINATION_ECLIPSE%" > -installIU %INSTALLATION_UNIT% -profile %PROFILE% -bundlepool "%BUNDLEPOOL%" > -profile %PROFILE% -roaming -nl en Sorry, I pasted command without "-pluginCustomization" :) Once more... %JAVA% -cp %LAUNCHER% org.eclipse.core.launcher.Main -pluginCustomization custom.ini -application org.eclipse.equinox.p2.director -metadataRepository "%METADATA_REPOSITORY%" -artifactRepository "%ARTIFACT_REPOSITORY%" -destination "%DESTINATION_ECLIPSE%" -installIU %INSTALLATION_UNIT% -profile %PROFILE% -bundlepool "%BUNDLEPOOL%" -profile %PROFILE% -roaming -nl en !ENTRY org.eclipse.equinox.p2.core 4 0 2009-11-23 12:43:54.484 !MESSAGE Unknown option -pluginCustomization. Use -help for a list of known options.
Created attachment 152847 [details] PluginCustomizationConsumedPatch A little change that solves problems from above... Patch against HEAD.
I agree with Natalia. We should parse this out of the arguments passed by the application container to the application start/run method. I release the patch for M4.
Comment on attachment 152847 [details] PluginCustomizationConsumedPatch Thanks for the contribution. Marked for iplog.