1
1
/*
2
- * Copyright 2016-2021 DiffPlug
2
+ * Copyright 2016-2023 DiffPlug
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -46,7 +46,6 @@ private MavenRunner() {}
46
46
47
47
private File projectDir ;
48
48
private String [] args ;
49
- private File localRepositoryDir ;
50
49
private Map <String , String > environment = new HashMap <>();
51
50
52
51
public MavenRunner withProjectDir (File projectDir ) {
@@ -59,11 +58,6 @@ public MavenRunner withArguments(String... args) {
59
58
return this ;
60
59
}
61
60
62
- public MavenRunner withLocalRepository (File localRepositoryDir ) {
63
- this .localRepositoryDir = localRepositoryDir ;
64
- return this ;
65
- }
66
-
67
61
public MavenRunner withRemoteDebug (int port ) {
68
62
String address = (Jvm .version () < 9 ? "" : "*:" ) + port ;
69
63
environment .put ("MAVEN_OPTS" , "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=" + address );
@@ -75,7 +69,7 @@ private Result run() throws IOException, InterruptedException {
75
69
Objects .requireNonNull (args , "Need to call withArguments() first" );
76
70
// run maven with the given args in the given directory
77
71
String argsString = String .join (" " , Arrays .asList (args ));
78
- List <String > cmds = getPlatformCmds ("-e -Dmaven.repo.local=" + localRepositoryDir + ' ' + argsString );
72
+ List <String > cmds = getPlatformCmds ("-e " + argsString );
79
73
ProcessBuilder builder = new ProcessBuilder (cmds );
80
74
builder .directory (projectDir );
81
75
builder .environment ().putAll (environment );
0 commit comments