1

我已经集成了 maven-enunciate-plugin,以便它在构建期间生成文档并将其输出到目标目录下的 docs 目录。由于我是 Maven 新手,我想知道配置我的构建的理想方法是什么,以便它将 docs 目录打包到我构建的 WAR 工件中。目前它被留在WAR之外。谢谢,迈克

4

1 回答 1

0

请看一下这个这个

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <!--
            Exclude JCL and LOG4J since all logging should go through SLF4J.
            Note that we're excluding log4j-<version>.jar but keeping
            log4j-over-slf4j-<version>.jar
          -->
          <packagingExcludes>
            WEB-INF/lib/commons-logging-*.jar,
            %regex[WEB-INF/lib/log4j-(?!over-slf4j).*.jar]
          </packagingExcludes>                               
          <packagingIncludes>
            **/docs
          </packagingIncludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  ...
</project>
于 2013-03-13T15:41:43.600 回答