gpt4 book ai didi

maven 3 javadoc插件忽略配置

转载 作者:行者123 更新时间:2023-12-05 01:34:05 25 4
gpt4 key购买 nike

我使用 maven 3 并根据新的 maven 3 siteplugin+javadoc 配置配置了我的 javadoc。然而,我所有的 javadoc 配置参数似乎都被忽略了。所以没有包分组,没有源链接等。

我的项目是一个多模块项目,我使用的命令是:mvn3 clean package javadoc:aggregate

这是我的根 pom 的相关部分:

<build>
<!-- Memory management properties for jenkins build. -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.11</version>
<configuration>
<argLine>-Xmn8m -Xms32m -Xmx96m -XX:PermSize=32m
-XX:MaxPermSize=128m</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0-beta-3</version>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
<configuration>
<verbose>true</verbose>
<groups>
<group>
<title>Hypercube</title>
<packages>org.hypercube*</packages>
</group>
<group>
<title>Hyperdrive</title>
<packages>org.hyperdrive*</packages>
</group>
<group>
<title>Hydrogen</title>
<packages>org.hydrogen*</packages>
</group>
<group>
<title>Fusion-X11</title>
<packages>org.fusion.x11*</packages>
</group>
<group>
<title>Fusion-Qt</title>
<packages>org.fusion.qt*</packages>
</group>
</groups>
<linksource>true</linksource>
<minmemory>16m</minmemory>
<maxmemory>128m</maxmemory>
</configuration>
</plugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

最佳答案

这是因为 Maven 在 site-plugin 的配置中将 plugins 的 plugin-config 和 reportplugins 分开。您发布的代码片段仅在运行 mvn site 时才会生效,而不是直接的 javadoc 目标。此行为影响所有插件。 Afaik 是将配置复制到“普通”插件配置的唯一方法,如下所示:

<build>
<!-- Memory management properties for jenkins build. -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.11</version>
<configuration>
<argLine>-Xmn8m -Xms32m -Xmx96m -XX:PermSize=32m
-XX:MaxPermSize=128m</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0-beta-3</version>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
<configuration>
<verbose>true</verbose>
<groups>
<group>
<title>Hypercube</title>
<packages>org.hypercube*</packages>
</group>
<group>
<title>Hyperdrive</title>
<packages>org.hyperdrive*</packages>
</group>
<group>
<title>Hydrogen</title>
<packages>org.hydrogen*</packages>
</group>
<group>
<title>Fusion-X11</title>
<packages>org.fusion.x11*</packages>
</group>
<group>
<title>Fusion-Qt</title>
<packages>org.fusion.qt*</packages>
</group>
</groups>
<linksource>true</linksource>
<minmemory>16m</minmemory>
<maxmemory>128m</maxmemory>
</configuration>
</plugin>
</reportPlugins>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
<configuration>
<verbose>true</verbose>
<groups>
<group>
<title>Hypercube</title>
<packages>org.hypercube*</packages>
</group>
<group>
<title>Hyperdrive</title>
<packages>org.hyperdrive*</packages>
</group>
<group>
<title>Hydrogen</title>
<packages>org.hydrogen*</packages>
</group>
<group>
<title>Fusion-X11</title>
<packages>org.fusion.x11*</packages>
</group>
<group>
<title>Fusion-Qt</title>
<packages>org.fusion.qt*</packages>
</group>
</groups>
<linksource>true</linksource>
<minmemory>16m</minmemory>
<maxmemory>128m</maxmemory>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

关于maven 3 javadoc插件忽略配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8851513/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com