简体   繁体   English

在Eclipse中的父项目之间移动Maven模块

[英]Move maven module between parent projects in eclipse

I'm having a maven multi module structure as shown below 我有一个Maven多模块结构,如下所示

ParentApp1
   - childApp1
   - childApp2
   - childApp3
TestParent
   - tchild1
   - tchild2
   - tchild3

After importing maven projects to eclipse it imports properly and individual projects are created for child projects. 导入Maven项目以使其黯然失色之后,它会正确导入,并为子项目创建单个项目。 I want to move tchild1 module under ParentApp1 parent in the above strucute. 我想在上面的结构中将tchild1模块移到ParentApp1父对象下。 After drag and drop the dependencies are not resolved. 拖放后,依存关系无法解决。 Even i tried with update Maven project in eclipse. 甚至我在Eclipse中尝试了更新Maven项目。 Can anybody tell me is it possible to move modules between projects by drag and drop ? 有人可以告诉我是否可以通过拖放在项目之间移动模块? If yes, please provide me an any suggestion or reference else please tell me the steps to move the modules between maven projects 如果是,请提供任何建议或参考,否则请告诉我在Maven项目之间移动模块的步骤

You need to add the project on the pom.xml of the parent(ParentApp1) And also change the parent on the tchild1 pom.xml 您需要在parent(ParentApp1)的pom.xml上添加项目,还需要在tchild1 pom.xml上更改父项

ParentApp1 pom.xml <modules> <module>tchild1</module> </modules> ParentApp1 pom.xml <modules> <module>tchild1</module> </modules>

TChild1 pom.xml <parent> <artifactId>ParentApp1</artifactId> <groupId>...</groupId> <version>...</version> </parent> TChild1 pom.xml <parent> <artifactId>ParentApp1</artifactId> <groupId>...</groupId> <version>...</version> </parent>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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