简体   繁体   English

模块项目上的Maven模块

[英]maven module on a module project

Can a module of a modules maven project have is own module? 模块Maven项目的模块可以有自己的模块吗? how do you write the intermediate module pom? 您如何编写中间模块pom? (here the pom of examples) Somethink like that: (这里是示例的pom):

parent: 父:

-> plugin1 ->插件1

-> -> pom.xml ->-> pom.xml

-> plugin2 ->插件2

-> -> pom.xml ->-> pom.xml

-> pom.xml : <modules><module>plugin1</module><module>plugin2</module><module>examples</module> </modules> -> pom.xml: <modules><module>plugin1</module><module>plugin2</module><module>examples</module> </modules>

-> examples ->示例

-> -> example plugin1 ->->示例plugin1

-> -> -> pom.xml ->->-> pom.xml

-> -> example plugin2 ->->示例plugin2

-> -> -> pom.xml ->->-> pom.xml

-> -> example plugin 1 & 2 ->->示例插件1和2

-> -> pom.xml <modules><module>example plugin1</module><module>exampleplugin2</module><module>example plugin1 &2</module> </modules> ->-> pom.xml <modules><module>example plugin1</module><module>exampleplugin2</module><module>example plugin1 &2</module> </modules>

Any project with modules (in your case parent and examples), must be of packaging type pom and can define zero, one or multiple modules. 任何带有模块的项目(在您的情况下为父级和示例),都必须是pom包装类型,并且可以定义零个,一个或多个模块。

<packaging>pom</packaging>

<modules>
  <module>example-plugin1</module>
  <module>example-plugin2</module>
</modules>

Have a look at the Camunda BPM Platform project on Github. 看看Github上的Camunda BPM平台项目 It also has a parent project, in this case the BPM platform Pom on the root of the repository. 它还有一个父项目,在本例中为存储库根目录上的BPM平台Pom If you look at this pom, you will see one module named engine-plugins . 如果查看此pom,将看到一个名为engine-plugins的模块。 The module itself is the parent of several modules (in this case Camunda BPM plugins). 该模块本身是几个模块的父级(在本例中为Camunda BPM插件)。 Therefore has the packaging type pom . 因此具有包装类型pom Please see following pom.xml, since it is very similar to your example: https://github.com/camunda/camunda-bpm-platform/tree/master/engine-plugins 请参阅以下pom.xml,因为它与您的示例非常相似: https : //github.com/camunda/camunda-bpm-platform/tree/master/engine-plugins

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

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