<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>
|
|
原文:https://www.cnblogs.com/wl-naruto/p/9094926.html