I instaled today the plugin, with lazy. This is my config:
{
'eatgrass/maven.nvim',
cmd = { 'Maven', 'MavenExec' },
dependencies = 'nvim-lua/plenary.nvim',
config = function()
require('maven').setup({
executable = 'mvn', -- `mvn` should be in your `PATH`, or the path to the maven exectable
-- TODO: since I just use Java in my job, and all the projects has literally the same structure,
-- I could use for a while the assumption that the mvn project root (root pom.xml) is under /code
-- but it could be nicer if I can dynamically load this option from a configuration file
cwd = vim.fn.getcwd() .. '\\code', -- work directory, default to `vim.fn.getcwd()`
settings = nil, -- specify the settings file or use the default settings
commands = { -- add custom goals to the command list
{ cmd = { 'clean', 'compile' }, desc = 'clean then compile' },
{ cmd = { 'clean', 'install' }, desc = 'clean then install' },
{ cmd = { 'clean', 'package' }, desc = 'clean then package' },
},
})
end
},
And after the error, when I try to close the opened buffer by the plugin:
Error detected while processing BufLeave Autocommands for "maven": Error executing lua callback: ...pData/Local/nvim-data/lazy/maven.nvim/lua/maven/view.lua:91: bad argument #1 to 'kill' (number expected, got string) stack traceback: [C]: in function 'kill' ...pData/Local/nvim-data/lazy/maven.nvim/lua/maven/view.lua:91: in function <...pData/Local/nvim-data/lazy/maven.nvim/lua/maven/view.lua:89>
I use mostly Java only on my company, in a Windows 11 machine, and they are all JavaMaven based projects (almost them multimodule projects).
Java and Maven are correctly on path.
Java version is 17 (17.0.8) and Maven is in the 3.9.5 version.
I also tried to change the path to some directory that doesn't contains any pom.xml, and I received a nice Vim notification telling me
that such directory doesn't contains any pom.xml.
But when I point to the directory where's the main pom.xml of the project lives, the first error that I paste is the one that's triggered, but as a runtime error (not a notification).
I am missing something in my configuration?
Thanks.
PD: Maybe this part is where I am failing?
command = "mvn"
enable_handlers = true
interactive = true
pid = "ENOENT: no such file or directory"
Hello!
I instaled today the plugin, with lazy. This is my config:
I am facing the following error:
And after the error, when I try to close the opened buffer by the plugin:
I use mostly
Java
only on my company, in a Windows 11 machine, and they are allJava
Maven based projects (almost them multimodule projects).Java and Maven are correctly on path.
Java version is 17 (17.0.8) and Maven is in the 3.9.5 version.
I also tried to change the path to some directory that doesn't contains any
pom.xml
, and I received a niceVim
notification telling me that such directory doesn't contains any pom.xml.But when I point to the directory where's the main
pom.xml
of the project lives, the first error that I paste is the one that's triggered, but as a runtime error (not a notification).I am missing something in my configuration?
Thanks.
PD: Maybe this part is where I am failing?