zoukankan      html  css  js  c++  java
  • netty学习

    一 、配置git (未安装git, 可以先安装git)

    git config --global core.autocrlf true

      配置之后,git将会根据使用者的系统自动将下载项目中的换行符转换成系统的换行符,因为一个项目中的多个开发者使用的系统不同,对应的换行符不同,如果直接下载项目代码的话,编译netty项目会出现如下错误

    ...
    
    D:KnowledgeSOURCE
    etty
    etty-4.0commonsrc	estjavaio
    ettyutilThreadDeathWatcherTest.java:0: File does not end with a newline.
    D:KnowledgeSOURCE
    etty
    etty-4.0commonsrc	estjavaio
    ettyutilThreadDeathWatcherTest.java:0: invalid newline character (expected: CRLF)
    D:KnowledgeSOURCE
    etty
    etty-4.0commonsrc	estjavaio
    ettyutilUniqueNameTest.java:0: File does not end with a newline.
    D:KnowledgeSOURCE
    etty
    etty-4.0commonsrc	estjavaio
    ettyutilUniqueNameTest.java:0: invalid newline character (expected: CRLF)
    Audit done.
    
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    
    ...
    
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.12.1:check (check-style) on project netty-common: Failed during checkstyle execution: There are 314 checkstyle errors. -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
    
    Process finished with exit code 1

    二、git clone  netty项目

      netty项目网址:https://github.com/netty/netty

     

      

      在git bash命令行下,使用如下命令 clone 项目

    git clone https://github.com/netty/netty.git

    三、 使用idea工具打开netty项目,编译netty (直接使用maven编译也是可以的)

      输入以下命令编译  

    mvn clean package -DskipTests

      结果,编译成功,可在target文件夹下找到对应的jar包

      参考资料:https://www.cnblogs.com/shihuc/p/6184112.html

    人生没有彩排,每一天都是现场直播
  • 相关阅读:
    redhat5.5 x64 安装oracle 11g
    在Linux上搭建VisualSVN Server(svn服务端)
    执行impdp时出现的各种问题
    转: oracle中schema指的是什么?
    [NOIP2000] 乘积最大
    高精模板
    [NOIP2006]金明的预算方案
    luogu P1268 树的重量
    [NOIP2008]传纸条
    luogu P1522 Cow Tours
  • 原文地址:https://www.cnblogs.com/timfruit/p/9330131.html
Copyright © 2011-2022 走看看