首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >maven-site-plugin:配置哪个页面应该是index.html

maven-site-plugin:配置哪个页面应该是index.html
EN

Stack Overflow用户
提问于 2015-10-17 18:21:23
回答 2查看 923关注 0票数 2

我已经按照以下方式配置了maven站点插件:

代码语言:javascript
复制
<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看起来如下所示:

代码语言:javascript
复制
<?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:sitemvn site:stage时,index.html是关于页面的。如何配置index.html获取Introduction.html页面?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-10-18 10:42:18

与此同时,我找到了答案。只需让链接Introduction指向文件index.html,并将文件Introduction.md重命名为文件夹src/site/markdown中的index.md

代码语言:javascript
复制
    <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>
票数 1
EN

Stack Overflow用户

发布于 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,就像每个人所期望的那样。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33190041

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档