From b1b16500af496b7b09df1f58b0b58281118789c6 Mon Sep 17 00:00:00 2001 From: Colin Wetherbee Date: Thu, 17 Apr 2014 17:32:24 -0400 Subject: [PATCH] javac: Allow users to specify Maven options --- syntax_checkers/java/javac.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/syntax_checkers/java/javac.vim b/syntax_checkers/java/javac.vim index cf15b4ba..ddb2753c 100644 --- a/syntax_checkers/java/javac.vim +++ b/syntax_checkers/java/javac.vim @@ -27,6 +27,10 @@ if !exists("g:syntastic_java_maven_executable") let g:syntastic_java_maven_executable = 'mvn' endif +if !exists("g:syntastic_java_maven_options") + let g:syntastic_java_maven_options = '' +endif + if !exists("g:syntastic_java_javac_options") let g:syntastic_java_javac_options = '-Xlint' endif @@ -226,7 +230,7 @@ function! s:GetMavenProperties() let pom = findfile("pom.xml", ".;") if s:has_maven && filereadable(pom) if !has_key(g:syntastic_java_javac_maven_pom_properties, pom) - let mvn_cmd = syntastic#util#shexpand(g:syntastic_java_maven_executable) . ' -f ' . pom + let mvn_cmd = syntastic#util#shexpand(g:syntastic_java_maven_executable) . ' -f ' . pom . ' ' . g:syntastic_java_maven_options let mvn_is_managed_tag = 1 let mvn_settings_output = split(system(mvn_cmd . ' help:effective-pom'), "\n") let current_path = 'project' @@ -265,7 +269,7 @@ function! s:GetMavenClasspath() let pom = findfile("pom.xml", ".;") if s:has_maven && filereadable(pom) if !has_key(g:syntastic_java_javac_maven_pom_ftime, pom) || g:syntastic_java_javac_maven_pom_ftime[pom] != getftime(pom) - let mvn_cmd = syntastic#util#shexpand(g:syntastic_java_maven_executable) . ' -f ' . pom + let mvn_cmd = syntastic#util#shexpand(g:syntastic_java_maven_executable) . ' -f ' . pom . ' ' . g:syntastic_java_maven_options let mvn_classpath_output = split(system(mvn_cmd . ' dependency:build-classpath'), "\n") let mvn_classpath = '' let class_path_next = 0