Maven 依赖项版本格式:${Version.XXX}
在我的pom.xml文件中,我有很多使用{version.XXX}格式的依赖版本的引用。例如:Maven 依赖项版本格式:${Version.XXX},maven,pom.xml,Maven,Pom.xml,在我的pom.xml文件中,我有很多使用{version.XXX}格式的依赖版本的引用。例如: <dependency> <groupId>com.extjs</groupId> <artifactId>gxt</artifactId> <version>${version.gxt}</version> </dependency> c
<dependency>
<groupId>com.extjs</groupId>
<artifactId>gxt</artifactId>
<version>${version.gxt}</version>
</dependency>
com.extjs
gxt
${version.gxt}
我很难找到这种格式的信息。我的假设是,这用于处理多个依赖项引用同一artifactId的场景。这将允许我们只在一个地方维护版本信息。因此${version.XXX}的意思类似于“查找其他地方引用的XXX artificatId的version属性”
我的问题:
这只是一个属性替换,因此在此pom中或某个父级中,您必须将版本列为属性,如下所示:
<properties>
<version.gxt>your version goes here</version.gxt>
</properties>
你的版本在这里