Eclipse file search finds the same file multiple times

后端 未结 11 1342
生来不讨喜
生来不讨喜 2020-12-23 20:22

In Eclipse I have two maven projects A and B, where A is a parent for B. The directory structure is the following:

A/pom.xml
A/B/pom.xml
A/B/...
11条回答
  •  爱一瞬间的悲伤
    2020-12-23 21:17

    What I personally do to avoid this is marking each module in the parent project as derived (right-click on the folder > properties > Attributes: Derived).

    Then when you perform a file search, uncheck "Consider derived resources" (I don't think it is checked by default) and you won't get the A/B/.

    The only inconvenience is that you must do this for each module, and each time a new module is added.

提交回复
热议问题