javac: Allow users to specify Maven options

This commit is contained in:
Colin Wetherbee 2014-04-17 17:32:24 -04:00
parent 99cbe5d011
commit b1b16500af

View File

@ -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