Java 如何创建pom作为父子关系

Java 如何创建pom作为父子关系,java,spring,maven,Java,Spring,Maven,但当我把依赖性放进另一个pom的层中时,它会要求jar 但是当我将层打包设置为jar时,它在parnt子关系中有问题,所以请帮助我如何管理这个架构 最后我要一份layre先生的战争档案 请建议我如何处理此关系在项目目录中放置一个基本pom。这也将作为项目所有模块的父pom。您的项目结构应该是 hii i am working on maven i have a situation where i have some layer in my project now i need to layer

但当我把依赖性放进另一个pom的层中时,它会要求jar 但是当我将层打包设置为jar时,它在parnt子关系中有问题,所以请帮助我如何管理这个架构 最后我要一份layre先生的战争档案


请建议我如何处理此关系

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

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 

对于打包,在您的项目中有另一个模块,它将jar打包并创建分发(war等)。使用插件来实现这一点

我真的不明白你的处境和你想要达到的目标。你能给出你的pom结构和你面临的问题的具体例子吗?结构没有错,我只是想把三层的依赖关系放在一层和另一层中……项目构建错误:值为“jar”的“packaging”无效。聚合器项目需要“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.