Skip to content

Commit f618391

Browse files
Gh-2680: Fix repo priority in spark-library (#3006)
* Add central repo ahead of spark-packages This fixes the issue where Maven uses the spark repo as the default instead of central. It's now used only when a package isn't found on central.
1 parent 575592f commit f618391

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Diff for: library/spark/pom.xml

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
~ Copyright 2016-2020 Crown Copyright
3+
~ Copyright 2016-2023 Crown Copyright
44
~
55
~ Licensed under the Apache License, Version 2.0 (the "License");
66
~ you may not use this file except in compliance with the License.
@@ -14,6 +14,7 @@
1414
~ See the License for the specific language governing permissions and
1515
~ limitations under the License.
1616
-->
17+
1718
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1819
<modelVersion>4.0.0</modelVersion>
1920
<parent>
@@ -31,6 +32,14 @@
3132
</modules>
3233

3334
<repositories>
35+
<!-- Manually specify central repo to ensure it is the highest priority.
36+
Otherwise, Maven trys to fetch everything from the spark repo which can
37+
cause a wait for a timeout before trying central. This is because repos
38+
in a POM are prioritised before the super POM where central is declared. -->
39+
<repository>
40+
<id>central</id>
41+
<url>https://repo.maven.apache.org/maven2</url>
42+
</repository>
3443
<repository>
3544
<id>Spark Packages</id>
3645
<url>https://repos.spark-packages.org/</url>

0 commit comments

Comments
 (0)