目的
略
适用范围
适用 Lifeix 所有后台应用。
内容
lifeix-pom项目将集中封装dependency 版本、打包、版本号管理、目录规范 等功能,其功能将逐步完善。
lifeix所有工程集都需要直接或者间接继承自 lifeix-pom 项目,其工程集关系图如下:
dependency版本控制
所有项目对同一三方库的依赖应该使用同一版本,版本的升级管理等将在lifeix-pom 项目中进行控制,各应用的parent pom 文件需要继承自 lifeix-pom。
例如apollo 的parent pom 文件的如下
<
project
xmlns
=
"<a href="http://maven.apache.org/POM/4.0.0" "="" style="color: rgb(59, 115, 175); text-decoration: none; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; min-height: inherit !important;">http://maven.apache.org/POM/4.0.0"
xmlns:xsi
=
"<a href="http://www.w3.org/2001/XMLSchema-instance" "="" style="color: rgb(59, 115, 175); text-decoration: none; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; min-height: inherit !important;">http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation
=
"http://maven.apache.org/POM/4.0.0 <a href="http://maven.apache.org/xsd/maven-4.0.0.xsd" "="" style="color: rgb(59, 115, 175); text-decoration: none; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; min-height: inherit !important;">http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<
modelVersion
>4.0.0</
modelVersion
>
<
parent
>
<
groupId
>com.lifeix.pom</
groupId
>
<
artifactId
>war.pom</
artifactId
>
<
version
>1.1.0</
version
>
</
parent
>
<
groupId
>com.lifeix.apollo</
groupId
>
<
artifactId
>apollo</
artifactId
>
<
packaging
>pom</
packaging
>
<
version
>1.2.0-SNAPSHOT</
version
>
<
name
>apollo</
name
>
<
modules
>
<
module
>apollo.user.dao</
module
>
<
module
>apollo.user.service</
module
>
<
module
>apollo.user.impl</
module
>
<
module
>apollo.user.web</
module
>
<
module
>apollo.authority.dao</
module
>
<
module
>apollo.authority.service</
module
>
<
module
>apollo.authority.impl</
module
>
<
module
>apollo.authority.web</
module
>
<
module
>apollo.task</
module
>
<
module
>apollo.war</
module
>
</
modules
>
</
project
>
|
各子工程只需要配置所需的第三方库依赖,并不需要声明版本号
<
project
xmlns
=
"<a href="http://maven.apache.org/POM/4.0.0" "="" style="color: rgb(59, 115, 175); text-decoration: none; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; min-height: inherit !important;">http://maven.apache.org/POM/4.0.0"
xmlns:xsi
=
"<a href="http://www.w3.org/2001/XMLSchema-instance" "="" style="color: rgb(59, 115, 175); text-decoration: none; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; min-height: inherit !important;">http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation
=
"http://maven.apache.org/POM/4.0.0 <a href="http://maven.apache.org/xsd/maven-4.0.0.xsd" "="" style="color: rgb(59, 115, 175); text-decoration: none; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; min-height: inherit !important;">http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<
modelVersion
>4.0.0</
modelVersion
>
<
parent
>
<
groupId
>com.lifeix.apollo</
groupId
>
<
artifactId
>apollo</
artifactId
>
<
version
>1.2.0-SNAPSHOT</
version
>
</
parent
>
<
artifactId
>authority.dao</
artifactId
>
<
name
>authority.dao</
name
>
<
packaging
>jar</
packaging
>
<
dependencies
>
<
dependency
>
<
groupId
>org.springframework</
groupId
>
<
artifactId
>spring-context</
artifactId
>
</
dependency
>
<
dependency
>
<
groupId
>org.springframework</
groupId
>
<
artifactId
>spring-aop</
artifactId
>
</
dependency
>
|