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>
相关推荐
TomCode先生3 分钟前
c#动态树形表达式详解
开发语言·c#
高-老师35 分钟前
基于R语言的物种气候生态位动态量化与分布特征模拟
开发语言·r语言·物种气候
大翻哥哥1 小时前
Python 2025:量化金融与智能交易的新纪元
开发语言·python·金融
weixin_437830942 小时前
使用冰狐智能辅助实现图形列表自动点击:OCR与HID技术详解
开发语言·javascript·ocr
鹿鹿学长2 小时前
2025年全国大学生数学建模竞赛(C题) 建模解析|婴儿染色体数学建模|小鹿学长带队指引全代码文章与思路
c语言·开发语言·数学建模
zhousenshan2 小时前
Python爬虫常用框架
开发语言·爬虫·python
皮皮林5513 小时前
SpringBoot 全局/局部双模式 Gzip 压缩实战:14MB GeoJSON 秒变 3MB
java·spring boot
weixin_456904273 小时前
Spring Boot 用户管理系统
java·spring boot·后端
趁你还年轻_3 小时前
异步编程CompletionService
java
DKPT3 小时前
Java内存区域与内存溢出
java·开发语言·jvm·笔记·学习