maven多模块项目编译一直报Failure to find com.xxx.xxx:xxx-xxx-xxx:pom:1.0-SNAPSHOT in问题

工作中项目上因为多版本迭代,需要对不同迭代版本升级版本号,且因为项目工程本身是多模块结构,且依然多个其他模块工程。

在将工程中子模块的pom.xml中版本号使用变量引用父模块中定义的版本号时,一直报Failure to find com.xxx.xxx:xxx-xxx-xxx:pom:1.0-SNAPSHOT in

最后发现是因为版本号变量引用时写法不正确导致的,

正确的:<version>${re.version}</version>

写成了:<version>{$re.version}</version>

java 复制代码
<groupId>com.xxx.xxx</groupId>
    <artifactId>xxx-xxx</artifactId>
    <version>{$re.version}</version>
    <packaging>pom</packaging>
    <modules>
        <module>xxx-xxx-xx1</module>
        <module>xxx-xxx-xx2</module>
    </modules>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <re.version>1.0-CUB-SNAPSHOT</re.version>
    </properties>
相关推荐
一起养小猫1 天前
Flutter for OpenHarmony 实战:打造天气预报应用
开发语言·网络·jvm·数据库·flutter·harmonyos
xyq20241 天前
Java 抽象类
开发语言
爱装代码的小瓶子1 天前
【c++与Linux基础】文件篇(4)虚拟文件系统VFS
linux·开发语言·c++
疯狂的喵1 天前
C++编译期多态实现
开发语言·c++·算法
2301_765703141 天前
C++中的协程编程
开发语言·c++·算法
m0_748708051 天前
实时数据压缩库
开发语言·c++·算法
lly2024061 天前
jQuery Mobile 表格
开发语言
惊讶的猫1 天前
探究StringBuilder和StringBuffer的线程安全问题
java·开发语言
jmxwzy1 天前
Spring全家桶
java·spring·rpc
Halo_tjn1 天前
基于封装的专项 知识点
java·前端·python·算法