0

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.

Jędrzej Dudkiewicz
  • 1,053
  • 8
  • 21
  • First why are you using `use-releases` do you have SNAPSHOT deps? See the docs: `versions:use-releases searches the pom for all -SNAPSHOT versions which have been released and replaces them with the corresponding release version.`... Furthermore I would suggest to use https://www.mojohaus.org/versions-maven-plugin/use-latest-versions-mojo.html instead..... – khmarbaise Dec 10 '21 at 14:49
  • Yes, I have quite a few internally developed libraries (jars) and frequently use snapshot versions before they are released. We have quite slow development process and this is necessary. I use `use-latest-releases` because documentation for this plugin is (was?) horrible and I can't really tell what is the difference. I experimented with different options and `use-latest-releases` was at that time best. I'll try with `use-latest-versions` again. – Jędrzej Dudkiewicz Dec 10 '21 at 14:55
  • If the docs aren't good or could be improved please open an issue or even better provide a pr... – khmarbaise Dec 10 '21 at 15:01
  • Huh, opening an issue is actually a good idea. As for PR I'd have to know what are differences and I don't know what they are and this is exactly why I'm asking here. Thanks for a suggestion. – Jędrzej Dudkiewicz Dec 10 '21 at 15:13
  • @khmarbaise I have one more question - should I try to login to your Jira and open an issue there or rather post in on github's page? – Jędrzej Dudkiewicz Dec 13 '21 at 12:04
  • 1
    On the page: https://www.mojohaus.org/versions-maven-plugin/use-latest-versions-mojo.html on the upper right corner is a button "fork me on Githb" which directs you to the appropriate git repository... there you can create an issue... – khmarbaise Dec 13 '21 at 12:23

0 Answers0