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不知道哪个才是真的源代码目录。当前工程目录结构图:

cannot nest '/dubboService/src/main/resources'  inside '/dubboService/src/main' .To enable the nesting exclude '/resources'  from '/dubboService/src/main'

 

解决方法:

指定一个更具体的目录作为其源代码文件夹。配置如下:

<sourceDirectory>src/main/java</sourceDirectory>

  这样问题就解决了。

 

相关文章:

  • 2021-09-30
  • 2021-08-19
  • 2022-12-23
  • 2021-07-20
  • 2021-09-02
  • 2022-01-22
猜你喜欢
  • 2021-07-28
  • 2022-12-23
  • 2021-05-24
  • 2021-12-10
  • 2021-06-05
  • 2022-12-23
  • 2021-12-30
相关资源
相似解决方案