aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-11-13 20:28:20 +0100
committerChristian Clason <ch.clason+github@icloud.com>2024-11-14 09:35:11 +0100
commit40dee8a2dcba996badaa6182eb34fde1694f92a3 (patch)
tree14ba9c93e8f58fbd22c3ca13b710d6c0b9b3d581
parentc905f165072881128294e3a58f491e38bc4e70f8 (diff)
downloadrneovim-40dee8a2dcba996badaa6182eb34fde1694f92a3.tar.gz
rneovim-40dee8a2dcba996badaa6182eb34fde1694f92a3.tar.bz2
rneovim-40dee8a2dcba996badaa6182eb34fde1694f92a3.zip
vim-patch:c4208da: runtime(compiler): include a Java Maven compiler plugin
@Konfekt suggested adding this [1]; I confirmed that both source repositories have permissive licenses [2], [3] that permit copying the code (at least where the compiler scripts are concerned). [1]: https://github.com/benknoble/Dotfiles/commit/570b1006fd794b0b9f5434b4fed4c2d785fcb05c [2]: https://github.com/JalaiAmitahl/maven-compiler.vim [3]: https://github.com/mikelue/vim-maven-plugin/issues/13 closes: vim/vim#16041 https://github.com/vim/vim/commit/c4208da0f4e59925f5e5828ed7725e22fd118e47 Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
-rw-r--r--runtime/compiler/maven.vim40
1 files changed, 40 insertions, 0 deletions
diff --git a/runtime/compiler/maven.vim b/runtime/compiler/maven.vim
new file mode 100644
index 0000000000..ef8d8a6fb2
--- /dev/null
+++ b/runtime/compiler/maven.vim
@@ -0,0 +1,40 @@
+" Vim compiler file
+" Compiler: Maven
+" Maintainer: D. Ben Knoble <ben.knoble+vim@gmail.com>
+" Maintainer: Konfekt
+" Original Source: https://github.com/JalaiAmitahl/maven-compiler.vim/blob/master/compiler/mvn.vim
+" (Copyright Dan Taylor, distributed under the same terms as LICENSE)
+" Original Source: https://github.com/mikelue/vim-maven-plugin/blob/master/compiler/maven.vim
+" (distributed under same terms as LICENSE per
+" https://github.com/mikelue/vim-maven-plugin/issues/13)
+" Last Change: 2024 Nov 12
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "maven"
+
+CompilerSet makeprg=mvn\ --batch-mode
+
+" Error message for POM
+CompilerSet errorformat=[FATAL]\ Non-parseable\ POM\ %f:\ %m%\\s%\\+@%.%#line\ %l\\,\ column\ %c%.%#,
+CompilerSet errorformat+=[%tRROR]\ Malformed\ POM\ %f:\ %m%\\s%\\+@%.%#line\ %l\\,\ column\ %c%.%#
+
+" Java related build messages
+CompilerSet errorformat+=[%tARNING]\ %f:[%l\\,%c]\ %m
+CompilerSet errorformat+=[%tRROR]\ %f:[%l\\,%c]\ %m
+CompilerSet errorformat+=%A[%t%[A-Z]%#]\ %f:[%l\\,%c]\ %m,%Z
+CompilerSet errorformat+=%A%f:[%l\\,%c]\ %m,%Z
+
+" jUnit related build messages
+CompilerSet errorformat+=%+E\ \ %#test%m,%Z
+CompilerSet errorformat+=%+E[ERROR]\ Please\ refer\ to\ %f\ for\ the\ individual\ test\ results.
+" Message from JUnit 5(5.3.X), TestNG(6.14.X), JMockit(1.43), and AssertJ(3.11.X)
+CompilerSet errorformat+=%+E%>[ERROR]\ %.%\\+Time\ elapsed:%.%\\+<<<\ FAILURE!,
+CompilerSet errorformat+=%+E%>[ERROR]\ %.%\\+Time\ elapsed:%.%\\+<<<\ ERROR!,
+CompilerSet errorformat+=%+Z%\\s%#at\ %f(%\\f%\\+:%l),
+CompilerSet errorformat+=%+C%.%#
+
+" Misc message removal
+CompilerSet errorformat+=%-G[INFO]\ %.%#,
+CompilerSet errorformat+=%-G[debug]\ %.%#