0
hii i am working on maven i have a situation where i have some layer in my project now i need to layer the poms 
i have top 
Service layer
 >1 presentaion layer
    >> usermanagement

 >2 Application layer
    >> usermanagement

 >3 Business deligatyes
    >> usermanagement

 >4Data Access layer
    >> usermanagement
    >> dataaccessframework

here in this structure i need tu put the dependency of DATAACESSLAYER into BUSINESSDELEGATES and business deligates into application layer and application layer into presentation layer
and all have modules and has relation with parent and child

soo now i need to set the packaging elemnt of these poms

i have set all internal child pom are as JAR
and outer means layer pom as POM 

但是当我将依赖关系放入另一个层的 pom 中时,它要求 jar 但是当我将层打包设置为 jar 时,它在父子关系中存在问题,所以请帮助如何管理这个架构最终我想要一个来自 presntation 层的战争文件

请建议我做这个关系

4

1 回答 1

1

在您的项目目录中放置一个基础 pom。这也应作为您项目的所有模块的父 pom。你的项目结构应该是

/project-name
  /pom.xml --> this is the parent pom, include names of all modules here
/project-name/presentation-layer
 /pom.xml --> inside this pom declare its parent 
/project-name/data-access-layer and so on.

对于打包,您的项目中有另一个模块捆绑 jar 并创建分发(战争等)。使用maven-assembly插件来做到这一点。

于 2013-10-17T07:50:35.353 回答