cannot nest '/dubboService/src/main/resources' inside '/dubboService/src/main' .To enable the nesting exclude '/resources' from '/dubboService/src/main'
eclipse Maven--->update Project时出现以上错误:
cannot nest '/dubboService/src/main/resources' inside '/dubboService/src/main' .To enable the nesting exclude '/resources' from '/dubboService/src/main'
原因是pom文件中,以下配置只支持一个目录,该目录下不能有子目录:
<sourceDirectory>src/main</sourceDirectory>
但是在工程中在以上目录下存在2个子目录,所以就报错了,Maven不知道哪个才是真的源代码目录。当前工程目录结构图:
解决方法:
指定一个更具体的目录作为其源代码文件夹。配置如下:
<sourceDirectory>src/main/java</sourceDirectory>
这样问题就解决了。
posted on 2017-11-20 11:16 nickTimer 阅读(1015) 评论(0) 编辑 收藏 举报