Bug 376925 - Cannot resolve project dependencies error when including feature patch and patched feature in another feature
Summary: Cannot resolve project dependencies error when including feature patch and pa...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-16 23:00 EDT by Steffen Pingel CLA
Modified: 2021-04-28 16:55 EDT (History)
8 users (show)

See Also:


Attachments
demo project (5.38 KB, application/octet-stream)
2012-04-16 23:03 EDT, Steffen Pingel CLA
no flags Details
updated demo project (8.20 KB, application/octet-stream)
2012-06-04 05:30 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2012-04-16 23:00:57 EDT
Scenario:
Feature A (feature)
Feature Patch for A (feature.patch)
Feature B (feature.combine) that requires feature and feature.patch

Error:

$ mvn package
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: feature.combine.feature.group 1.0.0
[ERROR]   Only one of the following can be installed at once: [org.eclipse.osgi 3.5.2.R35x_v20100126, org.eclipse.osgi 3.4.3.R34x_v20081215-1030]
[ERROR]   Cannot satisfy dependency: feature.combine.feature.group 1.0.0 depends on: feature.feature.group 0.0.0
[ERROR]   Cannot satisfy dependency: feature.combine.feature.group 1.0.0 depends on: feature.patch.feature.group 0.0.0
[ERROR]   Cannot satisfy dependency: feature.feature.group 1.0.0 depends on: org.eclipse.osgi [3.4.3.R34x_v20081215-1030]
[ERROR]   Cannot satisfy dependency: feature.patch.feature.group 1.0.0 depends on: org.eclipse.osgi [3.5.2.R35x_v20100126]
[ERROR]

I have attached a sample project that demonstrates the problem based on tycho-its/featurePatch.build.
Comment 1 Steffen Pingel CLA 2012-04-16 23:03:09 EDT
Created attachment 214076 [details]
demo project
Comment 2 Steffen Pingel CLA 2012-05-02 18:43:33 EDT
Any thoughts where we should start looking in order to enable building features that include a feature along with a feature patch?
Comment 3 Tobias Oberlies CLA 2012-05-25 09:56:35 EDT
From the p2 error message, I would assume that it would not be possible to install the feature.combine if it was built. So what would you need the feature.combine for?
Comment 4 Steffen Pingel CLA 2012-06-04 04:59:18 EDT
We are building a similar project with PDE build and AFAIK the combined feature is installable. Unfortunately I'm unable to produce a repository with Tycho since a repository build is failing with a similar error even though this should result in a sensible repository:

