配置maven-shade-plugin以包含src/main/webapp

Eug*_*gen 2 jetty war embedded-jetty maven maven-shade-plugin

我正在使用一个简单的项目,标准位置的webapp目录(src/main/webapp).出于某种原因,看起来maven-shade-plugin在最终生成的jar中不包含它 - 默认情况下它只包含工件src/main/resources.我试过使用以下配置,没有运气:

<configuration>
 <artifactSet>
  <includes>
   <include>*</include>
   <include>*:*</include>
  </includes>
 </artifactSet>
</configuration>
Run Code Online (Sandbox Code Playgroud)

有关如何做到这一点的任何建议,而无需将src/main/webapp移动到src/main/resources/webapp?

谢谢.

尤金.

Yan*_*lea 6

您是否尝试使用资源路径更新构建部分?

<build>
        <resources>
            <resource>
                <directory>src/main/webapp</directory>
           </resource>
        </resources>
</build>
Run Code Online (Sandbox Code Playgroud)

编辑

如前所述,阴影目的不是战争包裹.