我已按以下方式配置maven-site-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<configuration>
<skip>${maven.site.plugin.skip}</skip>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-markdown</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
</plugin>
site.xml如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/DECORATION/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
<publishDate format="yyyy-MM-dd" position="right" />
<version position="right" />
<skin>
<groupId>org.apache.maven.skins</groupId>
<artifactId>maven-fluido-skin</artifactId>
<version>1.4</version>
</skin>
<custom>
<fluidoSkin>
<gitHub>
<projectId>siom79/japicmp</projectId>
<ribbonOrientation>right</ribbonOrientation>
<ribbonColor>gray</ribbonColor>
</gitHub>
</fluidoSkin>
</custom>
<body>
<links>
<item name="Maven" href="http://maven.apache.org/"/>
</links>
<breadcrumbs>
<item name="japicmp" href="https://siom79.github.io/japicmp"/>
</breadcrumbs>
<menu name="Overview">
<item href="Introduction.html" name="Introduction" />
<item href="CliTool.html" name="CliTool" />
<item href="MavenPlugin.html" name="MavenPlugin" />
<item href="Examples.html" name="Examples" />
</menu>
<menu ref="reports" inherit="bottom" />
</body>
</project>
但是当我运行mvn site:site
和mvn site:stage
时,index.html是关于页面。如何配置index.html获取Introduction.html页面?
答案 0 :(得分:0)
该页面由org.apache.maven.plugins:maven-project-info-reports-plugin:index生成,但根据可用参数,您无法更改文件名。
您可以做的是创建自己的deref-as-map
,其中包含重新加载/重定向到Introduction.html
或者只是将Introduction.html重命名为index.html,就像每个人都期望的那样。
答案 1 :(得分:0)
与此同时,我找到了答案。只需将链接Introduction
指向文件index.html
,然后将文件Introduction.md
重命名为文件夹index.md
内的src/site/markdown
即可。
<menu name="Overview">
<item href="index.html" name="Introduction"/>
<item href="CliTool.html" name="CliTool" />
<item href="MavenPlugin.html" name="MavenPlugin" />
<item href="Examples.html" name="Examples" />
</menu>