我希望在检测到循环依赖时自动使构建失败(以避免在Jenkins中构建循环等)。问题在于检测。
当循环依赖在反应堆内时(即从相同的顶级模块执行),Maven 3本身会检测循环依赖性。否则在这方面没用。
有extra maven enforcer rule banCircularDependencies。但是,它似乎仅限于“mvn dependency:tree”所做的事情,即。它fails to recognize传递测试范围依赖。
scope
The scope to filter by when resolving the dependency tree, or null to
include dependencies from all scopes. Note that this feature does not
currently work due to MNG-3236.
该问题还有其他解决办法吗?