[英]Maven dependency-convergence report in a multi-module project
I'm trying to use the dependency-convergence report of the maven-project-info-reports plugin in a multi-module project that looks like: 我正在尝试在如下所示的多模块项目中使用maven-project-info-reports插件的依赖项收敛报告 :
test-project-parent
+ test-lib-a
+ test-lib-b
If I run site:site
on the test-lib-a
pom I get the report I expect showing dependency convergence for that project. 如果我在
test-lib-a
pom上运行site:site
,我会得到报告,期望显示该项目的依赖项收敛。
If I run site:site
on the parent pom, a dependency convergence report is generated for each project but all three reports are the same and they include information about the whole reactor build instead of just each particular project. 如果我在父pom上运行
site:site
,则会为每个项目生成一个依赖项收敛报告,但是所有三个报告都是相同的,并且它们包含有关整个反应堆构建的信息,而不仅仅是每个特定项目。
How can I make the report generated for each module show only the information about that module and not the whole reactor build? 如何使为每个模块生成的报告仅显示有关该模块的信息,而不显示整个反应堆的构建?
EDIT: This is my parent pom: 编辑:这是我的父母pom:
<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>
<groupId>org.example</groupId>
<artifactId>site-test-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Maven Site Test</name>
<modules>
<module>test-lib-a</module>
<module>test-lib-b</module>
</modules>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-convergence</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</project>
This is the test-lib-a pom: 这是test-lib-a pom:
<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>org.example</groupId>
<artifactId>site-test-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>test-lib-a</artifactId>
<dependencies>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
</dependencies>
</project>
The second screenshot is what gets generated in site-test/test-lib-a/target/site/dependency-convergence.html
when I run site:site
on the parent. 第二张屏幕截图是在父级上运行
site:site
时,在site-test/test-lib-a/target/site/dependency-convergence.html
的内容。
So just to add two things from an attempt I made after with a similar configuration on one of my projects - 因此,仅在我对一个项目进行类似配置后,尝试添加两件事,
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-convergence</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
How can I make the report generated for each module show only the information about that module and not the whole reactor build?
如何使为每个模块生成的报告仅显示有关该模块的信息,而不显示整个反应堆的构建?
The only way I could figure out to generate different reports for dependency-convergence
on different modules was to execute mvn:site
on each module individually. 我可以弄清楚,针对不同模块生成
dependency-convergence
不同报告的唯一方法是分别在每个模块上执行mvn:site
。
as an aggregator plugin.
as an aggregator plugin.
, since I would expect the reports to be generated module(child module) specific when I run mvn:site
on the parent level. mvn:site
时,报告是特定于生成的模块(子模块)。 Though I doubt the specific words (reactor) builds from the line 尽管我怀疑特定的词(反应堆)是从线开始构建的
project-info-reports:dependency-convergence is used to generate the Project Dependency Convergence report for (reactor) builds.
project-info-reports:dependency-convergence用于生成(反应堆)构建的Project Dependency Convergence报告。
might mean that it generates the convergence report for a specific build. 可能意味着它针对特定构建生成了收敛报告。
Probably raising/reporting this to the mailing list may help further over this. 可能将其提高/报告到邮件列表可能会对此有所帮助。 Alias for which I hope is correctly put dev@maven.apache.org .
我希望正确输入Ali@aaven.apache.org的别名 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.