P2 gets those two value from system properties, equinox native launcher is responsible for reading config.ini then pass them to jvm.
You can directly launch eclipse via its java launcher with expected arguments. Mengxin Zhu On Wed, Jan 30, 2013 at 6:30 PM, Dileepa Jayakody <[email protected]> wrote: > Hi All, > > If above approach of substituting values in config.ini is not possible by > passing runtime arguments ,can I pass all arguments without reading > config.ini? > I tried this passing the following arguments at startup; > > > -Dorg.eclipse.equinox.simpleconfigurator.configUrl=file:{pathToInstallation}/configuration/ProfileA/org.eclipse.equinox.simpleconfigurator/ > bundles.info > -Declipse.p2.data.area={pathToInstallation}/p2 > -Declipse.p2.profile=ProfileA > > With above approach the org.eclipse.equinox.simpleconfigurator.configUrl > argument is properly taken and the bundles are loaded as per the pointed > bundles.info. But the eclipse.p2.profile argument is not taken properly > and the application fails to load the installation details of the profile. > > Could this because org.eclipse.equinox.p2.core bundle only reads the > config.ini to load eclipse.p2.profile and eclipse.p2.data.area values? > Appreciate any help on this. > > Thanks, > Dileepa > > > On Wed, Jan 30, 2013 at 12:43 PM, Dileepa Jayakody <[email protected]>wrote: > >> Hi All, >> >> I'm trying to implement multiple-profile support in our eclipse based >> system by pre-provisioning several P2 Profiles and dynamically select the >> relevant bundles.info and P2-Profile at startup. >> >> I have modified the structure of our eclipse-based app as below to >> support multiple-profiles; >> >> *configuration* >> |--config.ini >> |--ProfileA >> | |--org.eclipse.equinox.simpleconfigurator/bundles.info >> |--ProfileB >> | |--org.eclipse.equinox.simpleconfigurator/bundles.info >> >> *p2* >> |--org.eclipse.equinox.p2.engine >> | |--profileRegistry >> | |--ProfileA.profile >> | |--ProfileB.profile >> >> >> If I manually edit the config.ini properties before startup like below I >> can load the bundles and profile relevant to ProfileA installation and >> everything works fine; >> eclipse.p2.profile=ProfileA >> >> org.eclipse.equinox.simpleconfigurator.configUrl=file\ProfileA/org.eclipse.equinox.simpleconfigurator/ >> bundles.info >> >> But when I try to automate this by overriding config.ini properties by >> passing system.properties like below it doesn't work and application >> doesn't startup; >> eclipse.p2.profile=${profile} >> >> org.eclipse.equinox.simpleconfigurator.configUrl=file\:${profile}/org.eclipse.equinox.simpleconfigurator/ >> bundles.info >> >> It seems by passing -Dprofile=ProfileA , the config.ini's values are not >> substituted by ProfileA. >> Is it not possible to substitute config.ini properties by passing system >> properties like above? >> >> Any insight on this will be really helpful. >> >> Thanks, >> Dileepa >> > > > > -- > Dileepa Jayakody, > Software Engineer, WSO2 Inc. > Lean . Enterprise . Middleware > > Mobile : +94777-857616 > > _______________________________________________ > p2-dev mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/p2-dev > >
_______________________________________________ p2-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/p2-dev
