eatgrass / maven.nvim

for java developer, interactively execute maven command without leaving your editor
MIT License
27 stars 3 forks source link

Feat: be able to use -T and -U options #4

Open richardmarklund opened 6 days ago

richardmarklund commented 6 days ago

Hello!

I would like to add options to the maven commands so I can use more maven capabilities. I usually use -U and the -T to make it use multicore. This is an example of how it could look:


{
  'glaulher/maven.nvim',
  branch = 'newfeat',
  cmd = { 'Maven', 'MavenExec' },
  dependencies = 'nvim-lua/plenary.nvim',
  config = function()
    require('maven').setup {
      executable = 'mvn',
      commands = { -- add custom goals to the command list
        { cmd = { install ' }, desc = 'Install using all cores' , Options = "-T 1C "},
        { cmd = { 'install ' }, desc = 'Install using all cores update all', Options="-T 1C -U " },
      },
      maven_central_url = 'https://mvnrepository.com/repos/central',
    }
  end,
}

Is this possible as it is now and I have just not found the setting, or does this sound like a good new feature?

Thanks

eatgrass commented 5 days ago

the cmd paramter can accept a string list, so I think you can do something like this

{cmd={"install", "-T1C"}