【发布时间】:2021-06-29 11:51:47
【问题描述】:
如何将属性部分的版本导出到另一个 pom.xml 文件中? 将 FIRST 项目中的“third.party.dep.version”版本导入到 SECOND 项目中。 范围导入只会使该项目的 pom 中的所有依赖项都可以访问(它对我没有帮助)。
我不能使用父 pom.xml
第一个 pom.xml:
<parent>
<groupId>com.p</groupId>
<artifactId>parentpom</artifactId>
<version>1</version>
</parent>
<groupId>org.example</groupId>
<artifactId>FIRST</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<third.party.dep.version>1.0</third.party.dep.version>
</properties>
第二个 pom.xml
<parent>
<groupId>com.p</groupId>
<artifactId>parentpom</artifactId>
<version>1</version>
</parent>
<groupId>org.example</groupId>
<artifactId>SECOND</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<!--IMPORT here third.party.dep.version-->
</properties>
【问题讨论】:
标签: maven maven-3 maven-plugin