`
huangxx
  • 浏览: 316333 次
  • 来自: ...
社区版块
存档分类
最新评论

maven2 eclipse buildpath resources 问题

阅读更多

https://docs.sonatype.org/display/M2ECLIPSE/Project+FAQ#ProjectFAQ-WhyresourcefoldersinJavaprojecthaveexcluded%3D%22%22

 

Why resource folders in Java project have excluded="**"

Many users are confused that when Java project is configured in Eclipse, resource folders gets excluded="**". This is done intentionally, because those resources are processed by the "Maven Builder" registered to the project. This builder provides special resource handling, that includes filtering, as well as execution of other Maven plugins for processing resources. See Maven build lifecycle for more details.

If you manually remove resource exclusion, JDT will copy resources and overwrite filtered resources generated by Maven plugins.

Actually project resource folder doesn't really need to be added to the buildpath (Maven Builder is going to work without it), but it been considered convenient and look better in the Package Explorer and other Eclipse views.

Also note, that classpath used for JUnit and Java Application launch configurations for projects that have Maven support enabled is also calculated in a special way and excluded resources does not affect it either.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics