1

我正在尝试为多模块项目建立一个站点。我的工作空间是这样的:

+- application
|   +-  app1
|   |    +-- pom.xml
|   +-  app2
|        +-- pom.xml
+- interface
|   +-  interf1
|   |    +-- pom.xml
|   +-  interf2
|        +-- pom.xml
+- logic
|   +-  logic1
|   |    +-- pom.xml
|   +-  logic2
|        +-- pom.xml
+-- pom.xml (parent one)

我想建立这个项目的分阶段站点。如果我停留在级别 0(根),它可以工作,但我无法导航到子模块,因为它们不在正确的文件夹中。

在文件系统中创建的内容:

stage
+- index.html                              <- A
+- dependencies.html 
+- (...)
+-- application
|    +-- app1
|    |     +-- index.html 
|    |     +-- dependencies.html
|    +-- app2
|          +-- index.html 
|          +-- dependencies.html
(and so on...)

“”的代码是什么A

<a href="app1/index.html" ..>

代替

<a href="applications/app1/index.html" ..>

我不想改变我的项目结构。有没有办法指示 Maven 在创建分阶段站点时保留文件夹结构?

我正在使用 Maven 3.0.4 和 maven-site-plugin 3.0。

父 pom.xml

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-site-plugin</artifactId>
    <version>3.0</version>
    <configuration>
        <stagingDirectory>/home/me/stage</stagingDirectory>
        <reportPlugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.4</version>
            </plugin>
        </reportPlugins>
    </configuration>
</plugin>

提前致谢

4

1 回答 1

1

尝试使用最新版本的站点插件 (3.4)。

于 2014-09-17T13:07:01.570 回答