简体   繁体   中英

Eclipse - Open Resource - Hide Derived Resource doesn't work for multi-module maven projects

I see that unchecking "Show Derived Resource" under the top right corner menu under Open Resource (Command + R) does work for most of the eclipse project including regular maven project. But it doesn't work for Multi module eclipse project for me. Could be an issue with m2e? Any solution?

Eclipse has a weekness regarding nested projects in general, maven multi-module projects are just a flavor of them.

In my experience it all works best if you only import the module-leafs but not the intermediary ones. The drawback is that you dont have their pom in the IDE, but unless you need to edit them it's not a problem. m2m will still use them during building and stuff.

If you really want to have the intermediary projects too, then you need to set the folders of the nested modules to "derived" in the properties dialog. However, that setting is a little fickle in my experience and gets lost along the way. A solution to this is this plugin that I have used in the past https://nodj.github.io/AutoDeriv/ and works similar to .gitignore.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM