ssm框架完整pom依賴(附加 redis、fastDFS、阿里短信驗證、poi、hadoop) --菜鳥小回

ssm框架完整pom依賴(附加 redis、fastDFS、阿里短信驗證、poi、hadoop)

<?xml version="1.0" encoding="UTF-8"?><!--指定xml文檔的版本和編碼方式 -->
<!--project是所有pom.xml的根元素, 它還聲明瞭一些POM相關的命名空間及xsd元素, 雖然這些屬性不是必須的, 但使用這些屬性能夠讓第三方工具 
	(如:IDE中的xml編輯器)幫助我們快速編輯POM -->
<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/xsd/maven-4.0.0.xsd">
	<!--指定了當前POM模型的版本,對於maven2及maven3來說,它只能是4.0.0。 這段代碼中最重要的是包含groupId,artifactId和version的三行。 
		這三個元素定義了一個項目基本的座標,在maven的世界, 任何的jar,pom或者war都是以基於這些基本的座標進行區分的。 -->
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.yun</groupId><!--填寫你的組織名例如 -->
	<artifactId>test</artifactId><!--項目名字 -->
	<version>1.0-SNAPSHOT</version><!--項目的版本 snapshot爲快照意思,代表當前爲測試版, 開發版,相對的爲release,意味發行版本,代表穩定版 -->
	<packaging>war</packaging><!--問你項目需要打成什麼包?pom jar war?一般javaWeb項目填war -->
	<name>ssm Maven Webapp</name>
	<!-- FIXME change it to the project's website -->
	<url>http://www.example.com</url>

	<!-- 集中定義常用依賴版本號 -->
	<properties>
		<junit.version>4.11</junit.version>
		<servlet-api.version>3.1</servlet-api.version>
		<jsp-api.version>2.2</jsp-api.version>
		<jstl.version>1.2</jstl.version>
		<mysql.version>8.0.17</mysql.version>
		<mybatis.version>3.2.7</mybatis.version>

		<spring.version>4.2.4.RELEASE</spring.version>
		<fastjson.version>1.2.56</fastjson.version>
		<c3p0.version>0.9.1.2</c3p0.version>
		<jedis.version>3.0.1</jedis.version>
		<commons-fileupload.version>1.3.3</commons-fileupload.version>

		<log4j.version>1.2.12</log4j.version>
		<mybatis-spring.version>1.2.2</mybatis-spring.version>
		<mybatis-ehcache.version>1.0.2</mybatis-ehcache.version>
		<jsqlparser>0.9.1</jsqlparser>
		<pagehelper.version>3.4.2</pagehelper.version>

		<validation-api.version>1.0.0.GA</validation-api.version>
		<tomcat-servlet-api.version>7.0.62</tomcat-servlet-api.version>
		<poi.version>3.17</poi.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<hadoop.version>2.7.3</hadoop.version>
		<maven.compiler.source>1.7</maven.compiler.source>
		<maven.compiler.target>1.7</maven.compiler.target>
	</properties>
	<dependencies>

		<!-- ******************************************** spring *************************** -->
		<!--提供對AspectJ的支持 -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aspects</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<!--這個jar 文件包含在應用中使用Spring 的AOP 特性時所需的類和源碼級元數據支持。使用基於AOP 的Spring特性, 如聲明型事務管理(Declarative 
			Transaction Management),也要在應用裏包含這個jar包。 -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<!--這個jar 文件包含對Spring 對JDBC 數據訪問進行封裝的所有類。 -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<!--基於tx的事務管理需要 -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-tx</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<!--這個jar 文件是所有應用都要用到的,它包含訪問配置文件、 創建和管理bean 以及進行Inversion of Control / 
			Dependency Injection(IoC/DI)操作相關的所有類。 如果應用只需基本的IoC/DI 支持,引入spring-core.jar 
			及spring-beans.jar 文件就可以了。 外部依賴spring-core -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<!--這個jar 文件包含支持UI模版(Velocity,FreeMarker,JasperReports), 郵件服務,腳本服務(JRuby),緩存Cache(EHCache), 
			任務計劃Scheduling(uartz)方面的類。 外部依賴spring-context, (spring-jdbc, Velocity, FreeMarker, 
			JasperReports, BSH, Groovy, JRuby, Quartz, EHCache) -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context-support</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<!--spring表達式語言 -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-expression</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<!--基礎web功能,如文件上傳 -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<!--spring測試,提供junit與mock測試功能 -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>
		<!--commons-lang3 -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.4</version>
		</dependency>
		<!-- ****************************** 引入springmvc,mvc實現*************************************** -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<!-- ******************************* 引入junit,做單元測試用,@Test註解需要它 ********************** -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>

		<!-- ******************************* 引入mysql *********************************************** -->
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>${mysql.version}</version>
		</dependency>
		<!-- ******************************* 引入mybatis ********************************************* -->
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis</artifactId>
			<version>${mybatis.version}</version>
		</dependency>

		<!-- ****************************************** 分頁 ******************************************** -->
		<dependency>
			<groupId>com.github.jsqlparser</groupId>
			<artifactId>jsqlparser</artifactId>
			<version>${jsqlparser}</version>
		</dependency>
		<dependency>
			<groupId>com.github.pagehelper</groupId>
			<artifactId>pagehelper</artifactId>
			<version>${pagehelper.version}</version>
		</dependency>
		<!-- ******************************* c3p0連接池 *************************************************** -->
		<dependency>
			<groupId>c3p0</groupId>
			<artifactId>c3p0</artifactId>
			<version>${c3p0.version}</version>
		</dependency>

		<!-- ******************************** jedis,Jedis是Redis官方推薦的Java連接開發工具。*********************** -->
		<dependency>
			<groupId>redis.clients</groupId>
			<artifactId>jedis</artifactId>
			<version>${jedis.version}</version>
		</dependency>

		<!-- ******************************* fastjson,把對象和json格式互轉換時需要用到 ****************************** -->
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
			<version>${fastjson.version}</version>
		</dependency>

		<!-- ***************************************** commons ************************************* -->
		<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
			<version>${commons-fileupload.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.4</version>
		</dependency>

		<!-- ***************************** 引入log4j,生成日誌需要這個,log for java ,4是 for的近音  ************************ -->
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>${log4j.version}</version>
		</dependency>


		<!-- ****************************************** 引入mybatis和spring ***************************** -->
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis-spring</artifactId>
			<version>${mybatis-spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.mybatis.caches</groupId>
			<artifactId>mybatis-ehcache</artifactId>
			<version>${mybatis-ehcache.version}</version>
		</dependency>

		<!-- ****************************************** poi導出excel ************************************ -->
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi</artifactId>
			<version>${poi.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml</artifactId>
			<version>${poi.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml-schemas</artifactId>
			<version>${poi.version}</version>
		</dependency>
		<!-- 防止 程序包javax.servlet.annotation不存在 -->
		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>tomcat-servlet-api</artifactId>
			<version>${tomcat-servlet-api.version}</version>
		</dependency>

		<!-- ******************************************* 校驗器 ***************************************** -->
		<dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
			<version>${validation-api.version}</version>
		</dependency>

		<!-- ******************************************* 文件服務器 ************************************** -->
		<dependency>
			<groupId>org.csource.fastdfs</groupId>
			<artifactId>fastdfs</artifactId>
			<version>1.2</version>
		</dependency>


		<!-- ********************************** 阿里短信依賴 ************************************** -->
		<dependency>
			<groupId>com.aliyun</groupId>
			<artifactId>aliyun-java-sdk-core</artifactId>
			<version>3.7.0</version>
		</dependency>
		<dependency>
			<groupId>com.aliyun</groupId>
			<artifactId>aliyun-java-sdk-ecs</artifactId>
			<version>4.11.0</version>
		</dependency>

		<!-- ********************************** hadoop **************************************** -->
		<dependency>
			<groupId>org.apache.hadoop</groupId>
			<artifactId>hadoop-common</artifactId>
			<version>${hadoop.version}</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-client -->
		<dependency>
			<groupId>org.apache.hadoop</groupId>
			<artifactId>hadoop-client</artifactId>
			<version>${hadoop.version}</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-hdfs -->
		<dependency>
			<groupId>org.apache.hadoop</groupId>
			<artifactId>hadoop-hdfs</artifactId>
			<version>${hadoop.version}</version>
		</dependency>
		<dependency>
			<groupId>jdk.tools</groupId>
			<artifactId>jdk.tools</artifactId>
			<version>1.8</version>
			<scope>system</scope>
			<systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
		</dependency>
		<!-- ******************************** servlet-api******************************************* -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.0.1</version>
			<scope>provided</scope>
		</dependency>

		<!-- 暫時沒用上 -->

		<!-- ******************************** jsp的依賴 ********************************************** -->
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>${jsp-api.version}</version>
			<scope>provided</scope>
		</dependency>

		
		<!-- ******************************** 引入jstl,書寫jstl時要用到 ********************************* -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
			<version>${jstl.version}</version>
		</dependency>
		<!--ueditor,一個富文本編輯器 -->
		<dependency>
			<groupId>com.gitee.qdbp.thirdparty</groupId>
			<artifactId>ueditor</artifactId>
			<version>1.4.3.3</version>
		</dependency>
		<!--jackson,把對象和json格式互轉換時需要用到 -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>2.9.7</version>
		</dependency>
		
		<!--dbcp,還記得數據庫連接池麼??還有C3P0,druid這些 -->
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.4</version>
		</dependency>
		<!--set get方法使用註解開發時需要它 -->
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.18.4</version>
			<scope>provided</scope>
		</dependency>
		

	</dependencies>
	<build>
		<finalName>ssm</finalName><!--改項目名的時候改這裏 -->

		<plugins>
			<!-- maven插件控制 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<encoding>utf-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat7-maven-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<!--端口控制 -->
					<port>8080</port>
					<!--項目路徑控制意味着http://localhost:8080/abc -->
					<!-- <path>/abc</path> -->
					<!--編碼 -->
					<uriEncoding>UTF-8</uriEncoding>
				</configuration>
			</plugin>
		</plugins>
		<resources>
			<resource>
				<directory>src/main/java</directory>
				<includes>
					<include>**/*.xml</include>
				</includes>
				<filtering>true</filtering>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<includes>
					<include>**/*.xml</include>
					<include>**/*.properties</include>
				</includes>
			</resource>

		</resources>

	</build>

</project>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章