-
Notifications
You must be signed in to change notification settings - Fork 400
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
java.configuration.maven.globalSettings
doesn't seem to work
#3303
Comments
Do you have a link to the client you are using ? Is it neovim with https://github.com/mfussenegger/nvim-jdtls or some other ? Are you sure your settings are being picked up from Lines 314 to 322 in e738410
I tried it out myself (in vscode-java), and it is working for me so maybe this is just some kind of configuration issue. I'd need to know more about the client though to see how they interact with the language server. |
Yes, I'm using
I think you may be right here, I forgot that I had a shell alias too: So it's most likely it's picking up my user settings from the alias and not from
These are the full -- ...
settings = {
java = {
configuration = {
runtimes = {
{ name = 'JavaSE-11', path = '/usr/lib/jvm/java-11-openjdk/' },
{ name = 'JavaSE-17', path = '/usr/lib/jvm/java-17-openjdk/' },
{ name = 'JavaSE-21', path = '/usr/lib/jvm/java-21-openjdk/' },
},
maven = {
userSettings = home_dir .. '/.config/maven/settings.xml',
globalSettings = '/etc/maven/settings.xml',
},
},
},
},
-- ... As you can see it's Let me know if you need my full config, I'm not pasting it here since it can be quite long. |
Also, like I mentioned in my first comment, it's weird that my global settings from |
Well, I found something weirder. It seems the If I open a project that's already compiled, then the Excuse my terminology, I don't actually know if JDTLS actually complies the whole project or not. I'm also not a Java developer. |
It seems the actual For example, when opening a specific project the first time, the Maybe I could try testing this on a more "sane" Java repository, like an open-source project. |
@itaranto could you show your |
Yes, but it has nothing interesting. It's just the default plus the I renamed |
I have tried it in VS Code. It works fine. |
I'm sorry if I didn't clarified this before, but my Maven config works perfectly fine when running it from the CLI ( |
Could you run
|
Again, I didn't open this issue because of Maven not reading my settings, |
Could you try to reproduce the issue in VS Code? |
I have the following config inside
/etc/maven/settings.xml
(the global settings)But
jdtls
insists on creating~/.m2/repository/
.I tried overriding Maven's
globalSettings
but they don't seem to work either. This are myjava
settings (Neovim):I know the are correct because
userSettings
are actually being picked up (I have some other config there so I can confirm that).I also tried setting
localRepository
inside~/.config/maven/settings.xml
and that works just fine (no~/.m2/
directory being created).The text was updated successfully, but these errors were encountered: