mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-27 17:10:22 -04:00
[Build] Declare mirror for eclipse p2 repository (#117732)
The spotlight plugin directly resolves dependencies from p2 which causes `java.io.IOException: Failed to load eclipse jdt formatter` issues if that repo is not accessible. This is a workaround for the eclipse p2 default repository being down resulting in all our ci jobs to fail. The artifacts in question we wanna cache live in `~/.m2/repository`
This commit is contained in:
parent
2895f1e900
commit
c35777a175
1 changed files with 4 additions and 1 deletions
|
@ -17,6 +17,8 @@ import org.gradle.api.Plugin;
|
|||
import org.gradle.api.Project;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* This plugin configures formatting for Java source using Spotless
|
||||
|
@ -64,7 +66,8 @@ public class FormattingPrecommitPlugin implements Plugin<Project> {
|
|||
java.importOrderFile(new File(elasticsearchWorkspace, importOrderPath));
|
||||
|
||||
// Most formatting is done through the Eclipse formatter
|
||||
java.eclipse().configFile(new File(elasticsearchWorkspace, formatterConfigPath));
|
||||
java.eclipse().withP2Mirrors(Map.of("https://download.eclipse.org/", "https://mirror.umd.edu/eclipse/"))
|
||||
.configFile(new File(elasticsearchWorkspace, formatterConfigPath));
|
||||
|
||||
// Ensure blank lines are actually empty. Since formatters are applied in
|
||||
// order, apply this one last, otherwise non-empty blank lines can creep
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue