eclipse中的多模块maven项目结构 [英] multi module maven project structure in eclipse

查看:289
本文介绍了eclipse中的多模块maven项目结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个主要项目下有两个模块



main

|

|

- 模块-a

|

|

--module-b



我使用eclipse-> new - > Maven项目,eclipse-> new-> maven模块创建它。 / p>

文件系统中的结构看起来正确。但是在eclipse中,它将module-a,module-b显示为package explorer中的两个新项目。



我的主要项目看起来像这样。





我已经看到很少的多模块项目,其中的模块存在于包资源管理器的主项目中。主要项目有



module-a / src / main / java

module-a / src / test / java

module-a / src / resources / java

module-b / src / main / java

module-b / src / test / java

module -b / src目录/资源/ JAVA。



如何将我的项目转换为这样?

解决方案

从Eclipse 4.5.M5开始(您可以从 http://eclipse.org/downloads),项目资源管理器视图有一个参数来分层显示项目,以更好地处理这种情况。请参阅 https://www.eclipse.org/eclipse/news/4.5/M5/ 有关详情。


I have two modules under a main project

main
|
|
--module-a
|
|
--module-b

I created it using eclipse->new ->Maven project, eclipse->new->maven module.

The structure in the file system looks correct. But in eclipse, it shows module-a, module-b as two new projects in the package explorer.

My main project looks like this.

I have seen few multi module projects where, the modules are present within the main project in package explorer. The main project had

module-a/src/main/java
module-a/src/test/java
module-a/src/resources/java
module-b/src/main/java
module-b/src/test/java
module-b/src/resources/java.

How do I convert my project to look like this ?

解决方案

Starting from Eclipse 4.5.M5 (that you can already download at http://eclipse.org/downloads ), the Project Explorer view has a parameter to show projects hierarchically, to better handle such case. See https://www.eclipse.org/eclipse/news/4.5/M5/ for details.

这篇关于eclipse中的多模块maven项目结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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