Skip to content

Commit c4208da

Browse files
benknoblechrisbra
authored andcommitted
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]: benknoble/Dotfiles@570b100 [2]: https://github.com/JalaiAmitahl/maven-compiler.vim [3]: mikelue/vim-maven-plugin#13 closes: #16041 Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 8e013b1 commit c4208da

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

runtime/compiler/maven.vim

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
12+
if exists("current_compiler")
13+
finish
14+
endif
15+
let current_compiler = "maven"
16+
17+
CompilerSet makeprg=mvn\ --batch-mode
18+
19+
" Error message for POM
20+
CompilerSet errorformat=[FATAL]\ Non-parseable\ POM\ %f:\ %m%\\s%\\+@%.%#line\ %l\\,\ column\ %c%.%#,
21+
CompilerSet errorformat+=[%tRROR]\ Malformed\ POM\ %f:\ %m%\\s%\\+@%.%#line\ %l\\,\ column\ %c%.%#
22+
23+
" Java related build messages
24+
CompilerSet errorformat+=[%tARNING]\ %f:[%l\\,%c]\ %m
25+
CompilerSet errorformat+=[%tRROR]\ %f:[%l\\,%c]\ %m
26+
CompilerSet errorformat+=%A[%t%[A-Z]%#]\ %f:[%l\\,%c]\ %m,%Z
27+
CompilerSet errorformat+=%A%f:[%l\\,%c]\ %m,%Z
28+
29+
" jUnit related build messages
30+
CompilerSet errorformat+=%+E\ \ %#test%m,%Z
31+
CompilerSet errorformat+=%+E[ERROR]\ Please\ refer\ to\ %f\ for\ the\ individual\ test\ results.
32+
" Message from JUnit 5(5.3.X), TestNG(6.14.X), JMockit(1.43), and AssertJ(3.11.X)
33+
CompilerSet errorformat+=%+E%>[ERROR]\ %.%\\+Time\ elapsed:%.%\\+<<<\ FAILURE!,
34+
CompilerSet errorformat+=%+E%>[ERROR]\ %.%\\+Time\ elapsed:%.%\\+<<<\ ERROR!,
35+
CompilerSet errorformat+=%+Z%\\s%#at\ %f(%\\f%\\+:%l),
36+
CompilerSet errorformat+=%+C%.%#
37+
38+
" Misc message removal
39+
CompilerSet errorformat+=%-G[INFO]\ %.%#,
40+
CompilerSet errorformat+=%-G[debug]\ %.%#

0 commit comments

Comments
 (0)