diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index bdc794a8..6f50f468 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.6.0-28' +let g:_SYNTASTIC_VERSION = '3.6.0-29' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/java/javac.vim b/syntax_checkers/java/javac.vim index 4020079e..b2780457 100644 --- a/syntax_checkers/java/javac.vim +++ b/syntax_checkers/java/javac.vim @@ -388,13 +388,15 @@ function! s:MavenOutputDirectory() " {{{2 if has_key(mvn_properties, 'project.properties.build.dir') let output_dir = mvn_properties['project.properties.build.dir'] endif - if stridx(expand('%:p:h', 1), 'src.main.java') >= 0 + + let sep = syntastic#util#Slash() + if stridx(expand('%:p:h', 1), join(['src', 'main', 'java'], sep)) >= 0 let output_dir .= '/target/classes' if has_key(mvn_properties, 'project.build.outputDirectory') let output_dir = mvn_properties['project.build.outputDirectory'] endif endif - if stridx(expand('%:p:h', 1), 'src.test.java') >= 0 + if stridx(expand('%:p:h', 1), join(['src', 'test', 'java'], sep)) >= 0 let output_dir .= '/target/test-classes' if has_key(mvn_properties, 'project.build.testOutputDirectory') let output_dir = mvn_properties['project.build.testOutputDirectory']