netty源代碼編譯_mac os


工作中會用到netty,有隨手整理筆記的習慣,故學習整理下,之前看過了理論知識,接下來就看下源碼了,先來編譯下

個人 fork git:https://github.com/ending06/netty

netty 學習wiki記錄:https://github.com/ending06/netty/wiki/Netty%E6%BA%90%E7%A0%81%E7%BC%96%E8%AF%91%E2%80%94%E2%80%94MAC-OS

1. 下載源碼 https://github.com/netty/netty

2.之前編譯了一次,失敗了,具體錯誤不貼了,看了下https://netty.io/wiki/native-transports.html

3.修改配置,父parent

  <build>
    <extensions>
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>1.5.0.Final</version>
      </extension>
    </extensions>
    ...
  </build>

Building the MacOS/BSD native transport To build the native transport, you need to use MacOS 10.12 or higher. Please also install the required tools and libraries:

brew install autoconf automake libtool

4. mvn -U -X clean package 看具體出錯的位置

5. 編譯環境

1.系統:Mac os high sierra 10.13.6 2

2.jdk

~ $ java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

3.mvn

~ $ mvn -version
Apache Maven 3.5.0 
Maven home: 
/XXXXXX/apache-maven-3.5.0
Java version: 1.8.0_191, vendor: Oracle Corporation
Java home: /XXXXXX/jdk1.8.0_191.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"

4.ide

 

 

 

 

 

6.mvn install -DskipTests

7.result

[INFO] Reactor Summary:
[INFO] 
[INFO] Netty/Dev-Tools .................................... SUCCESS [  1.438 s]
[INFO] Netty .............................................. SUCCESS [  6.160 s]
[INFO] Netty/Common ....................................... SUCCESS [ 45.395 s]
[INFO] Netty/Buffer ....................................... SUCCESS [ 13.871 s]
[INFO] Netty/Resolver ..................................... SUCCESS [  4.270 s]
[INFO] Netty/Transport .................................... SUCCESS [ 12.567 s]
[INFO] Netty/Codec ........................................ SUCCESS [ 10.514 s]
[INFO] Netty/Codec/DNS .................................... SUCCESS [  6.099 s]
[INFO] Netty/Codec/HAProxy ................................ SUCCESS [  3.874 s]
[INFO] Netty/Handler ...................................... SUCCESS [ 12.510 s]
[INFO] Netty/Codec/HTTP ................................... SUCCESS [ 12.516 s]
[INFO] Netty/Codec/HTTP2 .................................. SUCCESS [ 12.402 s]
[INFO] Netty/Codec/Memcache ............................... SUCCESS [  4.390 s]
[INFO] Netty/Codec/MQTT ................................... SUCCESS [  5.057 s]
[INFO] Netty/Codec/Redis .................................. SUCCESS [  5.322 s]
[INFO] Netty/Codec/SMTP ................................... SUCCESS [  3.429 s]
[INFO] Netty/Codec/Socks .................................. SUCCESS [  5.034 s]
[INFO] Netty/Codec/Stomp .................................. SUCCESS [  3.950 s]
[INFO] Netty/Codec/XML .................................... SUCCESS [  3.838 s]
[INFO] Netty/Handler/Proxy ................................ SUCCESS [  5.261 s]
[INFO] Netty/Resolver/DNS ................................. SUCCESS [ 14.965 s]
[INFO] Netty/Transport/RXTX ............................... SUCCESS [  2.460 s]
[INFO] Netty/Transport/SCTP ............................... SUCCESS [  5.019 s]
[INFO] Netty/Transport/UDT ................................ SUCCESS [  4.724 s]
[INFO] Netty/Example ...................................... SUCCESS [  8.419 s]
[INFO] Netty/Transport/Native/Unix/Common ................. SUCCESS [  5.272 s]
[INFO] Netty/Testsuite .................................... SUCCESS [  6.433 s]
[INFO] Netty/Transport/Native/Unix/Common/Tests ........... SUCCESS [  5.337 s]
[INFO] Netty/Transport/Native/KQueue ...................... SUCCESS [ 26.313 s]
[INFO] Netty/All-in-One ................................... SUCCESS [  7.457 s]
[INFO] Netty/Tarball ...................................... SUCCESS [  1.681 s]
[INFO] Netty/Transport/Native/Epoll ....................... SUCCESS [  7.063 s]
[INFO] Netty/Testsuite/Autobahn ........................... SUCCESS [  3.038 s]
[INFO] Netty/Testsuite/Http2 .............................. SUCCESS [  4.000 s]
[INFO] Netty/Testsuite/OSGI ............................... SUCCESS [  4.870 s]
[INFO] Netty/Testsuite/Shading ............................ SUCCESS [ 12.622 s]
[INFO] Netty/Microbench ................................... SUCCESS [ 30.042 s]
[INFO] Netty/BOM .......................................... SUCCESS [  0.009 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:28 min
[INFO] Finished at: 2018-12-21T09:02:37+08:00
[INFO] Final Memory: 95M/759M
[INFO] ------------------------------------------------------------------------

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM