maven project-reports.html vs index.html [英] maven project-reports.html vs index.html
问题描述
我有一个多模块pom
I have a multi module pom
ProjectBaseDir>
ProjectBaseDir>
- 模块A
- 模块B
- parentPom.xml
我没有任何site.xml
I don't have any site.xml
ProjectBaseDir> mvn clean site
在目录下生成以下文件
ProjectBaseDir / target / site>
ProjectBaseDir/target/site>
- cpd.html,pmd.html,findbugs.html
- project-reports.html(注意:没有index.html)
- 文件夹(css,images,apidocs)
多模块pom中生成的链接指向index.html但该文件未创建。 staging修复了模块文件的相对路径,但原始版本的index.html仍然存在
Links generated in multi module pom points to "index.html" but that file is not created. staging fixes the relative path of the module files but the original issue of index.html still exists
ProjectBaseDir> mvn site:stage
- 如何修复链接以指向 project-reports.html?
- 或者我如何指示mvn网站创建index.html而不是project-reports.html?
注意:
我尝试使用索引的报告集maven-project-info-reports-plugin,但它没有改变任何内容。
Note: I tried "maven-project-info-reports-plugin" with reportsets of index but it did not change anything.
推荐答案
这可能没有帮助,但我已经设置了maven-site-plugin,其中包含一个显式的reportinPlugins配置部分,使用 mvn site
获取javadoc生成jdk8。看起来像这样
This might not help, but I had setup the maven-site-plugin with an explicit reportinPlugins config section in an effort to get javadoc generation with mvn site
working on jdk8. It looked like this
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.6</version>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>${javadoc.opts}</additionalparam>
</configuration>
</plugin>
我的问题是项目信息报告插件从未触发,报告插件中也没有其他内容父母的一部分。解决方法是删除maven网站的reportPlugins子项,例如
My issue was that the project info reporting plugin was never firing, nor was anything else in the reporting plugin section of the parent pom. The fix was to remove the reportPlugins child of maven site, like this
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.6</version>
</plugin>
显然,当它被定义时,它是一个替代品,而不仅仅是配置一个插件类型的东西。
Apparently when it is defined, it's a replacement, not just a configure a plugin type of thing.
这篇关于maven project-reports.html vs index.html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!