@@ -42,7 +42,6 @@ public MavenExecutionResult exec(Path projectPath, String[] mavenArgs) {
42
42
InvocationRequest request = new DefaultInvocationRequest ();
43
43
request .setMavenOpts (MAVEN_OPTS );
44
44
45
- DefaultInvoker invoker = new DefaultInvoker ();
46
45
String mavenHome = System .getenv ("M3_HOME" );
47
46
if (mavenHome == null ) {
48
47
mavenHome = System .getenv ("M2_HOME" );
@@ -59,6 +58,7 @@ public MavenExecutionResult exec(Path projectPath, String[] mavenArgs) {
59
58
60
59
log .info ("Using maven at: {}" , mavenHome );
61
60
61
+ DefaultInvoker invoker = new DefaultInvoker ();
62
62
invoker .setMavenHome (new File (mavenHome ));
63
63
64
64
final ByteArrayOutputStream outBuf = new ByteArrayOutputStream ();
@@ -106,7 +106,8 @@ private Path useBundledMaven() {
106
106
try {
107
107
108
108
InputStream data = getClass ().getResourceAsStream ("apache-maven-3.3.9.zip" );
109
- Preconditions .checkNotNull (data , "Couldn't load bundled maven from tmc-langs-java.jar." );
109
+ Preconditions .checkNotNull (data ,
110
+ "Couldn't load bundled maven from tmc-langs-java.jar." );
110
111
Path tmpFile = File .createTempFile ("tmc-maven" , "zip" ).toPath ();
111
112
Files .copy (data , tmpFile , StandardCopyOption .REPLACE_EXISTING );
112
113
Archiver archiver = ArchiverFactory .createArchiver (ArchiveFormat .ZIP );
0 commit comments