想在maven中构建从同一个项目构建2个耳朵的多模块pom

时间:2012-05-14 09:29:08

标签: maven maven-ear-plugin

我有一个主要的PTC项目,其中我有不同的模块(子项目)

PTC
|
+-- pom.xml
|    
+-- PrismaTestClientConfig
|    
+-- PrismaTestEarM
|  |  
|  \-- pom.xml
|  
+-- PrismaTestClientHTMLGeneration
|  |  
|  \-- pom.xml
|  
+-- PrismaTestClientWeb
|  |  
|  \-- pom.xml
|  
+-- PrismaTestCommon
\ 
<modules>  
    <module>PrismaTestCommon</module>  
    <module>PrismaTestClientHTMLGeneration</module>  
    <module>PrismaTestClientWeb</module>  
    <module>PrismaTestClientEarM</module>  
</modules>  

所以我有一个PTC的常见pom.xml,它包含上面的模块依赖:

上面的内容构建了ptc.ear

现在我想在BTCEarM上添加2个BTCHTMLGeneration模块,并使用PTC的PTCCommon和PTCWeb构建btc.ear。此外,当我想构建ptc.ear时需要4个以上的模块,当我想构建btc.ear时,它需要从PTC获取通用2模块和从BTC获取2个新模块

我怎样才能实现这一目标......请帮忙

1 个答案:

答案 0 :(得分:0)

只需创建两个单独的模块btc.ear(更好地将它们命名为btc-ear或ptc-ear)并将相应的依赖项添加到ear模块。深入了解maven-ear-plugin documentation

相关问题