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

Ctrl+click no longer opens the pom on maven dependencies #531

Open
cnoel35 opened this issue Nov 22, 2023 · 10 comments
Open

Ctrl+click no longer opens the pom on maven dependencies #531

cnoel35 opened this issue Nov 22, 2023 · 10 comments

Comments

@cnoel35
Copy link

cnoel35 commented Nov 22, 2023

On Eclipse 2023-09, a Ctrl+Click on a pom dependency no longer opens the dependency pom but a file without extension present in the .m2.lemminx-maven\ folder.
On the same project with eclipse 2022-06 (without this lemminx folder) it works perfectly and opens the corresponding pom.


284222962-d110b999-257e-4ce9-91bb-d254ff83a297


System information
M2E - POM Editor using LemMinX language server (includes Incubating components)
2.0.5.20230815-1219

Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)
Version: 2023-09 (4.29.0)
Build id: 20230907-1323

Eclipse Adoptium
jdk-17.0.6.10-hotspot

Windows 10 Version 22H2
build 19045.3570

@eliasbalasis
Copy link

I am running the same components, but Ctrl-Click on dependencies in the POM editor opens the correct file and even though the .m2/lemminx-maven folder is present.

I have been a witness to historical behaviors having changed in Lemminx-Maven but most of them (if not all) seem to have now been fixed.

@cnoel35
Copy link
Author

cnoel35 commented Nov 29, 2023

Thanks for your reply, I provide additional clarification : I do not use the maven embedded with Eclipse 2023-09 because of an issue with Maven 3.9.X : actions/runner-images#7216. In fact with embedded Maven I have this error during mvn install : A required class was missing while executing com.samaxes.maven:minify-maven-plugin:1.7.6:minify: org/codehaus/plexus/util/DirectoryScanner so I use external maven, I have tried several maven versions and I always have the original issue with the lemminx folder.

image

@eliasbalasis
Copy link

I have been a witness to various build issues using Maven 3.9.x

Therefore, I am using Maven 3.8.x like you and Eclipse 2023-09 with updates but no problems like yours I am afraid.

Perhaps a small reproduction project would help.

Either way, I don't think the tools are ready for Maven 3.9.x yet.

@cnoel35
Copy link
Author

cnoel35 commented Nov 29, 2023

Ok thanks a lot, I will try to provide a minimal project to reproduce the issue when I will have more time.

@vrubezhny
Copy link
Contributor

Just a note here.
Pay attention on that we have actually two Local Maven repositories cached:

  • the Mainl maven repo [read-only] ~/.m2/repostory (or whatever path specified in -Dmaven.repo.local=<path-to-maven-repo>)
  • Temporary Maven build local repository (~/.m2/.lemminx-maven) - used to store the result on maven buld

So, until you execute mvn verify on your project, the features like content assist/hovers/hiperlinking will still work, but as they need to execute maven build on your pom.xml - the results will be collected to the temporary repository.
So if you open any dependency it is to be opened from that temp. repo.

After running mvn verify or building with m2e-core - the required dependencies will be installed to the main maven repository repo and then, if you Ctrl-click on the same dependency it is to be opened from the Main maven repo.

So path prefixes used to access the dependencies might change during the work between ~/.m2/repository/... and ~/.m2/.lemminx-maven/....

If a dependency cannot be opened by Ctrl-clicking on it - in most cases [I hope] it means that the dependency cannot be installed from a remote repository (so mvn verify will highly likely fail for such a project as well).

@cnoel35
Copy link
Author

cnoel35 commented Dec 7, 2023

Thanks for the explanations @vrubezhny , but in my case, the mvn install (so verify too) works well and dependencies are installed in the main maven repo (I have the pom itextpdf-5.5.13.3.pom into \.m2\repository\com\itextpdf\itextpdf\5.5.13.3 folder) but with "Ctrl+click" on the dependency in the pom, it opens the file without extension itextpdf-5.5.13.3 into \.m2\.lemminx-maven\com\itextpdf\itextpdf\5.5.13.3.
And same things happens with other dependencies (not all)

@cnoel35
Copy link
Author

cnoel35 commented Dec 7, 2023

And same issue with last version of Eclipse (2023-12) on a clean workspace and a new maven repository.

@angelozerr
Copy link
Contributor

angelozerr commented Dec 7, 2023

As.lemminx-maven is just a temporary folder, IMHO I think it should be ignored for definition.

@cnoel35
Copy link
Author

cnoel35 commented Dec 7, 2023

Maybe it should but it's not and that's the problem :)

@cnoel35
Copy link
Author

cnoel35 commented Dec 8, 2023

I finally also tried with Eclipse 2022-09 and I have the same problem, except that this time there is no lemminx folder. Eclipse opens the itextpdf-5.5.13.3 file (without extension) into \.m2\tech\repository\com\itextpdf\itextpdf\5.5.13.3 even though the right file (with pom extension) itextpdf-5.5.13.3.pom exists in the same folder. Here the original issue I had opened into eclipse-m2e : eclipse-m2e/m2e-core#1607

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

4 participants