我有一个名为views
包含一个.jsp 文件\Calendar.jsp 的maven 模块。我有另一个名为 的 maven 模块core
,它依赖于views
module. module的打包类型views
是jar,module的打包类型core
是war。
我已配置overlay
将 .jsp 文件从views.jar
WEB-INF\views 文件夹(的core.war
)复制。
<configuration>
<overlays>
<overlay>
<groupId>org.opensource</groupId>
<artifactId>views</artifactId>
<type>jar</type>
<includes>
<include>**/*.jsp</include>
</includes>
<targetPath>WEB-INF/views</targetPath>
</overlay>
</overlays>
</configuration>
overlay
配置工作正常,它确实将.jsp 文件从WEB-INF\views 文件夹(的)复制。views.jar
core.war
但问题是它不会从 .jsp 文件中删除这些 .jsp 文件views.jar
。因此,我core.war
最终得到了重复的 .jsp 文件(一份在 WEB-INF/views 文件夹中,另一份在 .jsp 中views.jar
)。结果,规模core.war
急剧增加。(其中的 .jsp 文件views.jar
是多余的,因为它们不会在 webapp 的执行过程中使用。)
所以,问题是:-如何配置overlay
做剪切+粘贴操作而不是复制+粘贴操作。如果使用 无法做到这一点overlay
,是否还有其他(Maven 友好)解决方案?