在聚合器项目中为所有模块生成站点

时间:2019-02-15 01:51:06

标签: maven

我创建了aggregator pom,用于按特定顺序构建modules。 它与所有其他模块处于同一级别:

App
|_ aggregator
|_ module1 
|_ module2
|_ module3

<modelVersion>4.0.0</modelVersion>
<groupId>com.crd</groupId>
<artifactId>aggregator</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Project Aggregator</name>

<modules>
    <module>../module1</module>
    <module>../module2</module>
    <module>../module3</module>
</modules>

当我运行mvn site时,它将在每个模块(即module1/target/site

下)生成网站

我希望在aggregator/target/site下生成所有模块:module1,module2,module3站点。

file:///C://eclipse-workspace/App/aggregator/target/site/index.html

以上汇总index.html应包含指向URL的module1链接:

file:///C://eclipse-workspace/App/aggregator/target/site/module1/index.html

是否可以在所有模块中不引入<parent>? 还是我看错了?

我尝试了很多事情,其中​​包括……site:stage,并在每个模块中添加<distributionManagement>并指向Aggregator文件夹。链接正确,但内容为空。

0 个答案:

没有答案
相关问题