【问题标题】:Maven Javadoc aggregate fails on JBoss AS 7.1.1.FinalMaven Javadoc 聚合在 JBoss AS 7.1.1.Final 上失败
【发布时间】:2013-09-16 07:38:00
【问题描述】:

我正在尝试使用 Maven Javadoc 插件为多个项目生成聚合 javadoc。如果我运行 javadoc:javadoc 目标,则构建以 SUCCESS 完成。无论如何,我想将所有 javadocs 与 javadoc:aggregate 目标结合起来,但在尝试查找 org.jboss.msc.service 包时失败:

org.apache.maven.reporting.MavenReportException: 
Exit code: 1 - /home/me/proj/proj/subproject1/src/main/java/com/test/hasingleton/HATimerServiceActivator.java:6: error: package org.jboss.msc.service does not exist
import org.jboss.msc.service.DelegatingServiceContainer;

如何配置 maven javadoc 插件以排除此导入?我尝试了以下设置:

<excludePackageNames>org.jboss.msc.service.*</excludePackageNames>
<dependencySourceExcludes>
     <dependencySourceExclude>org.jboss.msc.service:*</dependencySourceExclude>
</dependencySourceExcludes>

但没有运气。感谢所有帮助!

【问题讨论】:

    标签: java maven jboss7.x maven-javadoc-plugin


    【解决方案1】:

    你可以试试这种方式(包括而不是排除)

            <configuration>
              <!-- switch on dependency-driven aggregation -->
              <includeDependencySources>true</includeDependencySources>
    
              <dependencySourceIncludes>
                <!-- include ONLY dependencies I control -->
                <dependencySourceInclude>org.test.dep:*</dependencySourceInclude>
              </dependencySourceIncludes>
            </configuration>
    

    其他方法是使用工件 id(而不是包名)

           <configuration>
              <!-- switch on dependency-driven aggregation -->
              <includeDependencySources>true</includeDependencySources>
    
              <dependencySourceExcludes>
                <!-- exclude ONLY commons-cli artifacts -->
                <dependencySourceExclude>commons-cli:*</dependencySourceExclude>
              </dependencySourceExcludes>
            </configuration>
    

    【讨论】:

      猜你喜欢
      • 2013-10-31
      • 1970-01-01
      • 1970-01-01
      • 2015-05-25
      • 1970-01-01
      • 2015-05-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多