简体   繁体   English

Eclipse和SVN中的Maven Multimodul项目

[英]Maven Multimodul project in Eclipse and in SVN

I have an existing project, MainProject. 我有一个现有项目MainProject。 I want to convert it to a multimodule project. 我想将其转换为多模块项目。 In Eclipse I created a parent modul, which is just a pom modul and another modul, Modul_1. 在Eclipse中,我创建了一个父模块,它只是一个pom模块,另一个是Modul_1。

Then I moved my MainProject in parent file directory. 然后我将MainProject移到了父文件目录中。 (Actually i did not want to move in parent folder. unfortunately to make it possible that Main_project finds the parent modul, i must do that) (实际上,我不想移动到父文件夹中。不幸的是,要使Main_project能够找到父模块,我必须这样做)

Works fine.. It looks like: 正常工作。看起来像:

-->ParentModule
------>Mainproject
------>Modul_1

Modul_1 is only needed in jenkins. 仅在詹金斯中需要Modul_1。 It means the programmers should only care about MainProject. 这意味着程序员应该只关心MainProject。

How should I check in the project in SVN? 如何在SVN中签入项目? With the same file structure or can i check in independently in SVN? 使用相同的文件结构,还是可以在SVN中独立签入?

if the mainproject doesn't refer to ParentModule, you could layout it like this : 如果mainproject没有引用ParentModule,则可以这样布局:

-->ParentModule
-->MainProject
-->Modul_1

in parentmodule's pom.xml : 在parentmodule的pom.xml中:

<modules>
  <module>../MainProject</module>
  <module>../Modul_1</module>
</modules>

for jekins, there are 2 ways to configure job : 对于jekins,有两种配置job的方法:

  1. checkout parent folder and point pom's location to ParentModule/pom.xml 检出父文件夹并将pom的位置指向ParentModule / pom.xml
  2. checkout 3 svn locations to each folder for 3 projects and point pom to ParentModule/pom.xml 在3个项目的每个文件夹中检出3个svn位置,并将pom指向ParentModule / pom.xml

for eclipse , you can checkout only MainProject. 对于eclipse,您只能检出MainProject。

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

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