0

我有单个 Maven“项目”,spring-boot-starter-parent用作其父级。主要pom.xml包括 17 个其他项目。当我运行时:

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:*'

完成前需要 41 分钟。这很慢,但很有可能可以加快速度。我是这么认为的,因为当我查看输出时,例如:

[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

还有更多,例如jettynetty。它们不在项目中使用,但默认包含在spring-boot-parent-starter. 我基本上有两个问题:

  1. 有什么方法可以加快版本检查(并行,批量,除了一个一个之外的任何东西)
  2. spring-boot-starter-parent其他地方转移是否可行?

问题 2 更多的是关于它会有多难 - 我没有任何经验,也无法真正估计需要多长时间,必须做什么或者它是否会改变我的情况(所以检查绝对没有必要依赖项)。关于问题 1,我想我可以设置一些非常非常长的排除列表,但从长远来看,我认为这样的解决方案并不好。

4

0 回答 0