Javac checker: cleanup.

This commit is contained in:
LCD 47 2015-11-26 11:37:44 +02:00
parent 094c3631c3
commit 10788ac8d7
2 changed files with 11 additions and 34 deletions

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START
endif
let g:_SYNTASTIC_VERSION = '3.7.0-34'
let g:_SYNTASTIC_VERSION = '3.7.0-37'
lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1

View File

@ -377,16 +377,10 @@ function! s:GetMavenClasspath() " {{{2
let mvn_properties = s:GetMavenProperties()
let sep = syntastic#util#Slash()
let output_dir = join(['target', 'classes'], sep)
if has_key(mvn_properties, 'project.build.outputDirectory')
let output_dir = mvn_properties['project.build.outputDirectory']
endif
let output_dir = get(mvn_properties, 'project.build.outputDirectory', join(['target', 'classes'], sep))
let mvn_classpath = s:AddToClasspath(mvn_classpath, output_dir)
let test_output_dir = join(['target', 'test-classes'], sep)
if has_key(mvn_properties, 'project.build.testOutputDirectory')
let test_output_dir = mvn_properties['project.build.testOutputDirectory']
endif
let test_output_dir = get(mvn_properties, 'project.build.testOutputDirectory', join(['target', 'test-classes'], sep))
let mvn_classpath = s:AddToClasspath(mvn_classpath, test_output_dir)
let g:syntastic_java_javac_maven_pom_ftime[pom] = getftime(pom)
@ -401,33 +395,16 @@ function! s:MavenOutputDirectory() " {{{2
let pom = syntastic#util#findFileInParent('pom.xml', expand('%:p:h', 1))
if s:has_maven && filereadable(pom)
let mvn_properties = s:GetMavenProperties()
let output_dir = getcwd()
let sep = syntastic#util#Slash()
if has_key(mvn_properties, 'project.properties.build.dir')
let output_dir = mvn_properties['project.properties.build.dir']
endif
if has_key(mvn_properties,'project.build.sourceDirectory')
let src_dir = mvn_properties['project.build.sourceDirectory']
else
let src_dir = join(['src', 'main', 'java'], sep)
endif
if has_key(mvn_properties,'project.build.testsourceDirectory')
let test_src_dir = mvn_properties['project.build.testsourceDirectory']
else
let test_src_dir = join(['src', 'test', 'java'], sep)
endif
let output_dir = get(mvn_properties, 'project.properties.build.dir', getcwd())
if stridx(expand('%:p:h', 1), src_dir) >= 0
let output_dir = join ([output_dir, 'target', 'classes'], sep)
if has_key(mvn_properties, 'project.build.outputDirectory')
let output_dir = mvn_properties['project.build.outputDirectory']
endif
let sep = syntastic#util#Slash()
let src_main_dir = get(mvn_properties, 'project.build.sourceDirectory', join(['src', 'main', 'java'], sep))
let src_test_dir = get(mvn_properties, 'project.build.testsourceDirectory', join(['src', 'test', 'java'], sep))
if stridx(expand('%:p:h', 1), src_main_dir) >= 0
let output_dir = get(mvn_properties, 'project.build.outputDirectory', join ([output_dir, 'target', 'classes'], sep))
endif
if stridx(expand('%:p:h', 1), test_src_dir) >= 0
let output_dir = join([output_dir, 'target', 'test-classes'], sep)
if has_key(mvn_properties, 'project.build.testOutputDirectory')
let output_dir = mvn_properties['project.build.testOutputDirectory']
endif
if stridx(expand('%:p:h', 1), src_test_dir) >= 0
let output_dir = get(mvn_properties, 'project.build.testOutputDirectory', join([output_dir, 'target', 'test-classes'], sep))
endif
if has('win32unix')