Skip to content

Commit 9d52ce7

Browse files
committed
Add maven central as first repo
1 parent 673af89 commit 9d52ce7

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

pom.xml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,25 @@
3636
</distributionManagement>
3737

3838
<repositories>
39+
<!-- Maven queries repositories in the order that they are defined here.
40+
Usually, the Maven Central repository is the last one in this order, because it's defined in the super POM.
41+
This means that for all dependencies which are downloaded from Maven Central, the custom repositories are
42+
queried first, which slows down the build a lot.
43+
Therefore we add central as the first repository in this list.
44+
This reduces the time to download dependencies on a fresh machine from ~20-30min to 1min
45+
See: https://maven.apache.org/ref/3.6.3/maven-model-builder/super-pom.html for the origin of this configuration
46+
-->
3947
<repository>
48+
<id>central</id>
49+
<name>Central Repository</name>
50+
<url>https://repo.maven.apache.org/maven2</url>
51+
<layout>default</layout>
52+
<snapshots>
53+
<enabled>false</enabled>
54+
</snapshots>
55+
</repository>
56+
<repository>
57+
<!-- Currently used only for the monetdb dependency -->
4058
<id>clojars</id>
4159
<url>https://clojars.org/repo/</url>
4260
</repository>
@@ -45,11 +63,11 @@
4563
<id>alfresco</id>
4664
<url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
4765
</repository>
48-
<repository>
49-
<!-- Currently used only for the spring-social-github 1.0.0.M4 dependency -->
50-
<id>spring</id>
51-
<url>https://repo.spring.io/plugins-release/</url>
52-
</repository>
66+
<repository>
67+
<!-- Currently used only for the spring-social-github 1.0.0.M4 dependency -->
68+
<id>spring</id>
69+
<url>https://repo.spring.io/plugins-release/</url>
70+
</repository>
5371
</repositories>
5472

5573
<dependencies>

0 commit comments

Comments
 (0)