Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

m2e not resolving project dependency jars #620

Closed
rotty3000 opened this issue Mar 23, 2022 · 4 comments
Closed

m2e not resolving project dependency jars #620

rotty3000 opened this issue Mar 23, 2022 · 4 comments

Comments

@rotty3000
Copy link

It seems that in m2e when a plugin with a lifecycleMappingMetadata is executed, intended for the package phase, the dependency resolver does not resolve project dependencies as built jars, but rather as their outputdirectory.

However, everything works from the maven command line as expected, including when I build the project separated from the reactor build (say using the -pl flag). In that case all project dependencies that can be resolved to jars from the local cache are used if present before any outputdirectory is used. m2e does not do this and seems to default to the outputdirectory which feels like a discrepancy. This has been manifesting in recent releases. I'm wondering if a recent change may have caused this change in behaviour? I'm currently running with the latest: M2E - Maven Integration for Eclipse (includes Incubating components) 1.20.1.20220227-1319 org.eclipse.m2e.feature.feature.group Eclipse.org - m2e

@laeubi
Copy link
Member

laeubi commented May 17, 2022

Can you provide a small example to reproduce this? Currently m2e "builds" each project separately and if you enable workspace resolving map dependencies to workspace projects so maybe that is causing what you see with the output directory?

@rotty3000
Copy link
Author

rotty3000 commented May 17, 2022

and if you enable workspace resolving map dependencies to workspace projects

this I can check. Where is this option? I did not find anything that resembled this description in the m2e settings.

@rotty3000
Copy link
Author

oh, I think it is this... for each project:
Screenshot from 2022-05-17 14-10-27

Is there a global way to disable that?

@laeubi
Copy link
Member

laeubi commented May 18, 2022

You can right click on the Project and choose Maven > Enable Workspace resolution, not sure if this works for multiple projects. There was already a request for a workspace settings here

but it got not much attention yet.

@eclipse-m2e eclipse-m2e locked and limited conversation to collaborators May 18, 2022
@laeubi laeubi converted this issue into discussion #717 May 18, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants