反应堆多模块构建的包装?

时间:2017-02-01 09:37:33

标签: maven build module

我认为我没有找到基本哲学问题的答案而做错了什么:

多模块maven项目的反应堆构建模块的正确包装是什么?

我使用的是pom,但由于没有人使用pom工件,我感觉不太正确:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

    <groupId>com.example.project</groupId>
    <artifactId>reactor-build</artifactId>
    <version>1.0.0-SNAPSHOT</version>

    <packaging>pom</packaging>

    <modules>
        <module>../config</module>
        <module>../module1</module>
        <module>../module2</module>
    </modules>

</project>  

1 个答案:

答案 0 :(得分:1)

包装pom是聚合器项目唯一允许的包装,也就是说a project with modules就像您拥有的那样,也包括父项目。来自Inheritance

  

聚合(多模块)项目需要packaging类型为pom

尝试使用其他包装will result in an error when trying to build the project,例如使用jar时的以下内容(或保留默认值):

[ERROR] 'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging.
相关问题