(五)构建dubbo分布式平台-maven构建根项目
上一篇我们介绍《构建dubbo分布式平台-maven代码结构》,从今天开始,我们将对代码的每一个构建做详细的记录,能够帮助大家如何快速构建dubbo分布式企业架构。导语:在dubbo分布式架构构建之前,请大家务必掌握maven的相关技能,因为架构中大量使用maven技术进行项目构建,有不熟的朋友可以在网上找一些资料学习。
1. 准备技能
开发语言:JAVA/J2EE项目构建管理:Maven持续集成方案:JenkinsSOA服务: Dubbo、zookeeper、RestfulSSO单点登录:Redis、JWT、Restful分布式缓存:Redis分布式消息中间件:zookeeper+kafka分布式文件:FastDFS数据库连接池:Alibaba Druid核心框架:Spring framework、Spring MVC、Apache Shiro、MyBatis前端框架:Bootstrap + html5 + CSS3 2. 创建maven基础项目,其中只需要配置pom.xml文件和打包的文件即可,代码如下: Xml代码http://3478802949.iteye.com/images/icon_star.png
[*]<span style="font-size: 16px;"><?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/xsd/maven-4.0.0.xsd">
[*] <modelVersion>4.0.0</modelVersion>
[*]
[*] <groupId>com.sml.sz</groupId>
[*] <artifactId>ant-project</artifactId>
[*] <version>1.0.0</version>
[*] <packaging>pom</packaging>
[*]
[*] <name>ant-project</name>
[*] <url>http://maven.apache.org</url>
[*] <inceptionYear>2015-2016</inceptionYear>
[*]
[*] <properties>
[*] <!-- 框架通用包版本设置 -->
[*] <spring.version>4.2.2.RELEASE</spring.version>
[*] <validator.version>5.1.1.Final</validator.version>
[*] <mybatis.version>3.2.8</mybatis.version>
[*] <mybatis-spring.version>1.2.2</mybatis-spring.version>
[*] <shiro.version>1.2.3</shiro.version>
[*] <druid.version>1.0.11</druid.version>
[*] <ehcache.version>2.6.9</ehcache.version>
[*] <ehcache-web.version>2.0.4</ehcache-web.version>
[*] <sitemesh.version>2.4.2</sitemesh.version>
[*] <activiti.version>5.15.1</activiti.version>
[*] <wink.version>1.4</wink.version>
[*] <sso.client.version>3.2.1</sso.client.version>
[*]
[*] <!-- 通用工具包版本设置 -->
[*] <slf4j.version>1.7.7</slf4j.version>
[*] <commons-lang3.version>3.3.2</commons-lang3.version>
[*] <commons-io.version>2.4</commons-io.version>
[*] <commons-codec.version>1.9</commons-codec.version>
[*] <commons-fileupload.version>1.3.1</commons-fileupload.version>
[*] <commons-beanutils.version>1.9.1</commons-beanutils.version>
[*] <jackson.version>2.2.3</jackson.version>
[*] <fastjson.version>1.1.40</fastjson.version>
[*] <xstream.version>1.4.7</xstream.version>
[*] <guava.version>17.0</guava.version>
[*] <dozer.version>5.5.1</dozer.version>
[*] <email.version>1.4.7</email.version>
[*] <poi.version>3.9</poi.version>
[*] <freemarker.version>2.3.20</freemarker.version>
[*]
[*] <!-- 基础环境设置 -->
[*] <jdk.version>1.6</jdk.version>
[*] <tomcat.version>2.2</tomcat.version>
[*] <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
[*] <downloadSources>true</downloadSources>
[*]
[*] <!-- jdbc驱动版本设置 -->
[*] <mysql.driver.version>5.1.30</mysql.driver.version>
[*] </properties>
[*]
[*] <dependencies>
[*] <!-- 单元测试 -->
[*] <dependency>
[*] <groupId>junit</groupId>
[*] <artifactId>junit</artifactId>
[*] <version>4.11</version>
[*] <scope>test</scope>
[*] </dependency>
[*] <!-- Tomcat 如果存在就不需要将servlet-api.jar、jsp-api.jar一起打包 -->
[*] <dependency>
[*] <groupId>javax.servlet</groupId>
[*] <artifactId>servlet-api</artifactId>
[*] <version>2.5</version>
[*] <scope>provided</scope>
[*] </dependency>
[*] <dependency>
[*] <groupId>javax.servlet.jsp</groupId>
[*] <artifactId>jsp-api</artifactId>
[*] <version>2.1</version>
[*] <scope>provided</scope>
[*] </dependency>
[*] </dependencies>
[*]
[*] <dependencyManagement>
[*] <dependencies>
[*] <!-- ant 工具jar -->
[*] <dependency>
[*] <groupId>com.sml.sz</groupId>
[*] <artifactId>ant-utils</artifactId>
[*] <version>${project.version}</version>
[*] </dependency>
[*] <!-- ant 公共配置jar -->
[*] <dependency>
[*] <groupId>com.sml.sz</groupId>
[*] <artifactId>ant-config</artifactId>
[*] <version>${project.version}</version>
[*] </dependency>
[*] <!-- ant 核心框架jar -->
[*] <dependency>
[*] <groupId>com.sml.sz</groupId>
[*] <artifactId>ant-framework</artifactId>
[*] <version>${project.version}</version>
[*] </dependency>
[*] <!-- ant 代码自动生成业务jar -->
[*] <dependency>
[*] <groupId>com.sml.sz</groupId>
欢迎大家跟我一起学习《构建dubbo分布式平台》,希望大家持续关注后面的文章!完整项目的源码来源
后续还会持续更新哦,敬请关注哦~有对dubbo感兴趣的朋友们可以一起交流哦
页:
[1]