Skip to content

Commit

Permalink
use local repo to download mod files
Browse files Browse the repository at this point in the history
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
  • Loading branch information
olamy committed Jan 26, 2021
1 parent 59bf0f9 commit b214837
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
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;

Expand Down Expand Up @@ -155,10 +156,12 @@ public JettyHomeTester.Run start(List<String> args) throws Exception

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");
Expand Down

0 comments on commit b214837

Please sign in to comment.