-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unresolved requirement from indirect dependencies #2153
Comments
Can you provide your example as an integration-test to demonstrate the issue? |
Unfortunately, this is really hard to achieve as we have a very complex build environment but I think that I added all relevant facts to my description. |
If you are seeing the issue but find it to complex to reproduce, how should one be able to reproduce it without even seeing the issue? Tycho includes > 300 integration tests, none of them currently fails, beside that it builds two complex build setups of the eclipse-platform and some demo projects, all of them succeed.
There is no such thing I'm aware of, so maybe it is some configuration error, maybe you are using some deprecated or removed function and the error is just a consequence of this, that's impossible to tell without a runable example. |
After breaking down the problem into two very small projects I have some new findings: The problem came in between Tycho version 2.6.0 and version 2.7.0. The problem is, that, beginning from version 2.7.0, once we use a dependency that gets resolved via Maven coordinates, its own dependencies get again resolved only via Maven coordinates and not via P2 repositories. In our case, we deploy our own projects into a binary Maven repository and these projects do have dependencies to Eclipse and therefore these dependencies have to be resolved via P2. Unfortunately, I am still unable to provide an example because I don't have a binary Maven repository where I can give you access to. |
The pom.xml in the broke down example file that causes the problem looks like this: <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.some</groupId>
<artifactId>B</artifactId>
<version>1.0.0</version>
<packaging>eclipse-plugin</packaging>
<properties>
<tycho-version>2.7.0</tycho-version>
</properties>
<dependencies>
<dependency>
<groupId>com.some</groupId>
<artifactId>A</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<resolver>p2</resolver>
<pomDependencies>consider</pomDependencies>
<target>
<artifact>
<groupId>com.some</groupId>
<artifactId>eclipse-target</artifactId>
<version>2022.12.1</version>
</artifact>
</target>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-eclipserun-plugin</artifactId>
<version>${tycho-version}</version>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>artifactory</id>
<name>DevCloudArtifactory</name>
<url>https://artifactory...</url>
</repository>
</repositories>
</project> |
Would it be possible to get an update on this issue? |
I was wondering if a problem we have is related to this issue. However there is no activity since last year. Is there something to report? |
@CasperNLD can you provide an integration-test to demonstrate the issue? We only have fragmentary information here. Also make sure to always test against latest Tycho (what is 4.0.4 at the moment) if the problem persist there. |
As you have suggested, I've tried to get it working with 4.0.4. Unfortunately we use maven-plugins that don't work on maven 3.9. This is already a issue for our backlog for next quarter. If this problem persists after the update, I'll come back with logs. |
@CasperNLD, our problem is actually pretty simple. |
This is only partly true, please look here:
Please also consider this release note hint: |
Our issue is not having data in our local Maven repository as our Jenkins build job always starts with an empty local Maven repository. |
@jkoch70 I'm not sure what Tycho 2.6 behavior specifically means, Tycho always resolves dependencies from P2, if you specify them in the pom, they will (additionally) be resolved from there if not found at least in latest Tycho... so the best would be to provide an integration-test to demonstrate the issue, its hard to tell from some |
The bundle I am talking about does not have any dependencies in pom.xml but |
We have the following problem after switching form tycho 2.6.0 to tycho 3.0.3:
Assume we have a project com.some.A and this project has a dependency to org.eclipse.ui.
All Eclipse dependencies in this project are resolved via a target-platform-configuration with P2 repositories.
The Build of project A works fine.
We have an additional project com.some.B with a dependency to project A.
Project B contains the same target-platform-configuration as project A.
When we now want to build project B without having built project A before in the same local m2 repository, the build fails with:
[ERROR] Unresolved requirement: Require-Bundle: com.some.A
[ERROR] -> Bundle-SymbolicName: com.some.A; bundle-version="1.2.3"; singleton:="true"
[ERROR] com.some.A [53]
[ERROR] Unresolved requirement: Require-Bundle: org.eclipse.ui
Why is tycho not resolving this dependency again from the target-platform-configuration and fetching from P2 like it does with project A?
When we build project A before project B with the same local Maven m2 repository, there is no issue.
Project A and B are configured as eclipse-plugin.
We haven't had this problem with tycho 2.6.0.
The text was updated successfully, but these errors were encountered: