是否可以在Eclipse中查看多模块Maven项目作为层次结构? [英] Is it possible to view a multi-module Maven project in Eclipse as a hierarchy?

查看:545
本文介绍了是否可以在Eclipse中查看多模块Maven项目作为层次结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要配置一个单一的Maven模块(父POM),显示其下面的所有子模块,但这在Eclipse中似乎不能正常工作。例如,打开类型(ctrl + shift + t)不起作用,因为Eclipse不会检测父POM下的源文件。父/子模块的唯一方法似乎是将每个模块导入为独立项目。我们在我们的父母中有10个以上的子模块,如果我想在单个工作区中有多个父级的发行版,那么所有的子模块都会显示为项目,所以更糟糕。

I want a single Maven module (parent POM) configured, that shows all of the child modules underneath it, but this does not seem to work correctly in Eclipse. For example, the open type (ctrl+shift+t) does not work because Eclipse does not detect source files under the parent POM. The only way parent/child modules seem to work is if I import every module as an independent project. We have 10+ child modules in our parent, and if I want to have multiple releases of the parent in a single workspace it gets even worse because all the child modules show up as projects.

推荐答案

经过大量的研究,包括尝试与Netbeans类似的方法,根本不可能。父级POM正在对待,每个模块需要作为顶级项目加载,以便IDE识别源。

After a lot of research, including trying a similar approach with Netbeans, it is simply not possible. Parent POMs are treating as such, and each module needs to be loaded as a "top level" project in order for the IDEs to recognize the source.

这篇关于是否可以在Eclipse中查看多模块Maven项目作为层次结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