netty学习 - 编译netty

一 、配置git (未安装git, 能够先安装git)html

git config --global core.autocrlf true

  配置以后,git将会根据使用者的系统自动将下载项目中的换行符转换成系统的换行符,由于一个项目中的多个开发者使用的系统不一样,对应的换行符不一样,若是直接下载项目代码的话,编译netty项目会出现以下错误java

... D:\Knowledge\SOURCE\netty\netty-4.0\common\src\test\java\io\netty\util\ThreadDeathWatcherTest.java:0: File does not end with a newline. D:\Knowledge\SOURCE\netty\netty-4.0\common\src\test\java\io\netty\util\ThreadDeathWatcherTest.java:0: invalid newline character (expected: CRLF) D:\Knowledge\SOURCE\netty\netty-4.0\common\src\test\java\io\netty\util\UniqueNameTest.java:0: File does not end with a newline. D:\Knowledge\SOURCE\netty\netty-4.0\common\src\test\java\io\netty\util\UniqueNameTest.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

 

 

 

2、git clone  netty项目git

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

 

  

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

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

 

 

 

3、 使用idea工具打开netty项目,编译netty (直接使用maven编译也是能够的)bash

  输入如下命令编译  maven

mvn clean package -DskipTests

 

 

 

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

 

  参考资料:http://www.javashuo.com/article/p-wzgzlqrc-o.html工具

相关文章
相关标签/搜索