我正在尝试使用一个可以在Jenkins中执行的命令为我的多模块项目构建一个完整的站点。但是当我构建它时,子模块javadocs出现在站点根目录中(site / apidocs而不是site / submodule / apidocs)。从父代到子模块的所有链接也都被破坏了。
组织是标准
pom.xml
submodule/pom.xml
父POM包含:
<build>
<pluginManagement>
<plugins>
... Various unrelated plugins ...
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>complete-build</id>
<build>
<plugins>
<!--JavaDoc setup for Jars-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<defaultAuthor>Leon Blakey</defaultAuthor>
<defaultVersion>${project.version}</defaultVersion>
<sourcepath>target/delombok</sourcepath>
</configuration>
</plugin>
<!--Deploy site with Mercurial (Hg)-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<dependencies>
<dependency><!-- add support for scm -->
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-scm</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-hg</artifactId>
<version>1.8.1</version>
</dependency>
</dependencies>
<configuration>
<reportPlugins>
<!--JavaDoc setup for Site-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<defaultAuthor>Leon Blakey</defaultAuthor>
<defaultVersion>${project.version}</defaultVersion>
<sourcepath>target/delombok</sourcepath>
<show>public</show>
</configuration>
</plugin>
... Checkstyle, PMD, Findbugs, etc ...
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
子模块POM只包含pluginManagement的骨架插件定义。
当我尝试构建一个站点(在我的本地机器和Jenkins上)时,我从父
运行 mvn clean install site-deploy -Pcomplete-build
通过上面的设置,什么会导致子模块将其站点文件转储到站点根目录(站点/)而不是子模块目录(站点/子模块)?我是否需要使用stanging命令(我正在避免它,因为它打破了发布过程)?是否根本无法在一个命令中构建多模块站点?