Maven versions plugin very slow

730 Views Asked by At

I have single maven "project" that uses spring-boot-starter-parent as its parent. Main pom.xml includes 17 other projects. When I run:

mvn -B -U versions:use-releases -DexcludeReactor=false -DgenerateBackupPoms=false -DallowSnapshots=false -Dexcludes='org.springframework.boot:spring-boot-starter-parent:*,log4j:log4j:*,commons-io:commons-io:*,commons-beanutils:commons-beanutils:*'
mvn -B -U versions:use-latest-releases -DexcludeReactor=false -DgenerateBackupPoms=false -DallowSnapshots=false -Dexcludes='org.springframework.boot:spring-boot-starter-parent:*,log4j:log4j:*,commons-io:commons-io:*,commons-beanutils:commons-beanutils:*'

it takes 41 minutes before it finishes. This is very slow, but it is quite possible that it can be sped up. I think so because when I look at the output I see for example:

[INFO] artifact org.jetbrains.kotlin:kotlin-reflect: checking for updates from central
[INFO] artifact org.jetbrains.kotlin:kotlin-reflect: checking for updates from snapshots
[INFO] artifact org.jetbrains.kotlin:kotlin-osgi-bundle: checking for updates from central
[INFO] artifact org.jetbrains.kotlin:kotlin-osgi-bundle: checking for updates from snapshots
[INFO] artifact org.jetbrains.kotlin:kotlin-test: checking for updates from central
[INFO] artifact org.jetbrains.kotlin:kotlin-test: checking for updates from snapshots
[INFO] artifact org.jetbrains.kotlin:kotlin-test-junit: checking for updates from central
[INFO] artifact org.jetbrains.kotlin:kotlin-test-junit: checking for updates from snapshots

And more, for example jetty and netty. They are not used in the project, but are included by default by the spring-boot-parent-starter. I have basically two questions:

  1. Is there any way to speed up versions checking (do it in parallel, in batches, anything but one by one)
  2. Is it viable to move from spring-boot-starter-parent to something else?

Question 2 is more about how hard it will be - I don't have any experience in doing it and can't really estimate how long it will take, what must be done or if it will change my situation (so checking of absolutely unnecessary dependencies). Regarding question 1 I suppose I could set up some very, very long exclusion list, but I don't think such solution is good in the long run.

0

There are 0 best solutions below