Web*_*ter 5 import plugins pom.xml maven parent-pom
我有 2 个 POM 用于 2 个独立的多模块父级:
CorePOM/pom.xml
SpectPOM/pom.xml
Run Code Online (Sandbox Code Playgroud)
SpecPOM 的子级使用 CorePOM 的子级,但我不想使 SpecPOM 成为 CorePOM 的子级。
我正在使用<dependencyManagement>导入:
<dependencyManagement>
<dependencies>
<!-- Use import to sync versions with CorePOM -->
<dependency>
<groupId>com.example.multi</groupId>
<artifactId>CorePOM</artifactId>
<version>1.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud)
问:是否有等效的导入策略,以便<pluginManagement>我可以同步插件的版本?
如果没有,如何避免在 CorePom 和 SpecPOM 中重复插件版本?