[INFO] Resolving dependencies of MavenProject: 348326featurePatch:repository:1.0.0 @ /stuff/tmp/featurePatch.build/repository/pom.xml
[INFO] Cannot complete the request.  Generating details.
[INFO] Cannot complete the request.  Generating details.
[INFO] {osgi.ws=gtk, osgi.os=linux, osgi.arch=x86_64, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: repository 1.0.0
[ERROR]   Only one of the following can be installed at once: [org.eclipse.osgi 3.5.2.R35x_v20100126, org.eclipse.osgi 3.4.3.R34x_v20081215-1030]
[ERROR]   Cannot satisfy dependency: feature.feature.group 1.0.0 depends on: org.eclipse.osgi [3.4.3.R34x_v20081215-1030]
[ERROR]   Cannot satisfy dependency: feature.patch.feature.group 1.0.0 depends on: org.eclipse.osgi [3.5.2.R35x_v20100126]
[ERROR]   Cannot satisfy dependency: repository 1.0.0 depends on: feature.feature.group 0.0.0
[ERROR]   Cannot satisfy dependency: repository 1.0.0 depends on: feature.patch.feature.group 0.0.0

I didn't see any tests in the tycho repository that handle scenarios for distributing feature patches. Do you know to what extend feature patches are supported?
Comment 5 Steffen Pingel CLA 2012-06-04 05:18:16 EDT
Looking into this further I'm not able to build a repository with a category.xml as simple as this:

<site>
  <feature id="feature.patch"/>
</site>

The error is:

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: repository.patch 1.0.0
[ERROR]   Missing requirement: feature.patch.feature.group 1.0.0 requires 'feature.feature.group 0.0.0' but it could not be found
[ERROR]   Cannot satisfy dependency: repository.patch 1.0.0 depends on: feature.patch.feature.group 0.0.0



With a category.xml that includes both:

<site>
  <feature id="feature"/>
  <feature id="feature.patch"/>
</site>

The error is:

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: repository.both 1.0.0
[ERROR]   Only one of the following can be installed at once: [org.eclipse.osgi 3.5.2.R35x_v20100126, org.eclipse.osgi 3.4.3.R34x_v20081215-1030]
[ERROR]   Cannot satisfy dependency: feature.feature.group 1.0.0 depends on: org.eclipse.osgi [3.4.3.R34x_v20081215-1030]
[ERROR]   Cannot satisfy dependency: feature.patch.feature.group 1.0.0 depends on: org.eclipse.osgi [3.5.2.R35x_v20100126]
[ERROR]   Cannot satisfy dependency: repository.both 1.0.0 depends on: feature.feature.group 0.0.0
[ERROR]   Cannot satisfy dependency: repository.both 1.0.0 depends on: feature.patch.feature.group 0.0.0
Comment 6 Steffen Pingel CLA 2012-06-04 05:29:18 EDT
The only way I have been able to get at least one step further was by setting <deployableFeature>true</deployableFeature> which then actually creates a repository for the feature.patch feature. If I create an eclipse-repository project that consumes the deployed features as repositories I'm able to build a site that has feature and feature.patch.

pom.xml:

  <repositories>
    <repository>
      <id>feature</id>
      <url>file:../feature/target/site</url>
      <layout>p2</layout>
    </repository>
    <repository>
      <id>feature.patch</id>
      <url>file:../feature.patch/target/site</url>
      <layout>p2</layout>
    </repository>
  </repositories>

category.xml:

<site>
  <feature id="feature"/>
  <feature id="feature.patch"/>
</site>

It seems weird that it makes a difference whether dependencies come from p2 repositories or the reactor. The build repository is not complete though, it is missing the bundle included in feature:

$ find repository.mirror/target/repository
repository.mirror/target/repository
repository.mirror/target/repository/artifacts.jar
repository.mirror/target/repository/plugins
repository.mirror/target/repository/plugins/org.eclipse.osgi_3.5.2.R35x_v20100126.jar
repository.mirror/target/repository/features
repository.mirror/target/repository/features/feature_1.0.0.jar
repository.mirror/target/repository/features/feature.patch_1.0.0.jar
repository.mirror/target/repository/content.jar

The publisher does warn about that during the build:

[INFO] --- tycho-p2-repository-plugin:0.15.0:assemble-repository (default-assemble-repository) @ repository ---
[WARNING] Mirror tool: "Problems resolving provisioning plan.": ["Unable to satisfy dependency from feature.feature.group 1.0.0 to org.eclipse.osgi [3.4.3.R34x_v20081215-1030]."]
[WARNING] More information on the preceding warning(s) can be found here:
[WARNING] - http://wiki.eclipse.org/Tycho_Messages_Explained#Mirror_tool
Comment 7 Steffen Pingel CLA 2012-06-04 05:30:55 EDT
Created attachment 216756 [details]
updated demo project
Comment 8 Steffen Pingel CLA 2012-06-04 05:36:08 EDT
This is related to bug 378794 which describes the problem in comment 6 in more detail.
Comment 9 Mickael Istria CLA 2021-04-08 18:10:08 EDT
Eclipse Tycho is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/tycho/issues/ instead. If this issue is relevant to you, your action is required.
0. Verify this issue is still happening with latest Tycho 2.4.0-SNAPSHOT
  if issue has disappeared, please change status of this issue to "CLOSED WORKFORME" with some details about your testing environment and how you did verify the issue; and you're done
  if issue is still present when latest release:
* Create a new issue at https://github.com/eclipse/tycho/issues/
  ** Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience)
  ** In the GitHub description, start with a link to this bugzilla ticket
  ** Optionally add new content to the description if it can helps towards resolution
  ** Submit GitHub issue
* Update bugzilla ticket
  ** Add to "See also" property (up right column) the link to the newly created GitHub issue
  ** Add a comment "Migrated to <link-to-newly-created-GitHub-issue>"
  ** Set status as CLOSED MOVED
  ** Submit

All issues that remain open will be automatically closed next week or so. Then the Bugzilla component for Tycho will be archived and made read-only.