maven.vim 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. " Vim compiler file
  2. " Compiler: Maven
  3. " Maintainer: D. Ben Knoble <ben.knoble+vim@gmail.com>
  4. " Maintainer: Konfekt
  5. " Original Source: https://github.com/JalaiAmitahl/maven-compiler.vim/blob/master/compiler/mvn.vim
  6. " (Copyright Dan Taylor, distributed under the same terms as LICENSE)
  7. " Original Source: https://github.com/mikelue/vim-maven-plugin/blob/master/compiler/maven.vim
  8. " (distributed under same terms as LICENSE per
  9. " https://github.com/mikelue/vim-maven-plugin/issues/13)
  10. " Last Change: 2024 Nov 12
  11. if exists("current_compiler")
  12. finish
  13. endif
  14. let current_compiler = "maven"
  15. execute $'CompilerSet makeprg=mvn\ --batch-mode\ {escape(get(b:, 'maven_makeprg_params', get(g:, 'maven_makeprg_params', '')), ' \|"')}'
  16. " Error message for POM
  17. CompilerSet errorformat=[FATAL]\ Non-parseable\ POM\ %f:\ %m%\\s%\\+@%.%#line\ %l\\,\ column\ %c%.%#,
  18. CompilerSet errorformat+=[%tRROR]\ Malformed\ POM\ %f:\ %m%\\s%\\+@%.%#line\ %l\\,\ column\ %c%.%#
  19. " Java related build messages
  20. CompilerSet errorformat+=[%tARNING]\ %f:[%l\\,%c]\ %m
  21. CompilerSet errorformat+=[%tRROR]\ %f:[%l\\,%c]\ %m
  22. CompilerSet errorformat+=%A[%t%[A-Z]%#]\ %f:[%l\\,%c]\ %m,%Z
  23. CompilerSet errorformat+=%A%f:[%l\\,%c]\ %m,%Z
  24. " jUnit related build messages
  25. CompilerSet errorformat+=%+E\ \ %#test%m,%Z
  26. CompilerSet errorformat+=%+E[ERROR]\ Please\ refer\ to\ %f\ for\ the\ individual\ test\ results.
  27. " Message from JUnit 5(5.3.X), TestNG(6.14.X), JMockit(1.43), and AssertJ(3.11.X)
  28. CompilerSet errorformat+=%+E%>[ERROR]\ %.%\\+Time\ elapsed:%.%\\+<<<\ FAILURE!,
  29. CompilerSet errorformat+=%+E%>[ERROR]\ %.%\\+Time\ elapsed:%.%\\+<<<\ ERROR!,
  30. CompilerSet errorformat+=%+Z%\\s%#at\ %f(%\\f%\\+:%l),
  31. CompilerSet errorformat+=%+C%.%#
  32. " Misc message removal
  33. CompilerSet errorformat+=%-G[INFO]\ %.%#,
  34. CompilerSet errorformat+=%-G[debug]\ %.%#