eclipse-lemminx / lemminx-maven

lemminx-maven
Eclipse Public License 2.0
38 stars 31 forks source link

.lemminx-maven directory is created in a strange place #514

Open Madjosz opened 1 year ago

Madjosz commented 1 year ago

Since I updated to Eclipse 2023-09 together with M2E - POM Editor using LemMinX language server 2.0.5.20230815-1219 a .lemminx-maven directory appeared in an unwanted place. I would assume that this directory would be created in %USERPROFILE% like other tools (.m2, .p2, .ssh and even .lemminx) or maybe %APPDATA% but for some reason it is created

(which are the same in my setting). Since this is a directory I want to keep clean I don't want any autogenerated directories there.

System information M2E - POM Editor using LemMinX language server (includes Incubating components) 2.0.5.20230815-1219 org.eclipse.m2e.lemminx.feature.feature.group Eclipse.org - m2e

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

openjdk version "17.0.8.1" 2023-08-24 OpenJDK Runtime Environment Temurin-17.0.8.1+1 (build 17.0.8.1+1) OpenJDK 64-Bit Server VM Temurin-17.0.8.1+1 (build 17.0.8.1+1, mixed mode, sharing)

Windows 10 Pro 22H2 build 19045.3448

angelozerr commented 1 year ago

At first see https://github.com/eclipse/lemminx-maven/pull/497 for more explanation why we need .lemminx-maven.

Any contribution are welcome to generate this folder in an another location.

Madjosz commented 1 year ago

Ok but why when you cannot take ${userName}/.m2/.lemminx-maven (which seems like a strange choice since no directory in .m2 starts with a dot in my case) why not just take ${userName}/.lemminx-maven as a default? Instead you do https://github.com/eclipse/lemminx-maven/blob/7cee5180f7fe85049e4087861443302893af9323/lemminx-maven/src/main/java/org/eclipse/lemminx/extensions/maven/utils/LocalRepositoryUtils.java#L95

angelozerr commented 1 year ago

Ok but why when you cannot take ${userName}/.m2/.lemminx-maven (which seems like a strange choice since no directory in .m2 starts with a dot in my case) why not just take ${userName}/.lemminx-maven as a default? Instead you do

I agree with you, it is better to use ${userName}/.lemminx-maven