1.Attention:
>请务必有自己自己独立搭建一个工程的经历。
>如果没有的话,请独立搭建一次并且在搭建的过程中有日志详细记录。
>好处包括:对软件工程的生命周期、各个框架的使用及其架构等等会有一个基本的认识。(尤其是类似我这种半路出家当和尚的)
2.POM.xml 文件
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>monitor</name>
<groupId>com.aruforce.ee</groupId>
<artifactId>monitor</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<spring.version>4.2.9.RELEASE</spring.version>
<!-- 文件拷贝时的编码 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- 编译时的编码 -->
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
</properties>
<dependencies>
<!-- spring mvc 所需要的全部Jar包 包括 core beans expression cotext aop web及各组件的 关联关系 -->
<!--spring mvc jars start -->
<!-- log4j commons-logging -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!--aspectjweaver spring-aop -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.8.9</version>
</dependency>
<!--Spring Core based on commons-logging and log4j aspectjweaver ={optionnal} -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<!--Spring beans based on spring core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<!--Spring expression based on spring-core 提供Spring SpEL的处理引擎 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- Spring Aop based on spring-core spring-beans and aopalliance -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<!--Spring Context based on spring-core spring-beans spring-expression
spring-aop -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<!--spring-web based on spring-core spring-beans spring-expression spring-aop -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<!--Spring-mvc based on spring-core spring-beans spring-expression spring-aop
spring-web -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<!--spring mvc jars end -->
<!--servlet jsp api start -->
<!-- servlet_api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.1</version>
<scope>provided</scope>
</dependency>
<!-- jstl c标签 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!--servlet jsp api end -->
<!--Here is the jars to handle jdbc sql etc, base on spring-core spring-beans
spring-tx(datbase 事务管理) -->
<!--Spring-Jdbc based on spring-core spring-beans spring-tx -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<!--Spring-tx based on spring-core spring-beans spring-context spring-aop -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<!--这里使用 Mybatis 处理 数据库相关的内容 start -->
<!--mybatis used in spring ,mybatis xml 及mapper 映射解析工具 based on ognl javassist
cglib,based jars not include & need to be added self -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.3.0</version>
</dependency>
<!--兼容性Jar based on spring-context spring-jdbc spring-batch,based jars
not include & need to be added self -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.2.3</version>
</dependency>
<!--Here is the jars to handle jdbc driver ,spring-jdbc and mybatis need
it -->
<dependency><!-- 数据库驱动 -->
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.18</version>
</dependency>
<!--这里使用 Mybatis 处理 数据库相关的内容 start end -->
<!-- 文件上传 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.1</version>
</dependency>
<!-- 用于处理消息队列 rabbitmq -->
<!--spring处理消息队列RabbitMQ -->
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
<version>1.6.10.RELEASE</version>
</dependency>
<!-- redis 数据缓存 -->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
</dependency>
<!-- Juint单元测试 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<!--Netty -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<version>3.10.5.Final</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>dev</id>
<build>
<resources>
<resource>
<directory>src/main/resources-dev</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>prod</id>
<build>
<resources>
<resource>
<directory>src/main/resources-prod</directory>
</resource>
</resources>
</build>
</profile>
</profiles>
<build>
<finalName>monitor</finalName><!-- no need to specified -->
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
3.//TODO
以后会出一个关于Maven的使用日志。