use local repo to download mod files

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
This commit is contained in:
olivier lamy 2021-01-26 21:03:56 +10:00
parent 59bf0f9439
commit b214837c78
2 changed files with 8 additions and 4 deletions

View File

@ -87,6 +87,7 @@ public class JettyDemoBase
"jetty.version=" + jettyVersion,
"jetty.home=" + jettyHome.toString(),
"jetty.base=" + jettyBase.toString(),
"maven.local.repo=" + System.getProperty("mavenRepoPath"),
"--add-modules=logging-jetty,demo"
};

View File

@ -61,6 +61,7 @@ import org.eclipse.aether.transport.http.HttpTransporterFactory;
import org.eclipse.jetty.toolchain.test.FS;
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
import org.eclipse.jetty.util.IO;
import org.eclipse.jetty.util.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -155,10 +156,12 @@ public class JettyHomeTester
args = new ArrayList<>(args);
args.add("maven.local.repo=" + config.mavenLocalRepository);
// we get artifacts from local repo first
args.add("maven.local.repo=" + System.getProperty("mavenRepoPath"));
if (StringUtil.isNotBlank( config.mavenLocalRepository)) {
args.add("maven.local.repo=" + config.mavenLocalRepository);
} else if (StringUtil.isNotBlank(System.getProperty("mavenRepoPath"))){
// we get artifacts from local repo first
args.add("maven.local.repo=" + System.getProperty("mavenRepoPath"));
}
// if this JVM has `maven.repo.uri` defined, make sure to propagate it to child
String remoteRepoUri = System.getProperty("maven.repo.uri");