我们专注攀枝花网站设计 攀枝花网站制作 攀枝花网站建设
成都网站建设公司服务热线:400-028-6601

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

dubbomaven如何构建根项目

这篇文章主要讲解了“dubbo maven如何构建根项目”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“dubbo maven如何构建根项目”吧!

为青山等地区用户提供了全套网页设计制作服务,及青山网站建设行业解决方案。主营业务为成都网站建设、成都网站制作、青山网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!

1. 准备技能

开发语言:JAVA/J2EE

项目构建管理:Maven

持续集成方案:Jenkins

SOA服务: Dubbo、zookeeper、Restful

SSO单点登录:redis、JWT、Restful

分布式缓存:Redis

分布式消息中间件:zookeeper+kafka

分布式文件:FastDFS

数据库连接池:Alibaba Druid

核心框架:Spring framework、Spring MVC、Apache Shiro、MyBatis

前端框架:Bootstrap + html5 + CSS3

2. 创建maven基础项目,其中只需要配置pom.xml文件和打包的文件即可,代码如下:



    4.0.0
 
    com.sml.sz
    ant-project
    1.0.0
    pom
 
    ant-project
    http://maven.apache.org
    2015-2016
 
    
        
        4.2.2.RELEASE
        5.1.1.Final
        3.2.8
        1.2.2
        1.2.3
        1.0.11
        2.6.9
        2.0.4
        2.4.2
        5.15.1
        1.4
        3.2.1
 
        
        1.7.7
        3.3.2
        2.4
        1.9
        1.3.1
        1.9.1
        2.2.3
        1.1.40
        1.4.7
        17.0
        5.5.1
        1.4.7
        3.9
        2.3.20
 
        
        1.6
        2.2
        UTF-8
        true
 
        
        5.1.30
    
 
    
        
        
            junit
            junit
            4.11
            test
        
        
        
            javax.servlet
            servlet-api
            2.5
            provided
        
        
            javax.servlet.jsp
            jsp-api
            2.1
            provided
        
    
 
    
        
            
            
                com.sml.sz
                ant-utils
                ${project.version}
            
            
            
                com.sml.sz
                ant-config
                ${project.version}
            
            
            
                com.sml.sz
                ant-framework
                ${project.version}
            
            
            
                com.sml.sz
                ant-core-gen
                ${project.version}
            
            
            
                com.sml.sz
                ant-core-member
                ${project.version}
            
             
            
            
                com.sml.sz
                ant-web-service
                ${project.version}
            
            
            
                com.sml.sz
                ant-web-admin
                ${project.version}
            
 
            
            
                com.sml.sz
                ant-member-facade
                ${project.version}
            
            
                com.sml.sz
                ant-member-service
                ${project.version}
            
            
        
    
 
    
        
            
                
                
                    org.apache.maven.plugins
                    maven-antrun-plugin
                    1.7
                
                
                    org.apache.maven.plugins
                    maven-compiler-plugin
                    2.3.2
                    
                        1.5
                        1.5
                        
                        
                            **/*.keep
                            **/*.keep.*
                            *.bak
                            *.contrib
                        
                        true
                        -Xlint:unchecked,deprecation,fallthrough,finally
                        true
                        ${project.build.sourceEncoding}
                    
                
                
                    org.apache.maven.plugins
                    maven-jar-plugin
                    2.3.1
                    
                        
                            
                                test-jar
                            
                        
                    
                    
                        
                            
                                true
                                true
                            
                        
                    
                
                
                    org.apache.maven.plugins
                    maven-release-plugin
                    2.1
                
                
                    org.apache.maven.plugins
                    maven-resources-plugin
                    2.4.3
                    
                        
                        
                            **/*.keep
                            **/*.keep.*
                            *.bak
                            *.contrib
                        
                    
                
                
                    org.apache.maven.plugins
                    maven-site-plugin
                    2.1.1
                    
                        ${project.build.sourceEncoding}
                        ${project.build.sourceEncoding}
                    
                
                
                    org.apache.maven.plugins
                    maven-source-plugin
                    2.1.2
                    
                        
                            attach-sources
                            
                                jar
                                test-jar
                            
                        
                    
                    
                        false
                        true
                    
                
                
                    org.apache.maven.plugins
                    maven-war-plugin
                    2.4
                
                
                    org.apache.maven.plugins
                    maven-ear-plugin
                    2.9
                    
                        5
                    
                
                
                    org.apache.maven.plugins
                    maven-surefire-plugin
                    2.6
                    
                        true
                    
                
                
                    org.apache.maven.plugins
                    maven-surefire-report-plugin
                    2.6
                    
                        both
                    
                
                
                    com.google.code.maven-replacer-plugin
                    replacer
                    1.5.1
                    
                        
                            prepare-package
                            
                                replace
                            
                        
                    
                
 
                
                
                    org.kuali.maven.plugins
                    properties-maven-plugin
                    2.0.1
                    
                        
                            ${basedir}/../project_${profile}.properties
                        
                    
                    
                        
                            prepare-package
                            
                                read-project-properties
                            
                        
                    
                
            
        
    
    
        
            dev
            
                true
            
            
                
                    dev
                
            
        
        
            sit
            
                
                    environment.type
                    sit
                
            
            
                
                    sit
                
            
        
        
            uat
            
                
                    environment.type
                    uat
                
            
            
                
                    uat
                
            
        
        
            performance
            
                
                    environment.type
                    performance
                
            
            
                
                    performance
                
            
        
        
            production
            
                
                    environment.type
                    production
                
            
            
                
                    production
                
            
        
    
 
    
        
        ant-utils
 
        
        ant-config
 
        
        ant-framework
 
        
        ant-core-gen
 
        
        ant-core-member
 
        
        ant-web-admin
 
        
        ant-web-service
 
        
        ant-member-facade
 
        
        ant-member-service
    
    ant平台的super工程,定义了整合ant项目群的基本信息,以及依赖项和插件信息、maven的自定义信息

2. 创建打包脚本:测试、生成等

build_SIT-no

set MAVEN_OPTS= -Xms128 -Xmx256m
mvn clean package --define maven.test.skip=true --define environment.type=sit

build_UAT-no-test.bat

set MAVEN_OPTS= -Xms128 -Xmx256m  
mvn clean package --define maven.test.skip=true --define environment.type=uat

build_PROD-no-test.bat

set MAVEN_OPTS= -Xms128 -Xmx256m  
mvn clean package --define maven.test.skip=true --define environment.type=pro

3. 创建打包的properties文件:

project_sit.properties

解释: 里面可以配置打包的信息,比如:ip、域名、包名等

4. 代码结构如下:

dubbo maven如何构建根项目

感谢各位的阅读,以上就是“dubbo maven如何构建根项目”的内容了,经过本文的学习后,相信大家对dubbo maven如何构建根项目这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是创新互联,小编将为大家推送更多相关知识点的文章,欢迎关注!


文章名称:dubbomaven如何构建根项目
本文网址:http://mswzjz.cn/article/iidghp.html

其他资讯