Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[iam-dev] AJDT / Commons Lang - compatibility issue corrected in patch.

I've been working on getting a resolution to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=253045 and have had some
progress.

Here's what I've discovered.  (all through reading code, testing,
experimenting, reading forum discussions)

You can't have 2 plugins with the same id and different versions
installed at the same time.  p2 doesn't support it.

I setup 2 plugins (different ids/versions) with 2 features on 2
different update sites.
Each plugin used a different (perfect) version of commons-lang (i
chose commons lang, because it is similar in issue to AJDT issue, but
only has 1 dep to worry about)

When I added the update sites (both of them) and chose both plugins to
install, the p2 provisioning would deny that combo.
The existence (or not) of p2 metadata did not change the outcome.
Checking the p2 metadata (content.xml) you can see that a perfect
version is specified.

When I tried to install the same 2 plugins using Eclipse Europa, I get
a similar error from the classic update manager.  Can't do it.

I also tried using the org.eclipse.equinox.p2.director.app.application
to install an arbitrary IU on the command line. (which works
wonderfully for q4e and iam itself, btw).
This resulted in the second IU install failing due to a dependency
conflict with the first IU. :-(

Up until this point I've been working under the assumption that OSGI /
Eclipse could support this.
However, I think we have mis-interpreted what OSGi  / Eclipse can do.

I can have 1+ versions of the commons-lang classes present on the
system, and in the JVM, completely managed by OSGi, however, If I try
to do that with a plugin that has the same symbolic name (id) and
different versions, this doesn't work.

So I tried a different approach above, and made the first test plugin
use a commons-lang with a different symbolic name
(org.eclipse.iam.test.commons-lang) and then I could have both
versions of commons-lang live at the same time.

I'm starting to believe that this is what OSGi is intended to do.

- Joakim Erdfelt


Back to the top