File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ impl MavenPlugin {
3939 fn get_mvn_command ( ) -> Result < OsString , JavaError > {
4040 // check if mvn is in PATH
4141 if let Ok ( status) = TmcCommand :: new_with_file_io ( "mvn" ) ?
42- . with ( |e| e. arg ( "--version" ) )
42+ . with ( |e| e. arg ( "--batch-mode" ) . arg ( "-- version") )
4343 . status ( )
4444 {
4545 if status. success ( ) {
@@ -114,7 +114,7 @@ impl LanguagePlugin for MavenPlugin {
114114
115115 let mvn_command = Self :: get_mvn_command ( ) ?;
116116 let _output = TmcCommand :: new_with_file_io ( mvn_command) ?
117- . with ( |e| e. cwd ( path) . arg ( "clean" ) )
117+ . with ( |e| e. cwd ( path) . arg ( "--batch-mode" ) . arg ( " clean") )
118118 . output_checked ( ) ?;
119119
120120 Ok ( ( ) )
@@ -151,6 +151,7 @@ impl JavaPlugin for MavenPlugin {
151151 let _output = TmcCommand :: new_with_file_io ( mvn_path) ?
152152 . with ( |e| {
153153 e. cwd ( path)
154+ . arg ( "--batch-mode" )
154155 . arg ( "dependency:build-classpath" )
155156 . arg ( output_arg)
156157 } )
@@ -179,6 +180,7 @@ impl JavaPlugin for MavenPlugin {
179180 let output = TmcCommand :: new_with_file_io ( mvn_path) ?
180181 . with ( |e| {
181182 e. cwd ( project_root_path)
183+ . arg ( "--batch-mode" )
182184 . arg ( "clean" )
183185 . arg ( "compile" )
184186 . arg ( "test-compile" )
@@ -203,6 +205,7 @@ impl JavaPlugin for MavenPlugin {
203205 let output = TmcCommand :: new_with_file_io ( mvn_path) ?
204206 . with ( |e| {
205207 e. cwd ( path)
208+ . arg ( "--batch-mode" )
206209 . arg ( "fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test" )
207210 } )
208211 . output_checked ( ) ?;
You can’t perform that action at this time.
0 commit comments