Hi,
I looked at the generation of the config.ini in the M3 release. I still see there problems and think the report 175 was closed to early.
Problems/Questions:
- The generated config.ini is one line with no CR/LF at all. Probably "
" are missing at each echo line.
- There is a bug in the "osgi.bundles" line:
"org.eclipse.osgi@start" needs to be replaced with "org.eclipse.osgi@-1:start"
Then the product starts fine.
- Not all plugins needed to actually start my product are listed at the "osgi.bundles" line.
Is this intended. Eclipse adds all necessary plugins.
Thanks for your work and best regards,
Georg.
- Login to post comments
Hi Georg, I've changed the
Hi Georg,
I've changed the logic as followed:
1. Collect the bundles declared in 'osgi.bundles' for any given target platform.
2. If the entry 'osgi.bundles' refers to the simple configurator collect the bundles declared in 'bundles.info'. At the moment the path to the 'bundles.info' is hardcoded since it would require to provide url resolvers otherwise and there's probably no need for any other pathes anyway.
3. When no bundle could be loaded the default ones will be used (they're just some sort of guess). I'm thinking of removing them as that might be confusing for some people if part of a platform won't be loaded because of these hardcoded bundles.
4. The bundles of the product configuration file will be added.
Since it's currently a bit late and because of the lack of a test case I haven't tested it (at least not the task but of course some internal code that has been implemented).
So if you're giving it a try let me know what came out.
Best regards
Daniel Kasmeroglu
Here's a link where you can
Here's a link where you can find some information regarding the config.ini :
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.pde.doc.user...
Anyway: Feel free to enlighten me.
Best regards
Daniel Kasmeroglu
Hi, - The generated
Hi,
You were right. I fixed that.
The value -1 has no meaning according to the definition.
The bundles that are being declared for the start are not managed within the product configuration file. They're derived from the target platform locations. I've currently enhanced the task, so it calculates the bundle list from these locations (still using the previously hardcoded bundles as a fallback solution).
As we don't have a complex product build for the test I can't verify whether this is working or not (the build itself has been implemented for a product which did provide it's own config.ini so this functionality wasn't really needed before). So I suggest that you could help us a little while using the latest build which could be taken from here:
http://hudson.nilshartmann.net/job/ant4eclipse/
Obviously I will enhance our test suite to run product based tests using a more complete product (I've also got a candidate for this) but that depends on how often we've got spare time for this.
I'm hoping for an answer of your build.
Best regards
Daniel Kasmeroglu
Even if the -1 has no
Even if the -1 has no meaning, my example works with this setting (strange). Any other value or omitting the start value will fail to start my app with an exception:
Omitting "org.eclipse.osgi@start" from the config.ini works as well.
Any clue?
I figured out the -1 from the bundles.info info file eclipse generates during product export:
The app I have right now is not complex at all either (This might change.). I'll do my best to help. I installed the latest build (1801) and gave it a try with my feature based RCP example. Unfortunately the start failed with an exception:
Content of config.ini:
Eclipse product export delivers instead:
See the differences at "osgi.splashPath", "osgi.bundles" and "org.eclipse.equinox.simpleconfigurator.configUrl"
In addition eclipse generates the bundles.info file:
That is how far I got right now. Tell me if you want me to test something.
Best regards,
Georg.
Further remarks
Further remarks ...
Concerning the -1: In eclipse this value comes directly from the launch configuration (see code below)!
What do you think about the following approach to get the config.ini content:
1. Let the developer export the launch configuration via the "Shared File" option in the "Run configurations" Dialog.
2. Let the developer specify this file as run configuration file in ant4eclipse for his project build. If the developer does not do this, go for your other approaches.
3. Fetch the content for "osgi.bundles" from the launch configuration file ("selected_target_plugins" and "selected_workspace_plugins"):
Best regards,
Georg.
Basically you're idea would
Basically you're idea would be possible. Nevertheless the launch configuration is derived from the product configuration. The question is how the calculation of the started bundles takes place.
Last but not least I need such a situation to reproduce this error first and recognize when it's finished.
Best regards
Daniel Kasmeroglu
Situation to reproduce ...
If you mean a situation to reproduce the error I had, I think this is quite easy:
Just use a standard eclipse 3.5.5 as target plattform for a simple HelloWorld RCP app (feature based in my case). I think I can send you my simple example via mail, if you want to have it. Then I need your mail address.
The problem here is, that the standard eclipse now uses the simpleconfigurator in the "osgi.bundles" line of the config.ini file. In your code you parse this line to get a list of bundles, but they are not there. They are in the bundles.info file.
I reckon you know that, but I'm a bit confused about which error you are talking about.
Best regards,
Georg
I've sent your my email just
I've sent your my email just in case my next solve won't fix it.
I think we're getting closer to the bottom of the problem. The "spec" I've found about the config.ini just mentioned the behaviour of the starting bundle list. But when I'm understanding you correctly the initially started bundle "simpleconfigurator" provides some kind of shortcut functionality to load the bundles from the 'bundles.info' file. Solving this wouldn't be very complicated. Though it would be nice if you've got some doc about it. Nevertheless I'll let you know when I got another version for you to try.
Best regards
Daniel Kasmeroglu
More remarks ...
You are right, the launch configuration is derived from the product configuration and concerning the product build, generating the config.ini from a launch configuration is wrong. I do not know, if the generation of a config.ini file from a launch configuration could be of any use.
Concerning the product build the right way to do it, is the way eclipse is doing it. Fetch the information from the product file. Get all dependent plugins/features and nested plugins/features. Doing that, respect the start level and the auto start configuration in the product file. This is in our real project a must have, because we use spring DM. There these values need to be configured, to get the thing running.
IMHO the approach you favor now, looking at the config.ini in the target platform is not optimal. You might miss some bundles from the workspace, but I'm not really sure about that (I did not check.). And the real drawback is (IMHO), if the target platform is a plain eclipse install, you pull in all eclipse bundles of this eclipse install, even if you do not need them.
These are just some thoughts concerning this topic with our requirements in mind.
Tell me your opinion. Best regards,
Georg
IMHO the approach you favor
I wouldn't just do a plain copy of all target platform plugins. Only plugins that are part of the build product would make it into the config.ini (or bundles.info).
Regarding the config.ini from the target platform: That's the way Eclipse is doing it (at least according to the explanation I could find).
Best regards
Daniel Kasmeroglu
Regarding the config.ini from
Could you please give me some link to these explanations.
I'm not an expert, but I think still the product file should be the driving information. Implementing your approach, will you respect the start level and the auto start configuration from the product file? I know you respect i.e. the launcher name.
I think it is possible to have a target platform without a config.ini. What is your approach then?
Thanks and best regards,
Georg.
but I think still the product
I don't anything different. If you have a look into the product file you won't find any information regarding the start level. The whole config.ini stuff is derived from other informations (I will give you a link when I'm at home).
Maybe you could give me your product file which seems to contain the start level information.
As there will be no bundles the config.ini would be empty.
Let me get this straight: Ant4Eclipse is an open source project. So I don't intend to catch each possible constellation. I'm only focused on things that seems worth it (at least to me). If you feel that other scenarios shall be supported, too you're free to join us.
Best regards
Daniel Kasmeroglu
Here is a product file with
Here is a product file with information about start level and auto start:
I was thinking about eclipse equinox as target platform, when I asked about your approach, if there is no config.ini. I thought it could be of interest or might be of some relevance.
Yes, I know that and I'm really happy with whatever you are doing for ant4eclipse. I just wanted to understand the whole problem and sort things out concerning the config.ini file stuff. If you are settled with your way implementing it, that is fine, just tell me and I will stop posting on this topic. If you have something to test, I'm looking forward to do it and give you feedback.
Thanks and best regards,
Georg.
I just wanted to understand
As you did. I will check this when I've got the time for it. Do you know whether the configuration element was already available in 3.4/3.3 ? To be honest: I'm seeing this element the first time.
You don't need to stop posting. The automated generation of the config.ini is truly a feature worth the effort. But until now I just wasn't aware of these configuration element, so that helped a lot (btw. a DTD/Schema would be much nicer ;-).
Best regards
Daniel Kasmeroglu
I just checked with an
I just checked with an eclipse 3.4. The configuration tab with start levels etc. is new in eclipse 3.5. The Help gives some new spare information on it.
Best regards,
Georg.