Skip to content
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

Runtime dependencies not resolved from target file #447

Closed
akurtakov opened this issue Dec 18, 2021 · 7 comments
Closed

Runtime dependencies not resolved from target file #447

akurtakov opened this issue Dec 18, 2021 · 7 comments
Milestone

Comments

@akurtakov
Copy link
Member

Using https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/tree/eclipse.platform.releng.prereqs.sdk/eclipse-sdk-prereqs.target - objenesis is removed and and includeDependencyScope="runtime" fails resolution with:
Cannot resolve project dependencies:
[ERROR] Software being installed: org.eclipse.ui.tests 3.15.500.qualifier
[ERROR] Missing requirement: org.mockito.mockito-core 4.1.0 requires 'java.package; org.objenesis [3.1.0,4.0.0)' but it could not be found
[ERROR] Cannot satisfy dependency: org.eclipse.ui.tests 3.15.500.qualifier depends on: osgi.bundle; org.mockito.mockito-core 2.13.0

@laeubi objenesis is supposed to be resolved as it's transitive runtime dependency of mockito as per https://repo1.maven.org/maven2/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.pom, right?

@akurtakov
Copy link
Member Author

For the record same failures with includeDependencyScope="compile" if objenesis is not explicitly added.

@laeubi
Copy link
Member

laeubi commented Dec 18, 2021

objenesis is supposed to be resolved as it's transitive runtime dependency of mockito

At least that's what I would expect as per the dependency tree:

grafik

According to https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

runtime
This scope indicates that the dependency is not required for compilation, but is for execution. Maven includes a dependency with this scope in the runtime and test classpaths, but not the compile classpath.

@laeubi
Copy link
Member

laeubi commented Dec 18, 2021

Sorry for confusion, m2e-pde with current snapshot version also filter this out:

grafik

@laeubi
Copy link
Member

laeubi commented Dec 18, 2021

Okay, It seems for the current implementation it is required to choose test dependency scope.

As per definition:
This scope indicates that the dependency is not required for compilation, but is for execution. Maven includes a dependency with this scope in the runtime and test classpaths, but not the compile classpath.

@laeubi
Copy link
Member

laeubi commented Jan 9, 2022

@laeubi laeubi added this to the 2.7 milestone Feb 1, 2022
@laeubi
Copy link
Member

laeubi commented Feb 1, 2022

@mickaelistria I think this is something to consider for 2.7 as well and for the m2e release also.

@laeubi
Copy link
Member

laeubi commented Feb 5, 2022

m2e change is done, will prepare now for tycho as well. The new syntax then would be includeDependencyScopes="compile,runtime" to include both.

laeubi added a commit to laeubi/tycho that referenced this issue Feb 5, 2022
… file

Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
@laeubi laeubi closed this as completed in 700f01e Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants