<localRepository>D:\maven\RepMaven</localRepository>
|
<profiles>
<profile>
<id>jdk-1.7</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.7</jdk>
</activation>
<properties>
</properties>
</profile>
</profiles>
|
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
<name>AOP alliance</name>
<version>1.0</version>
|
aopalliance\aopalliance\1.0\aopalliance-1.0.jar
|
<!-- 依賴的排除 -->
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
|
|
|
<properties>
<com.naruto.spring.version>4.0.0.RELEASE</com.naruto.spring.version>
</properties>
|
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactid>spring-core<artifactid>
<version>${com.naruto.spring.version}</version>
</dependency>
</dependencies>
|
<!-- 統一配置依賴的管理-->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
|
<!-- 子工程聲明父工程 -->
<parent>
<groupId>com.naruto.maven</groupId>
<artifactId>Parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<!-- 以當前文件爲基準 的父工程 的的pom.xml的相對路徑 -->
<relativePath>../Parent/pom.xml</relativePath>
</parent>
|
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
|
<!-- 配置聚合 -->
<modules>
<!-- 指定各個子工程的相對路徑 -->
<module>../Hello</module>
<module>../HelloFriend</module>
<module>../MakeFriend</module>
</modules>
|
<!-- 配置構建工程中須要使用的插件 -->
<build>
<!-- 部署項目時的名稱 -->
<finalName>NarutoWeb</finalName>
<plugins>
<plugin>
<!-- cargo是一家專門從事啓動servlet容器的組織 -->
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.2.3</version>
<!-- 針對插件作的配置 -->
<configuration>
<!-- 配置當前系統中容器的位置 -->
<container>
<containerId>tomcat7x</containerId>
<home>D:\Tomcat\apache-tomcat-7.0.82</home>
</container>
<configuration>
<type>existing</type>
<home>D:\Tomcat\apache-tomcat-7.0.82</home>
<!-- 若是Tomcat端口爲默認值8080則沒必要設置該屬性 -->
<!-- <properties>
<cargo.servlet.port>8080</cargo.servlet.port>
</properties> -->
</configuration>
</configuration>
<!-- 配置插件在什麼狀況下執行 -->
<executions>
<execution>
<id>cargo-run</id>
<!-- 生命週期的階段 -->
<phase>install</phase>
<goals>
<!-- 插件的目標 -->
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
|