maven - 构建输出/摘要中包含一些 maven 项目的版本
问题描述
使用 Maven 3.5.4。
我正在构建一个小型多模块 Maven 项目。构建成功完成并输出:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] sample 0.0.7-SNAPSHOT .................... SUCCESS [ 0.703 s]
[INFO] sample-api ............................... SUCCESS [ 4.131 s]
[INFO] sample-model 0.0.7-SNAPSHOT ............... SUCCESS [ 10.529 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
现在为什么两个项目在摘要中包含项目的版本?我以前没有见过这种情况,并且假设只有在项目名称中包含版本时才会出现这种情况。例如sample-model
pom.xml 仅包含:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>my.group</groupId>
<artifactId>sample</artifactId>
<version>0.0.7-SNAPSHOT</version>
</parent>
<artifactId>sample-model</artifactId>
</project>
和sample-api
pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>my.group</groupId>
<artifactId>sample</artifactId>
<version>0.0.7-SNAPSHOT</version>
</parent>
<artifactId>sample-api</artifactId>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
解决方案
reactor 中第一个条目和 reactor 中最后一个条目的输出已在Maven 3.5.3中引入。
推荐阅读
- scala - 如何使用 Spark 根据另一个表中的相同列过滤一个表中的列
- php - 如何在 laravel7 中返回 megamenu 中的所有类别?
- variables - 使用字符串引用 Fortran 变量
- c# - 如何在Classic ASP.NET中实现UserControl的RenderPartial并将序列化结果发送到浏览器
- r - 循环遍历 xml 列表
- c# - microsoft Graph API 中使用“无需用户访问”方法时如何获取登录用户的用户个人资料详细信息
- kubernetes - 从 Rsyslog 发送到 Kafka 代理的消息在 Kubernetes 中被剪辑
- node.js - sqlite3 中的 BLOB 字段未更新
- swift - iOS 15 SwiftUI 键盘工具栏随机行为
- github - 从另一个仓库获取更新而不在更改后进行任何 PR 的最佳做法是什么?