-
Notifications
You must be signed in to change notification settings - Fork 193
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
pom dependencies in maven target locations doesn't work for transitive dependencies (includeDependencyScope) #684
Comments
This is not a problem of transitive deps not working but most probably of missing requirements of your test. You should add the bytebuddy as an requirement to your test (import package or require bundle) so tycho could include it in the test-runtime. |
In the current working state, I am using a pom dependency (with pomDependencies=consider) on mockito-core only, and it is correctly working in Tycho. Why would moving the Maven dependency from the pom to the target platform require a change in my tests? In addition, from an OSGi point of view, my tests have no dependency on bytebuddy, so it sounds wrong to me to add one "just" to help Tycho to resolve properly the dependency chain. |
All these are good questions but hard to answer without an example project showing the problem. |
Also please keep in mind that |
In fact there is exactly an IT for that already: https://github.com/eclipse/tycho/blob/master/tycho-its/projects/target.maven-scopes/test.target As you suggested, the IT works because the test bundle explicitly declare a dependency on objenesis and bytebuddy. I checked again, and contrary to what I said earlier, this is not working in PDE without an explicit dependency on objenesis and bytebuddy. What was working before (and I don't really understand why it makes a difference) is having a directory type location in my target platform. Possibly in this case PDE will eagerly put the bundle in the runtime? So I think we can close this ticket, sorry for the noise. |
No problem, please let us know if you find out what might mkaes the difference so we could potentially improve tycho here! |
Is there a way to automatically generate Require-Bundle based on pom.xml dependencies? I want adding the following dependency: <dependency>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-core</artifactId>
<version>1.36.0</version>
</dependency> In practice, it has many dependencies, some of which are bundles, and some are not:
I tried adding Is there a way to use something like |
Not really
The best it to use a maven target location instead of a pom dependency
Not really why should it be required? If you want to build an update-site simply choose to include all dependencies: By the way https://github.com/eclipse-tycho/tycho/discussions is more suitable to ask questions. |
I indeed missed the discussions. I've moved the question to #3033
I guess I will need an update-site, however, my primary goal is to build a plugin. Does creating update-site help building the plugin? |
Hi,
I'm trying to replace my pom first dependencies by Maven dependencies in my target file. I am using Tycho 2.6.0.
It works fine for simple dependencies that don't have any transitive one.
But if I try to use something like:
then in Eclipse it works fine (transitive dependencies are correctly resolved):
and running tests from Eclipse works.
But from Tycho command line, I get:
The text was updated successfully, but these errors were encountered: