代码之家  ›  专栏  ›  技术社区  ›  sourcerebels

哈德逊和马文。将源/资源打包到WEB-INF/src

  •  1
  • sourcerebels  · 技术社区  · 14 年前

    我们正在与Maven和Hudson合作进行单元测试和战争构建。我们的客户需要将源代码(java和资源)复制到WEB-INF/src。

    有一个简单的方法来做这件事与maven?

    1 回复  |  直到 14 年前
        1
  •  3
  •   Pascal Thivent    14 年前

    这应该可以通过声明 src/main/java src/main/resources 作为 Maven War Plugin Adding and Filtering External Web Resources 例子:

        ...
        <configuration>
          <webResources>
            <resource>
              ...
            </resource>
            <resource>
              <directory>src/main/java</directory>
              <!-- override the destination directory for this resource -->
              <targetPath>WEB-INF/src</targetPath>
            </resource>
            <resource>
              <directory>src/main/resources</directory>
              <!-- override the destination directory for this resource -->
              <targetPath>WEB-INF/src</targetPath>
            </resource>
          </webResources>
        </configuration>
        ...