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

Editor won't display info or allow for navigation in dependencyManagement #840

Closed
CarlosMOGoncalves opened this issue Jul 5, 2022 · 9 comments

Comments

@CarlosMOGoncalves
Copy link

Description

When hovering over a dependency which has its version written as replacement variable which in turn has its value in the <properties> element of a pom and that dependency is inside the <dependencyManagement> element, the editor won't display any information regarding it.

Further, it won't allow navigation to the given POM using Ctrl+Click.

This won't happen if the dependency is inside the <dependencies> element, in which case it will display the info tooltip about it and Ctrl+Click will navigate to the matching pom.

Expected Outcome

On one such dependency the editor should be able to display the info tooltip about it and allow for the navigation to it, with Ctrl+Click.
This is very useful when one is trying to check dependencies versions or properties in an imported BOM.

Current Outcome

Hovering won't show info tooltip and Ctrl+Click on it won't navigate to matching pom.
This happens when the dependency is within a <dependencyManagement> element.

Steps to reproduce

I have a sample project that I use for other issues here.
This is a rather simple app with some dependencies. It has 3 branches, one for each LTS of JDK.

  1. Download Eclipse IDE 2022-06 for Enterprise Java and Web Developers Windows x64 here
  2. checkout above project
  3. import it to eclipse
  4. navigate to pom.xml
  5. hover over any dependency inside the dependencies management element , like fish.payara.api
  6. now Ctrl+Click on it
  7. It won't navigate to the matching pom
  8. now hardcode the version, for example 5.2022.2, and try again
  9. should now be possible to see info and navigate
  10. compare with any dependency on the <dependencies> element

Environment

  • Eclipse Version: Eclipse IDE for Enterprise Java and Web Developers 2022-06
  • Plugins: Payara Tools and SonarLint
  • M2E Version: 1.20.1.20220227 (the one that comes bundled)
  • Maven Version: 3.8.5
  • JDK Version: OpenJDK Corretto 1.8.0_322
  • Operating System: Windows 10
@mickaelistria
Copy link
Contributor

Can you please provide an example of such a pom file?

@CarlosMOGoncalves
Copy link
Author

Hello @mickaelistria ,

I have left a sample project from my Github.
It contains the needed pom.xml for those reproducing instructions.

@mickaelistria
Copy link
Contributor

I think this is already fixed in snapshots and I cannot reproduce it. Can you please try installing latest m2e from https://download.eclipse.org/technology/m2e/snapshots/latest/ and report whether this fixes your issue?

@CarlosMOGoncalves
Copy link
Author

You are right @mickaelistria ,
I installed the snapshot for POM Editor using LemMinX and it is indeed working perfectly.
Many thanks Mickael, this can be closed.

However, risking stretching your help a bit further let me just ask you one thing:
I didn't install the complete bundle of modules within the update site you sent because somehow Eclipse would unistall Payara Tools and some other components in order to upgrade M2E.
Do you have an idea why?
And whether this will happen when the new version is released? Because I need at least those Payara Tools in the IDE.

image

@HannesWell
Copy link
Contributor

If you select the option at the bottom "Show original error and build my own solution" it shows a detailed description of probably conflicting dependencies from which your question can hopefully be answered.

But my first guess is, that thos Features have plug-ins that require m2e below 2.0

@CarlosMOGoncalves
Copy link
Author

Hi @HannesWell
and thanks for the answer.

I think you would be right, this is what I see then

image

From what I get Maven JPA configurator needs org.eclipse.m2e.core below 2.0.0.
However, I see no mention to those first components JAX-RS, JSF and to Payara Tools.
Are those details not complete? Or am I reading it wrong?

@HannesWell
Copy link
Contributor

From what I get Maven JPA configurator needs org.eclipse.m2e.core below 2.0.0. However, I see no mention to those first components JAX-RS, JSF and to Payara Tools. Are those details not complete? Or am I reading it wrong?

Yes you are reading it right and it looks like the details are incomplete.
But my strong guess is that the ones not mentioned depend on the JPA configurator. But you can check the 'manually'.

@mickaelistria
Copy link
Contributor

@CarlosMOGoncalves
Copy link
Author

Hello Hannes and Mickael,
Thank you for your feedback, It was enlightening.
I have been using Eclipse for some years now, but so many parts of it are still elusive to me. The plugin system is one of them.

Thanks Mickael, but I didn't get to intall the full M2E snapshot, only the newer POM Editor using LemMinX, which did not have any conflicts with other plugins.

I was merely asking out of curiosity but above all as an early "heads up" because mine is a fresh install of Eclipse IDE for Enterprise Java and Web Developers 2022-06, so if the snapshot has these incompatibilities with these plugins it will most definitely have incompatibilities when it's final version is released.

Thanks for both of your time, you can close this issue now.

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

3 participants