企業開發中所用到的基本jar包以及插件都已在此
可以自己根據實際情況酌情增減
1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 3 <modelVersion>4.0.0</modelVersion> 4 <groupId>com.lee</groupId> 5 <artifactId>lee-parent</artifactId> 6 <version>0.0.1-SNAPSHOT</version> 7 <packaging>pom</packaging> 8 9 <!-- 集中定義依賴版本號 --> 10 <properties> 11 <junit.version>4.12</junit.version> 12 <spring.version>4.1.3.RELEASE</spring.version> 13 <mybatis.version>3.2.8</mybatis.version> 14 <mybatis.spring.version>1.2.2</mybatis.spring.version> 15 <mybatis.paginator.version>1.2.15</mybatis.paginator.version> 16 <mysql.version>5.1.32</mysql.version> 17 <slf4j.version>1.6.4</slf4j.version> 18 <jackson.version>2.4.2</jackson.version> 19 <!-- 連接池 阿裡巴巴數據源 全世界最牛逼的data source 沒有之一 --> 20 <druid.version>1.0.9</druid.version> 21 <httpclient.version>4.3.5</httpclient.version> 22 <jstl.version>1.2</jstl.version> 23 <servlet-api.version>2.5</servlet-api.version> 24 <jsp-api.version>2.0</jsp-api.version> 25 <joda-time.version>2.5</joda-time.version> 26 <commons-lang3.version>3.3.2</commons-lang3.version> 27 <commons-io.version>1.3.2</commons-io.version> 28 <commons-net.version>3.3</commons-net.version> 29 <pagehelper.version>3.4.2-fix</pagehelper.version> 30 <jsqlparser.version>0.9.1</jsqlparser.version> 31 <commons-fileupload.version>1.3.1</commons-fileupload.version> 32 <jedis.version>2.7.2</jedis.version> 33 <solrj.version>4.10.3</solrj.version> 34 </properties> 35 36 <!-- 只定義依賴的版本,不會實際依賴 --> 37 <dependencyManagement> 38 <dependencies> 39 <!-- 時間操作組件 --> 40 <dependency> 41 <groupId>joda-time</groupId> 42 <artifactId>joda-time</artifactId> 43 <version>${joda-time.version}</version> 44 </dependency> 45 <!-- Apache工具組件 --> 46 <dependency> 47 <groupId>org.apache.commons</groupId> 48 <artifactId>commons-lang3</artifactId> 49 <version>${commons-lang3.version}</version> 50 </dependency> 51 <dependency> 52 <groupId>org.apache.commons</groupId> 53 <artifactId>commons-io</artifactId> 54 <version>${commons-io.version}</version> 55 </dependency> 56 <dependency> 57 <groupId>commons-net</groupId> 58 <artifactId>commons-net</artifactId> 59 <version>${commons-net.version}</version> 60 </dependency> 61 <!-- Jackson Json處理工具包 --> 62 <dependency> 63 <groupId>com.fasterxml.jackson.core</groupId> 64 <artifactId>jackson-databind</artifactId> 65 <version>${jackson.version}</version> 66 </dependency> 67 <!-- httpclient --> 68 <dependency> 69 <groupId>org.apache.httpcomponents</groupId> 70 <artifactId>httpclient</artifactId> 71 <version>${httpclient.version}</version> 72 </dependency> 73 <!-- 單元測試 --> 74 <dependency> 75 <groupId>junit</groupId> 76 <artifactId>junit</artifactId> 77 <version>${junit.version}</version> 78 <scope>test</scope> 79 </dependency> 80 <!-- 日志處理 --> 81 <dependency> 82 <groupId>org.slf4j</groupId> 83 <artifactId>slf4j-log4j12</artifactId> 84 <version>${slf4j.version}</version> 85 </dependency> 86 <!-- Mybatis --> 87 <dependency> 88 <groupId>org.mybatis</groupId> 89 <artifactId>mybatis</artifactId> 90 <version>${mybatis.version}</version> 91 </dependency> 92 <dependency> 93 <groupId>org.mybatis</groupId> 94 <artifactId>mybatis-spring</artifactId> 95 <version>${mybatis.spring.version}</version> 96 </dependency> 97 <dependency> 98 <groupId>com.github.miemiedev</groupId> 99 <artifactId>mybatis-paginator</artifactId> 100 <version>${mybatis.paginator.version}</version> 101 </dependency> 102 <dependency> 103 <groupId>com.github.pagehelper</groupId> 104 <artifactId>pagehelper</artifactId> 105 <version>${pagehelper.version}</version> 106 </dependency> 107 <!-- MySql --> 108 <dependency> 109 <groupId>mysql</groupId> 110 <artifactId>mysql-connector-java</artifactId> 111 <version>${mysql.version}</version> 112 </dependency> 113 <!-- 連接池 阿裡巴巴數據源 全世界最牛逼的data source 沒有之一 --> 114 <dependency> 115 <groupId>com.alibaba</groupId> 116 <artifactId>druid</artifactId> 117 <version>${druid.version}</version> 118 </dependency> 119 <!-- Spring --> 120 <dependency> 121 <groupId>org.springframework</groupId> 122 <artifactId>spring-context</artifactId> 123 <version>${spring.version}</version> 124 </dependency> 125 <dependency> 126 <groupId>org.springframework</groupId> 127 <artifactId>spring-beans</artifactId> 128 <version>${spring.version}</version> 129 </dependency> 130 <dependency> 131 <groupId>org.springframework</groupId> 132 <artifactId>spring-webmvc</artifactId> 133 <version>${spring.version}</version> 134 </dependency> 135 <dependency> 136 <groupId>org.springframework</groupId> 137 <artifactId>spring-jdbc</artifactId> 138 <version>${spring.version}</version> 139 </dependency> 140 <dependency> 141 <groupId>org.springframework</groupId> 142 <artifactId>spring-aspects</artifactId> 143 <version>${spring.version}</version> 144 </dependency> 145 <!-- JSP相關 --> 146 <dependency> 147 <groupId>jstl</groupId> 148 <artifactId>jstl</artifactId> 149 <version>${jstl.version}</version> 150 </dependency> 151 <dependency> 152 <groupId>javax.servlet</groupId> 153 <artifactId>servlet-api</artifactId> 154 <version>${servlet-api.version}</version> 155 <scope>provided</scope> 156 </dependency> 157 <dependency> 158 <groupId>javax.servlet</groupId> 159 <artifactId>jsp-api</artifactId> 160 <version>${jsp-api.version}</version> 161 <scope>provided</scope> 162 </dependency> 163 <!-- 文件上傳組件 --> 164 <dependency> 165 <groupId>commons-fileupload</groupId> 166 <artifactId>commons-fileupload</artifactId> 167 <version>${commons-fileupload.version}</version> 168 </dependency> 169 <!-- Redis客戶端 --> 170 <dependency> 171 <groupId>redis.clients</groupId> 172 <artifactId>jedis</artifactId> 173 <version>${jedis.version}</version> 174 </dependency> 175 <!-- solr客戶端 --> 176 <dependency> 177 <groupId>org.apache.solr</groupId> 178 <artifactId>solr-solrj</artifactId> 179 <version>${solrj.version}</version> 180 </dependency> 181 </dependencies> 182 </dependencyManagement> 183 184 <build> 185 <finalName>${project.artifactId}</finalName> 186 <plugins> 187 <!-- 資源文件拷貝插件 --> 188 <plugin> 189 <groupId>org.apache.maven.plugins</groupId> 190 <artifactId>maven-resources-plugin</artifactId> 191 <version>2.7</version> 192 <configuration> 193 <encoding>UTF-8</encoding> 194 </configuration> 195 </plugin> 196 <!-- java編譯插件 --> 197 <plugin> 198 <groupId>org.apache.maven.plugins</groupId> 199 <artifactId>maven-compiler-plugin</artifactId> 200 <version>3.2</version> 201 <configuration> 202 <source>1.7</source> 203 <target>1.7</target> 204 <encoding>UTF-8</encoding> 205 </configuration> 206 </plugin> 207 </plugins> 208 <pluginManagement> 209 <plugins> 210 <!-- 配置Tomcat插件 --> 211 <plugin> 212 <groupId>org.apache.tomcat.maven</groupId> 213 <artifactId>tomcat7-maven-plugin</artifactId> 214 <version>2.2</version> 215 </plugin> 216 </plugins> 217 </pluginManagement> 218 </build> 219 220 </project>