提问人:Altair 提问时间:5/9/2018 最后编辑:Altair 更新时间:8/3/2018 访问量:5053
项目基目录之外的目录。Maven-war-plugin - <web资源>
Directory outside of project base directory. Maven-war-plugin - <webResources>
问:
我在 Eclipse 中有 Maven 问题警告,因为我的 pom.xml war-plugin 配置。
该项目有多个模块。层次结构如下:项目层次结构
我需要将特定目录(module2 中的 webapp)的内容打包到模块中。顶级 pom.xml 配置的主要部分在这里:
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<webResources>
<resource>
<directory>../module2/src/main/webapp</directory>
</resource>
</webResources>
<packagingExcludes>**/*.db,**/*.scss,**/*.example,**/abrepository/**,,**/abconnection.xml</packagingExcludes>
<attachClasses>true</attachClasses>
</configuration>
</plugin>
</plugins>
模块配置的主要部分如下:
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>modul</warName>
</configuration>
</plugin>
</plugins>
有了这个war-plugin配置,我有这个警告,我想排除它:
***module\..\module2\src\main\webapp" directory outside of project base directory. (org.apache.maven.plugins:maven-war-plugin:3.2.0:war:default-war:package) pom.xml /module line 1 Maven Build Participant Problem
我可以删除它,或者我可以以不同的方式将文件夹(webapp)的内容添加到 .war 包中吗?
感谢您的帮助。
答:
评论