【问题标题】:redefine webapp location - maven standard folder for web resources重新定义 webapp 位置 - 用于 web 资源的 maven 标准文件夹
【发布时间】:2012-12-31 08:08:39
【问题描述】:

我有一个用 Ant 构建的大型 Java 项目,我正在转换为 maven。

如何重新定义 webapp - web 资源的 maven 标准文件夹? 我无法移动网页内容,而且它始终处于积极开发中。

【问题讨论】:

    标签: java maven web-applications


    【解决方案1】:

    看这里:

    http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html

    您要更改的属性是“warSourceDirectory”

    【讨论】:

      【解决方案2】:

      解决者

              <!-- http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html -->
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-war-plugin</artifactId>
                  <version>2.3</version>
                  <configuration>
                      <webResources>
                          <resource>
                              <!-- this is relative to the pom.xml directory -->
                              <directory>${webapp-folder}</directory>
                              <excludes>
                                  <exclude>**/*.jar</exclude>
                              </excludes>
                          </resource>
                      </webResources>
                  </configuration>
              </plugin>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-30
        • 2011-02-04
        • 2016-06-25
        • 2022-01-25
        相关资源
        最近更新 更多