-
-
Save GiuseppeMP/2f75256774cf98a5c1cb769fb9cfdd7d to your computer and use it in GitHub Desktop.
vim-test with vim-dispatch strategy for a multi-module Maven, Java and Groovy project using Spock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" https://github.com/janko-m/vim-test | |
"------------------------------------ | |
let test#strategy = "dispatch" | |
let test#enabled_runners = ["groovy#maventest", "java#maventest"] | |
let g:test#groovy#maventest#defaultoptions = '-DfailIfNoTests=true -Dmaven.test.redirectTestOutputToFile=false' | |
let g:test#groovy#maventest#options = g:test#groovy#maventest#defaultoptions . ' -DargLine="' . $JAVA_OPTS . '"' | |
let g:test#groovy#maventest#executable = 'mw test' | |
function! TestCoverage() | |
unlet! g:test#last_command g:test#last_position g:test#last_strategy | |
let l:oldOptions = g:test#groovy#maventest#options | |
let g:test#groovy#maventest#options = g:test#groovy#maventest#defaultoptions | |
:TestNearest jacoco:report -Pjacoco | |
let g:test#groovy#maventest#options = l:oldOptions | |
endfunction | |
" https://github.com/tpope/vim-dispatch | |
"-------------------------------------- | |
let g:dispatch_compilers = {} | |
" https://github.com/dansomething/mdub | |
let g:dispatch_compilers['mw'] = 'maven3' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment