Bug 253045 - Cannot have IAM & AJDT installed at the same time.
Summary: Cannot have IAM & AJDT installed at the same time.
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: IAM (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-31 23:55 EDT by Joakim Erdfelt CLA
Modified: 2012-01-05 13:10 EST (History)
3 users (show)

See Also:


Attachments
commons-lang-aspectj-compatibility.patch (10.58 KB, patch)
2008-11-18 15:13 EST, Joakim Erdfelt CLA
no flags Details | Diff
enable-all-update-site-dev.patch (11.54 KB, patch)
2008-11-18 15:26 EST, Joakim Erdfelt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Erdfelt CLA 2008-10-31 23:55:41 EDT
Build ID: M20080911-1700

Steps To Reproduce:
1. Install IAM
2. Install AJDT from http://download.eclipse.org/tools/ajdt/34/update
3. Receive an error that both plugins (q4e and ajdt) cannot be installed due to a requirement conflict on the aspectj dependency / plugin.


More information:
Can the AspectJ requirement present in the Maven Embedder either be version adjusted or included / embedded within the maven embedder itself (use of internal /lib/ dir?)
Comment 1 Carlos Sanchez CLA 2008-11-03 00:17:54 EST
the aspectj requirement could be more flexible, up to 2.0.0, but isn't OSGi supposed to allow multiple versions installed at the same time and pick the right one?
Comment 2 Abel Muiño CLA 2008-11-03 09:30:08 EST
As far as I can tell, this is a problem with P2 automatic dependency resolution and the metadata information on out update site (automatically generated, I think it uses the lowest version specified and the highest _INSTALLED_ for the valid ranges). Also, I don't know why it does not support installing two versions of a bundle...

We need to ask on the P2 forum for some support here.
Comment 3 Joakim Erdfelt CLA 2008-11-18 15:13:23 EST
Created attachment 118187 [details]
commons-lang-aspectj-compatibility.patch

Compatibility patch for maven-embedder.
Comment 4 Joakim Erdfelt CLA 2008-11-18 15:18:22 EST
The hardcoded / precise / perfect version specified in the feature causes the problem.

The plugin already had a range of approved versions specified. 

Adjusting the site building to auto-synchronize the feature versions helps tremendously.

How this works ...  Go into Feature Editor / Plug-ins Tab / Versions Button ... is set to "Synchronize Versions on Build" (aka. "0.0.0")

This makes the feature flexible enough to build the site.  
(If you look in the built feature, you'll see that the version is specified in the feature.jar!/feature.xml)

The update-site flexible enough to load the feature.  And the plugin definition is now in charge of the dependency version range.
This works to resolve the org.aspectj.runtime conflict as well as the org.apache.commons.lang conflict.

I have another patch for the other features coming ...
Comment 5 Joakim Erdfelt CLA 2008-11-18 15:26:54 EST
Created attachment 118189 [details]
enable-all-update-site-dev.patch

Enables all of the features in the updatesite-dev

* Fixes some feature naming issues.
* Resolves the commons-lang compatibility issue.
* Resolves the aspectj.runtime compatibility issue.
* Adds all of the IAM features to the site.xml
* Uses corrected maven-embedder (from previous patch) - version 2.1.0.659801c.
Comment 6 Abel Muiño CLA 2008-11-19 16:07:45 EST
Setting the versions to synchronize on build will solve the problem with your specific environment (since it will use the versions you have installed), but is not a reliable solution (aspectj can release a new version and you'll have a conflict with the version used in the compiled IAM).

The proper way of dealing with build problems is use a target platform (that will be the "standard way" in 3.5) and how to develop against it. The need for documentation is covered by bug 255899.

Regarding the maven embedder, I think latest bundle version is 3.0.x (hosted at q4e), so any changes should go against that version.
Comment 7 Carlos Sanchez CLA 2008-11-25 13:47:59 EST
I have been bitten by this issue too, so I'm trying to figure out how to solve ;)

My case, install clean Ganymede, Q4E, then other features don't install (tried with subclipse and testng plugin)

Error
Mon Nov 24 15:13:30 PST 2008
Cannot find a solution satisfying the following requirements Match[requiredCapability: org.eclipse.equinox.p2.iu/org.apache.commons.lang/[2.1.0.v200803061811,org.apache.commons.lang]].


I get it even trying to install TestNG plugin, that has no dependencies, so my guess is that the installation of Q4E leaves the installation in a bad state.
I DO have the bundle org.apache.commons.lang_2.1.0.v200803061811.jar
Tried starting eclipse with -clean and didnt help

Joakim, I think your solution works for you because you are rebuilding the update site with your installed versions, but doesn't mean it will work with other people installations, they'd have to rebuild their update site.

Abel, what's the purpose/benefit of having the p2 metadata in the update site? AFAIK p2 recognizes the old update sites
Comment 8 Abel Muiño CLA 2008-11-26 03:46:32 EST
If I'm not mistaken, it provides some enhancements over a plain update site:
  - The update site has a name (P2 does not allow to manually enter one, so old update sites are listed with their URLs, which is not very user friendly)
  - Metadata is available outside of the features, which should P2 work faster (no need to download the various features and scan them to get the metadata).
  - It adds some consistency (if P2 is used for Ganymede onwards, having the metadata allows us to align with the current direction).
Comment 9 Abel Muiño CLA 2008-11-30 06:54:20 EST
I've updated features to synchronize on build, under the assumption that the target platform has been correctly set by the developers (i.e. the development workbench bundles are NOT to be used):
http://wiki.eclipse.org/IAM_Target_Platform

(In reply to comment #4)
> Adjusting the site building to auto-synchronize the feature versions helps
> tremendously.
> 
> How this works ...  Go into Feature Editor / Plug-ins Tab / Versions Button ...
> is set to "Synchronize Versions on Build" (aka. "0.0.0")