我已经按照以下方式配置了maven站点插件:
<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页面?
发布于 2015-10-18 10:42:18
与此同时,我找到了答案。只需让链接Introduction指向文件index.html,并将文件Introduction.md重命名为文件夹src/site/markdown中的index.md。
<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>发布于 2015-10-17 20:04:15
页面是由org.apache.maven.plugins:maven-project-info-reports-plugin:index生成的,但是根据可用的参数,您不能更改文件名。您可以做的是创建您自己的src/site/xdox/index.xml,包含重加载/重定向到Introduction.html,或者将Introduction.html重命名为index.html,就像每个人所期望的那样。
https://stackoverflow.com/questions/33190041
复制相似问题