我有一个 Maven 多模块结构,如下所示
ParentApp1
- childApp1
- childApp2
- childApp3
TestParent
- tchild1
- tchild2
- tchild3
将 Maven 项目导入到 Eclipse 后,它会正确导入并为子项目创建单独的项目。我想将 tchild1 模块移动到上述结构中的 ParentApp1 父级下。拖放后,依赖关系未解决。即使我尝试在 Eclipse 中更新 Maven 项目。谁能告诉我是否可以通过拖放在项目之间移动模块?如果是,请给我任何建议或引用,否则请告诉我在 Maven 项目之间移动模块的步骤
最佳答案
您需要在父级(ParentApp1)的pom.xml中添加项目,并在tchild1 pom.xml上更改父级
ParentApp1 pom.xml
<modules>
<module>tchild1</module>
</modules>
TChild1 pom.xml
<parent>
<artifactId>ParentApp1</artifactId>
<groupId>...</groupId>
<version>...</version>
</parent>
关于java - 在 Eclipse 中的父项目之间移动 Maven 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32984594/