2013-10-17 14 views
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 

但是當我把扶養成層它要求罐子 但是當我設置層包裝成JAR它在parnt子關係問題的另一個POM洙請幫忙如何管理這個架構 finaly我想從presntation戰爭文件layre如何創建聚甲醛爲父子關係

請建議我豪做到這一點關係

+0

請給我建議任何解決方案 –

+0

我真的不明白你的情況和你想要達到的目標。你能舉出你的結構和你面臨的問題的具體例子嗎? –

回答

0

有放置在你的項目目錄基本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. 

對於包裝,您的項目中有另一個模塊將瓶子捆綁並創建分配(戰爭等)。使用maven-assembly插件來做到這一點。

+0

結構沒有錯,我只是想把三個層的依賴關係放到一個和另一個.... –

+0

項目建立錯誤:'包裝'與價值'jar'是無效的。聚合器項目需要'pom'作爲包裝。它會導致這個錯誤 –