Ubuntu16中编译OpenDaylight

OpenDaylight有五个基础模块,分别是oldparent、yangtools、controller、openflowplugin和openflowjava,需要按顺序分别编译。(注意编译时需要联网)

1。准备基础环境:

安装JDK1.8.0和Maven3.6.0。

zjd@ubuntu16:~$ sudo apt-get install openjdk-8-jdk

修改环境配置:

zjd@ubuntu16:~$ sudo vim /etc/environment

在最后面加一行:JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"

重启ubuntu。

Maven安装见:https://www.cnblogs.com/zjd1396/p/9978652.html

安装完后需要更新一个配置文件:

下载文件:https://github.com/opendaylight/odlparent/blob/master/settings.xml

将文件中的内容复制到:~/.m2/settings.xml

2。下载五个模块的源码:

root@odl_ubuntu:~# mkdir /home/myCarbon

root@odl_ubuntu:/home/myCarbon# git clone https://git.opendaylight.org/gerrit/p/odlparent.git

root@odl_ubuntu:/home/myCarbon# git clone https://git.opendaylight.org/gerrit/p/yangtools.git

root@odl_ubuntu:/home/myCarbon# git clone https://git.opendaylight.org/gerrit/p/controller.git

root@odl_ubuntu:/home/myCarbon# git clone https://git.opendaylight.org/gerrit/p/openflowjava.git

root@odl_ubuntu:/home/myCarbon# git clone https://git.opendaylight.org/gerrit/p/openflowplugin.git

root@odl_ubuntu:/home/myCarbon# ll
total 28
drwxr-xr-x 7 root root 4096 Nov 18 04:43 ./
drwxr-xr-x 9 root root 4096 Nov 17 07:08 ../
drwxr-xr-x 9 root root 4096 Nov 17 08:08 controller/
drwxr-xr-x 23 root root 4096 Nov 18 04:43 odlparent/
drwxr-xr-x 15 root root 4096 Nov 18 00:32 openflowjava/
drwxr-xr-x 25 root root 4096 Nov 18 00:53 openflowplugin/
drwxr-xr-x 3 root root 4096 Nov 18 04:43 yangtools/

root@odl_ubuntu:/home/myCarbon#

然后分别进五个文件夹,分别都通过git branch -a看有哪些分支,然后都切换到carbon分支,如:

root@odl_ubuntu:/home/myCarbon/openflowjava# git checkout -b remotes/origin/stable/carbon

3。编译odlparent

进入odlparent目录执行:

root@odl_ubuntu:/home/myCarbon/odlparent# mvn clean install -DskipTests

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for odlparent 4.0.3-SNAPSHOT:
[INFO]
[INFO] ODL :: odlparent :: odlparent-lite ................. SUCCESS [ 3.069 s]
[INFO] ODL :: odlparent :: checkstyle ..................... SUCCESS [ 9.949 s]
[INFO] ODL :: odlparent :: findbugs ....................... SUCCESS [ 15.666 s]
[INFO] ODL :: odlparent :: spotbugs ....................... SUCCESS [ 5.600 s]
[INFO] ODL :: odlparent :: odl-license .................... SUCCESS [ 10.756 s]
[INFO] ODL :: odlparent :: odlparent ...................... SUCCESS [ 9.236 s]
[INFO] ODL :: odlparent :: bundle-parent .................. SUCCESS [ 6.510 s]
[INFO] ODL :: odlparent :: bundles-test-lib ............... SUCCESS [ 40.916 s]
[INFO] ODL :: odlparent :: bundles4-test .................. SUCCESS [ 6.533 s]
[INFO] ODL :: odlparent :: karaf-util ..................... SUCCESS [01:02 min]
[INFO] ODL :: odlparent :: features-test .................. SUCCESS [ 34.282 s]
[INFO] OpenDaylight :: Karaf :: Branding .................. SUCCESS [01:02 min]
[INFO] ODL :: odlparent :: karaf-plugin ................... SUCCESS [ 55.432 s]
[INFO] ODL :: odlparent :: opendaylight-karaf-resources ... SUCCESS [01:56 min]
[INFO] ODL :: odlparent :: karaf4-parent .................. SUCCESS [05:54 min]
[INFO] ODL :: odlparent :: opendaylight-karaf-empty ....... SUCCESS [03:58 min]
[INFO] ODL :: odlparent :: untested-single-feature-parent . SUCCESS [ 28.273 s]
[INFO] ODL :: odlparent :: single-feature-parent .......... SUCCESS [ 1.706 s]
[INFO] OpenDaylight :: ANTLRv4 Runtime .................... SUCCESS [ 14.907 s]
[INFO] OpenDaylight :: Apache Commons Codec ............... SUCCESS [ 8.400 s]
[INFO] OpenDaylight :: Apache Commons Lang 3 .............. SUCCESS [ 16.646 s]
[INFO] OpenDaylight :: Apache Commons Net ................. SUCCESS [ 26.579 s]
[INFO] OpenDaylight :: Apache Commons Text ................ SUCCESS [ 22.394 s]
[INFO] OpenDaylight :: Javassist .......................... SUCCESS [ 8.013 s]
[INFO] OpenDaylight :: Netty .............................. SUCCESS [01:07 min]
[INFO] OpenDaylight :: Apache SSHD ........................ SUCCESS [ 14.827 s]
[INFO] OpenDaylight :: GSON ............................... SUCCESS [ 11.540 s]
[INFO] OpenDaylight :: Guava 25 ........................... SUCCESS [ 7.881 s]
[INFO] OpenDaylight :: default Guava feature .............. SUCCESS [ 7.716 s]
[INFO] OpenDaylight :: StAX2 API .......................... SUCCESS [ 7.747 s]
[INFO] OpenDaylight :: Javax WS RS API .................... SUCCESS [ 8.291 s]
[INFO] OpenDaylight :: Jackson 2.9.x ...................... SUCCESS [01:12 min]
[INFO] OpenDaylight :: Jersey 1.x ......................... SUCCESS [ 52.887 s]
[INFO] OpenDaylight :: Servlet API ........................ SUCCESS [ 7.564 s]
[INFO] OpenDaylight :: Jersey 2.x ......................... SUCCESS [01:27 min]
[INFO] OpenDaylight :: JUNG ............................... SUCCESS [ 29.155 s]
[INFO] ODL :: odlparent :: odl-karaf-feat-jdbc ............ SUCCESS [04:38 min]
[INFO] ODL :: odlparent :: odl-karaf-feat-jetty ........... SUCCESS [ 14.108 s]
[INFO] ODL :: odlparent :: odl-karaf-feat-war ............. SUCCESS [ 7.636 s]
[INFO] OpenDaylight :: LMAX Disruptor ..................... SUCCESS [ 12.120 s]
[INFO] ODL :: odlparent :: feature-repo-parent ............ SUCCESS [ 0.385 s]
[INFO] ODL :: odlparent :: features-odlparent ............. SUCCESS [ 16.201 s]
[INFO] test-distribution .................................. SUCCESS [ 01:38 h]
[INFO] ODL :: odlparent :: karaf-aggregator ............... SUCCESS [ 2.669 s]
[INFO] Scala Runtime for OpenDaylight ..................... SUCCESS [05:14 min]
[INFO] Akka Actor Framework System Bundles ................ SUCCESS [ 12.169 s]
[INFO] Akka Clustering .................................... SUCCESS [ 10.412 s]
[INFO] LevelDB 0.7 ........................................ SUCCESS [ 9.653 s]
[INFO] Akka Persistence ................................... SUCCESS [ 21.142 s]
[INFO] OpenDaylight :: Akka :: All ........................ SUCCESS [ 9.872 s]
[INFO] LevelDB 0.10 ....................................... SUCCESS [ 29.128 s]
[INFO] ODL :: odlparent :: features-akka .................. SUCCESS [ 8.287 s]
[INFO] ODL :: odlparent :: odl-karaf-feat-feature ......... SUCCESS [ 18.870 s]
[INFO] ODL :: odlparent :: odlparent-bundle-check ......... SUCCESS [ 48.004 s]
[INFO] ODL :: odlparent :: odl-bundle-test ................ SUCCESS [ 14.988 s]
[INFO] ODL :: odlparent :: features-aggregator ............ SUCCESS [ 0.064 s]
[INFO] ODL :: odlparent :: odlparent-artifacts ............ SUCCESS [ 0.053 s]
[INFO] ODL :: odlparent :: odlparent-dependency-check ..... SUCCESS [08:01 min]
[INFO] odlparent .......................................... SUCCESS [ 0.072 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:26 h
[INFO] Finished at: 2018-11-18T08:01:39-08:00
[INFO] ------------------------------------------------------------------------

4。编译yangtools

进入yangtools目录执行:

root@odl_ubuntu:/home/myCarbon/yangtools# mvn clean install -DskipTests

最后:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] yangtools-artifacts 2.1.4-SNAPSHOT ................. SUCCESS [ 0.703 s]
[INFO] mockito-configuration 2.1.4-SNAPSHOT ............... SUCCESS [ 46.220 s]
[INFO] bundle-parent 2.1.4-SNAPSHOT ....................... SUCCESS [ 4.904 s]
[INFO] concepts 2.1.4-SNAPSHOT ............................ SUCCESS [02:49 min]
[INFO] util 2.1.4-SNAPSHOT ................................ SUCCESS [03:13 min]
[INFO] yang-common 2.1.4-SNAPSHOT ......................... SUCCESS [01:11 min]
[INFO] yang-model-api 2.1.4-SNAPSHOT ...................... SUCCESS [01:23 min]
[INFO] yang-data-api 2.1.4-SNAPSHOT ....................... SUCCESS [ 50.653 s]
[INFO] odlext-model-api 2.1.4-SNAPSHOT .................... SUCCESS [ 22.221 s]
[INFO] yang-model-util 2.1.4-SNAPSHOT ..................... SUCCESS [01:29 min]
[INFO] yang-parser-api 2.1.4-SNAPSHOT ..................... SUCCESS [ 20.602 s]
[INFO] yang-parser-spi 2.1.4-SNAPSHOT ..................... SUCCESS [ 33.830 s]
[INFO] yang-parser-reactor 2.1.4-SNAPSHOT ................. SUCCESS [ 11.472 s]
[INFO] openconfig-model-api 2.1.4-SNAPSHOT ................ SUCCESS [ 16.936 s]
[INFO] yang-parser-rfc7950 2.1.4-SNAPSHOT ................. SUCCESS [01:14 min]
[INFO] odlext-parser-support 2.1.4-SNAPSHOT ............... SUCCESS [ 17.974 s]
[INFO] openconfig-parser-support 2.1.4-SNAPSHOT ........... SUCCESS [ 30.279 s]
[INFO] rfc6536-model-api 2.1.4-SNAPSHOT ................... SUCCESS [ 19.150 s]
[INFO] rfc6536-parser-support 2.1.4-SNAPSHOT .............. SUCCESS [ 21.214 s]
[INFO] rfc7952-model-api 2.1.4-SNAPSHOT ................... SUCCESS [ 20.504 s]
[INFO] rfc7952-parser-support 2.1.4-SNAPSHOT .............. SUCCESS [ 17.392 s]
[INFO] rfc8040-model-api 2.1.4-SNAPSHOT ................... SUCCESS [ 15.844 s]
[INFO] rfc8040-parser-support 2.1.4-SNAPSHOT .............. SUCCESS [ 16.654 s]
[INFO] yang-parser-impl 2.1.4-SNAPSHOT .................... SUCCESS [01:23 min]
[INFO] yang-test-util 2.1.4-SNAPSHOT ...................... SUCCESS [ 19.260 s]
[INFO] yang-data-util 2.1.4-SNAPSHOT ...................... SUCCESS [ 46.700 s]
[INFO] yang-data-impl 2.1.4-SNAPSHOT ...................... SUCCESS [ 26.868 s]
[INFO] benchmarks 2.1.4-SNAPSHOT .......................... SUCCESS [ 40.246 s]
[INFO] checkstyle-logging 2.1.4-SNAPSHOT .................. SUCCESS [ 9.880 s]
[INFO] testutils 2.1.4-SNAPSHOT ........................... SUCCESS [ 21.436 s]
[INFO] common-aggregator 2.1.4-SNAPSHOT ................... SUCCESS [ 0.026 s]
[INFO] triemap 1.1.4-SNAPSHOT ............................. SUCCESS [ 15.635 s]
[INFO] OpenDaylight :: Yangtools :: TrieMap 1.1.4-SNAPSHOT SUCCESS [02:09 min]
[INFO] OpenDaylight :: Yangtools :: Utilities 2.1.4-SNAPSHOT SUCCESS [ 8.347 s]
[INFO] OpenDaylight :: Yangtools :: Common definitions 2.1.4-SNAPSHOT SUCCESS [ 13.750 s]
[INFO] OpenDaylight :: Yangtools :: Parser API 2.1.4-SNAPSHOT SUCCESS [ 13.602 s]
[INFO] OpenDaylight :: Yangtools :: Data API 2.1.4-SNAPSHOT SUCCESS [ 8.313 s]
[INFO] yang-data-transform 2.1.4-SNAPSHOT ................. SUCCESS [01:15 min]
[INFO] OpenDaylight :: Yangtools :: Data Reference Implementation 2.1.4-SNAPSHOT SUCCESS [ 9.128 s]
[INFO] yang-data-codec-xml 2.1.4-SNAPSHOT ................. SUCCESS [01:10 min]
[INFO] yang-data-codec-gson 2.1.4-SNAPSHOT ................ SUCCESS [ 24.550 s]
[INFO] OpenDaylight :: Yangtools :: Data Codecs 2.1.4-SNAPSHOT SUCCESS [ 8.135 s]
[INFO] yang-model-export 2.1.4-SNAPSHOT ................... SUCCESS [ 16.099 s]
[INFO] OpenDaylight :: Yangtools :: Export 2.1.4-SNAPSHOT . SUCCESS [ 13.077 s]
[INFO] OpenDaylight :: Yangtools :: Parser 2.1.4-SNAPSHOT . SUCCESS [ 8.095 s]
[INFO] yang-data-jaxen 2.1.4-SNAPSHOT ..................... SUCCESS [ 15.931 s]
[INFO] OpenDaylight :: Yangtools :: XPath support 2.1.4-SNAPSHOT SUCCESS [ 7.948 s]
[INFO] OpenDaylight :: Yangtools :: Stable Features 2.1.4-SNAPSHOT SUCCESS [ 8.106 s]
[INFO] yang-xpath-api 0.2.4-SNAPSHOT ...................... SUCCESS [ 21.558 s]
[INFO] OpenDaylight :: Yangtools :: Experimental :: XPath API 0.2.4-SNAPSHOT SUCCESS [ 8.343 s]
[INFO] yang-xpath-impl 0.2.4-SNAPSHOT ..................... SUCCESS [ 17.755 s]
[INFO] OpenDaylight :: Yangtools :: Experimental :: XPath API implementation 0.2.4-SNAPSHOT SUCCESS [ 9.906 s]
[INFO] OpenDaylight :: Yangtools :: Experimental Features 2.1.4-SNAPSHOT SUCCESS [ 8.128 s]
[INFO] features 2.1.4-SNAPSHOT ............................ SUCCESS [ 0.078 s]
[INFO] yang-maven-plugin-spi 2.1.4-SNAPSHOT ............... SUCCESS [ 23.011 s]
[INFO] yang-maven-plugin 2.1.4-SNAPSHOT ................... SUCCESS [01:15 min]
[INFO] yang-maven-plugin-it 2.1.4-SNAPSHOT ................ SUCCESS [ 34.609 s]
[INFO] yang-model-immutable 2.1.4-SNAPSHOT ................ SUCCESS [ 17.232 s]
[INFO] yang-model-validator 2.1.4-SNAPSHOT ................ SUCCESS [01:35 min]
[INFO] yang-aggregator 2.1.4-SNAPSHOT ..................... SUCCESS [ 0.055 s]
[INFO] yang-validation-tool 2.1.4-SNAPSHOT ................ SUCCESS [ 17.295 s]
[INFO] third-party-aggregator 2.1.4-SNAPSHOT .............. SUCCESS [ 0.056 s]
[INFO] yangtools 2.1.4-SNAPSHOT ........................... SUCCESS [ 0.044 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34:39 min
[INFO] Finished at: 2018-11-18T17:56:27-08:00
[INFO] ------------------------------------------------------------------------
root@odl_ubuntu:/home/myCarbon/yangtools#

5。编译controller

进如下目录执行如下编译命令:

root@odl_ubuntu:/home/myCarbon/controller/karaf# mvn clean install -DskipTests

最后:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37:12 min
[INFO] Finished at: 2018-11-18T02:18:33-08:00
[INFO] ------------------------------------------------------------------------

也可以直接在controller文件夹中执行mvn clean install -DskipTests

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] mdsal-artifacts 1.9.0-SNAPSHOT ..................... SUCCESS [ 27.310 s]
[INFO] mdsal-parent 1.9.0-SNAPSHOT ........................ SUCCESS [01:44 min]
[INFO] sal-common-api 1.9.0-SNAPSHOT ...................... SUCCESS [02:05 min]
[INFO] sal-common-util 1.9.0-SNAPSHOT ..................... SUCCESS [ 24.811 s]
[INFO] sal-common-impl 1.9.0-SNAPSHOT ..................... SUCCESS [ 46.535 s]
[INFO] sal-test-model 1.9.0-SNAPSHOT ...................... SUCCESS [01:00 min]
[INFO] sal-core-api 1.9.0-SNAPSHOT ........................ SUCCESS [ 18.290 s]
[INFO] sal-core-spi 1.9.0-SNAPSHOT ........................ SUCCESS [ 30.721 s]
[INFO] sal-binding-api 1.9.0-SNAPSHOT ..................... SUCCESS [ 29.062 s]
[INFO] sal-core-compat 1.9.0-SNAPSHOT ..................... SUCCESS [ 26.634 s]
[INFO] sal-inmemory-datastore 1.9.0-SNAPSHOT .............. SUCCESS [ 33.331 s]
[INFO] sal-broker-impl 1.9.0-SNAPSHOT ..................... SUCCESS [ 39.626 s]
[INFO] sal-binding-util 1.9.0-SNAPSHOT .................... SUCCESS [ 24.267 s]
[INFO] sal-binding-broker-impl 1.9.0-SNAPSHOT ............. SUCCESS [01:24 min]
[INFO] sample-toaster 1.9.0-SNAPSHOT ...................... SUCCESS [ 54.506 s]
[INFO] sample-toaster-consumer 1.9.0-SNAPSHOT ............. SUCCESS [ 26.118 s]
[INFO] sample-toaster-provider 1.9.0-SNAPSHOT ............. SUCCESS [ 32.707 s]
[INFO] sal-parent 1.9.0-SNAPSHOT .......................... SUCCESS [  0.123 s]
[INFO] sal-samples 1.9.0-SNAPSHOT ......................... SUCCESS [  0.056 s]
[INFO] clustering-it 1.9.0-SNAPSHOT ....................... SUCCESS [  0.036 s]
[INFO] clustering-it-config 1.9.0-SNAPSHOT ................ SUCCESS [ 53.830 s]
[INFO] clustering-it-model 1.9.0-SNAPSHOT ................. SUCCESS [ 52.009 s]
[INFO] sal-clustering-commons 1.9.0-SNAPSHOT .............. SUCCESS [01:00 min]
[INFO] sal-akka-raft 1.9.0-SNAPSHOT ....................... SUCCESS [ 42.696 s]
[INFO] cds-access-api 1.5.0-SNAPSHOT ...................... SUCCESS [ 31.839 s]
[INFO] cds-access-client 1.5.0-SNAPSHOT ................... SUCCESS [ 25.006 s]
[INFO] cds-dom-api 1.5.0-SNAPSHOT ......................... SUCCESS [ 21.171 s]
[INFO] sal-akka-raft-example 1.9.0-SNAPSHOT ............... SUCCESS [ 21.484 s]
[INFO] sal-distributed-datastore 1.9.0-SNAPSHOT ........... SUCCESS [01:29 min]
[INFO] clustering-it-provider 1.9.0-SNAPSHOT .............. SUCCESS [ 27.297 s]
[INFO] config-subsystem 0.10.0-SNAPSHOT ................... SUCCESS [  0.328 s]
[INFO] netty-config-api 0.10.0-SNAPSHOT ................... SUCCESS [  6.904 s]
[INFO] netty-event-executor-config 0.10.0-SNAPSHOT ........ SUCCESS [  8.757 s]
[INFO] netty-threadgroup-config 0.10.0-SNAPSHOT ........... SUCCESS [  8.592 s]
[INFO] netty-timer-config 0.10.0-SNAPSHOT ................. SUCCESS [  8.089 s]
[INFO] threadpool-config-api 0.10.0-SNAPSHOT .............. SUCCESS [  8.044 s]
[INFO] threadpool-config-impl 0.10.0-SNAPSHOT ............. SUCCESS [  8.533 s]
[INFO] OpenDaylight :: Config-Netty 0.10.0-SNAPSHOT ....... SUCCESS [ 27.325 s]
[INFO] OpenDaylight :: MDSAL :: Common 1.9.0-SNAPSHOT ..... SUCCESS [ 11.224 s]
[INFO] sal-connector-api 1.9.0-SNAPSHOT ................... SUCCESS [ 19.175 s]
[INFO] blueprint 0.10.0-SNAPSHOT .......................... SUCCESS [ 57.480 s]
[INFO] OpenDaylight :: MDSAL :: Broker 1.9.0-SNAPSHOT ..... SUCCESS [ 13.348 s]
[INFO] odl-mdsal-clustering-commons 1.9.0-SNAPSHOT ........ SUCCESS [ 10.761 s]
[INFO] sal-remoterpc-connector 1.9.0-SNAPSHOT ............. SUCCESS [ 44.751 s]
[INFO] odl-mdsal-remoterpc-connector 1.9.0-SNAPSHOT ....... SUCCESS [  9.708 s]
[INFO] sal-cluster-admin-api 1.9.0-SNAPSHOT ............... SUCCESS [ 36.822 s]
[INFO] sal-cluster-admin-impl 1.9.0-SNAPSHOT .............. SUCCESS [ 29.582 s]
[INFO] odl-mdsal-distributed-datastore 1.9.0-SNAPSHOT ..... SUCCESS [ 10.246 s]
[INFO] sal-clustering-config 1.9.0-SNAPSHOT ............... SUCCESS [  7.010 s]
[INFO] odl-mdsal-broker 1.9.0-SNAPSHOT .................... SUCCESS [ 10.490 s]
[INFO] odl-clustering-test-app 1.9.0-SNAPSHOT ............. SUCCESS [  9.223 s]
[INFO] model-inventory 1.9.0-SNAPSHOT ..................... SUCCESS [ 12.227 s]
[INFO] OpenDaylight :: MD-SAL :: Inventory Model 1.9.0-SNAPSHOT SUCCESS [ 14.076 s]
[INFO] OpenDaylight :: Toaster 1.9.0-SNAPSHOT ............. SUCCESS [ 10.861 s]
[INFO] odl-mdsal-all 1.9.0-SNAPSHOT ....................... SUCCESS [ 14.396 s]
[INFO] odl-mdsal-clustering 1.9.0-SNAPSHOT ................ SUCCESS [  9.751 s]
[INFO] model-topology 1.9.0-SNAPSHOT ...................... SUCCESS [ 11.411 s]
[INFO] OpenDaylight :: MD-SAL :: Topology Model 1.9.0-SNAPSHOT SUCCESS [ 15.784 s]
[INFO] messagebus-api 1.9.0-SNAPSHOT ...................... SUCCESS [ 29.288 s]
[INFO] messagebus-spi 1.9.0-SNAPSHOT ...................... SUCCESS [ 21.339 s]
[INFO] messagebus-util 1.9.0-SNAPSHOT ..................... SUCCESS [02:07 min]
[INFO] messagebus-impl 1.9.0-SNAPSHOT ..................... SUCCESS [ 22.072 s]
[INFO] odl-message-bus-collector 1.9.0-SNAPSHOT ........... SUCCESS [ 14.442 s]
[INFO] features-mdsal 1.9.0-SNAPSHOT ...................... SUCCESS [  9.143 s]
[INFO] mdsal-it-base 1.9.0-SNAPSHOT ....................... SUCCESS [ 29.963 s]
[INFO] mdsal-it-parent 1.9.0-SNAPSHOT ..................... SUCCESS [  1.301 s]
[INFO] sample-toaster-it 1.9.0-SNAPSHOT ................... SUCCESS [  8.770 s]
[INFO] sal-dummy-distributed-datastore 1.9.0-SNAPSHOT ..... SUCCESS [ 37.327 s]
[INFO] sal-binding-it 1.9.0-SNAPSHOT ...................... SUCCESS [ 14.468 s]
[INFO] sal-binding-dom-it 1.9.0-SNAPSHOT .................. SUCCESS [ 25.658 s]
[INFO] mdsal-trace-api 1.9.0-SNAPSHOT ..................... SUCCESS [ 28.224 s]
[INFO] mdsal-trace-dom-impl 1.9.0-SNAPSHOT ................ SUCCESS [ 26.495 s]
[INFO] mdsal-trace-binding-impl 1.9.0-SNAPSHOT ............ SUCCESS [ 17.547 s]
[INFO] mdsal-trace-cli 1.9.0-SNAPSHOT ..................... SUCCESS [ 14.239 s]
[INFO] OpenDaylight :: TracingBroker 1.9.0-SNAPSHOT ....... SUCCESS [  9.480 s]
[INFO] OpenDaylight :: TracingBroker 1.9.0-SNAPSHOT ....... SUCCESS [ 11.842 s]
[INFO] mdsal-trace-feature-aggregator 1.9.0-SNAPSHOT ...... SUCCESS [  0.020 s]
[INFO] mdsaltrace 1.9.0-SNAPSHOT .......................... SUCCESS [  0.011 s]
[INFO] config-artifacts 0.10.0-SNAPSHOT ................... SUCCESS [ 20.642 s]
[INFO] model-aggregator 1.9.0-SNAPSHOT .................... SUCCESS [  0.036 s]
[INFO] benchmark-api 1.7.0-SNAPSHOT ....................... SUCCESS [ 12.857 s]
[INFO] dsbenchmark 1.7.0-SNAPSHOT ......................... SUCCESS [ 10.358 s]
[INFO] ntfbenchmark 1.7.0-SNAPSHOT ........................ SUCCESS [  8.925 s]
[INFO] rpcbenchmark 1.7.0-SNAPSHOT ........................ SUCCESS [  8.813 s]
[INFO] benchmark-artifacts 1.7.0-SNAPSHOT ................. SUCCESS [  0.067 s]
[INFO] benchmark-aggregator 1.7.0-SNAPSHOT ................ SUCCESS [  0.027 s]
[INFO] odl-jolokia-osgi 0.9.0-SNAPSHOT .................... SUCCESS [  6.780 s]
[INFO] Jolokia JMX/HTTP bridge 1.12.0-SNAPSHOT ............ SUCCESS [  8.948 s]
[INFO] OpenDaylight :: Extras :: All 1.12.0-SNAPSHOT ...... SUCCESS [ 13.784 s]
[INFO] features-extras 1.12.0-SNAPSHOT .................... SUCCESS [ 10.280 s]
[INFO] distribution.opendaylight-karaf 1.12.0-SNAPSHOT .... SUCCESS [ 39.574 s]
[INFO] features-config-netty 0.10.0-SNAPSHOT .............. SUCCESS [ 16.828 s]
[INFO] features-config-netty-aggregator 0.10.0-SNAPSHOT ... SUCCESS [  0.020 s]
[INFO] features-mdsal-aggregator 1.9.0-SNAPSHOT ........... SUCCESS [  0.023 s]
[INFO] features-extras-aggregator 1.12.0-SNAPSHOT ......... SUCCESS [  0.013 s]
[INFO] OpenDaylight :: Benchmark :: API 1.7.0-SNAPSHOT .... SUCCESS [  9.388 s]
[INFO] OpenDaylight :: dsbenchmark 1.7.0-SNAPSHOT ......... SUCCESS [  9.904 s]
[INFO] OpenDaylight :: ntfbenchmark 1.7.0-SNAPSHOT ........ SUCCESS [  9.793 s]
[INFO] OpenDaylight :: MD-SAL :: benchmark 1.7.0-SNAPSHOT . SUCCESS [ 10.971 s]
[INFO] features-mdsal-benchmark 1.7.0-SNAPSHOT ............ SUCCESS [ 14.711 s]
[INFO] features-mdsal-benchmark-aggregator 1.7.0-SNAPSHOT . SUCCESS [  0.015 s]
[INFO] features-controller 1.12.0-SNAPSHOT ................ SUCCESS [  0.013 s]
[INFO] archetypes-parent 0.9.0-SNAPSHOT ................... SUCCESS [  0.682 s]
[INFO] opendaylight-startup-archetype 1.7.0-SNAPSHOT ...... SUCCESS [ 39.600 s]
[INFO] controller 0.9.0-SNAPSHOT .......................... SUCCESS [  0.026 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  42:14 min
[INFO] Finished at: 2018-11-19T05:25:25-08:00
[INFO] ------------------------------------------------------------------------
root@odl_ubuntu:/home/myCarbon/controller#

现在可以测试一下,进如下目录执行如下命令启动controller:

root@odl_ubuntu:/home/myCarbon/controller/karaf/target/assembly/bin# ./karaf
Apache Karaf starting up. Press Enter to open the shell now...

100% [========================================================================]

Karaf started in 49s. Bundle stats: 15 active, 15 total

________ ________ .__ .__ .__ __
\_____ \ ______ ____ ____ \______ \ _____ ___.__.| | |__| ____ | |___/ |_
/ | \\____ \_/ __ \ / \ | | \\__ \< | || | | |/ ___\| | \ __\
/ | \ |_> > ___/| | \| ` \/ __ \\___ || |_| / /_/ > Y \ |
\_______ / __/ \___ >___| /_______ (____ / ____||____/__\___ /|___| /__|
\/|__| \/ \/ \/ \/\/ /_____/ \/


Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.

opendaylight-user@root>

6。编译openflowplugin

 进入如下目执行如下命令:

root@odl_ubuntu:/home/myCarbon/openflowplugin# mvn clean install -DskipTests

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for openflowplugin 0.8.0-SNAPSHOT:
[INFO]
[INFO] openflowplugin-artifacts ........................... SUCCESS [ 3.033 s]
[INFO] openflowplugin-parent .............................. SUCCESS [ 37.889 s]
[INFO] libraries .......................................... SUCCESS [ 0.509 s]
[INFO] liblldp ............................................ SUCCESS [01:46 min]
[INFO] ODL :: openflowjava :: openflow-protocol-api ....... SUCCESS [03:08 min]
[INFO] openflowjava-parent ................................ SUCCESS [ 9.378 s]
[INFO] ODL :: openflowjava :: openflow-protocol-spi ....... SUCCESS [ 26.945 s]
[INFO] ODL :: openflowjava :: openflowjava-util ........... SUCCESS [ 23.332 s]
[INFO] ODL :: openflowjava :: openflow-protocol-impl ...... SUCCESS [02:49 min]
[INFO] ODL :: openflowjava :: openflowjava-blueprint-config SUCCESS [ 6.514 s]
[INFO] ODL :: openflowjava :: odl-openflowjava-protocol ... SUCCESS [ 15.131 s]
[INFO] ODL :: openflowjava :: features-openflowjava ....... SUCCESS [ 8.121 s]
[INFO] ODL :: openflowjava :: features-openflowjava-aggregator SUCCESS [ 0.023 s]
[INFO] simple-client ...................................... SUCCESS [01:12 min]
[INFO] ODL :: openflowjava :: openflow-protocol-it ........ SUCCESS [ 7.383 s]
[INFO] model-parent ....................................... SUCCESS [ 0.462 s]
[INFO] model-flow-base .................................... SUCCESS [02:21 min]
[INFO] model-flow-service ................................. SUCCESS [03:21 min]
[INFO] model-flow-statistics .............................. SUCCESS [ 59.928 s]
[INFO] openflowplugin-api ................................. SUCCESS [ 50.602 s]
[INFO] openflowplugin-extension-parent .................... SUCCESS [ 3.643 s]
[INFO] openflowplugin-extension-api ....................... SUCCESS [02:42 min]
[INFO] openflowplugin ..................................... SUCCESS [03:55 min]
[INFO] openflowplugin-common .............................. SUCCESS [ 17.512 s]
[INFO] openflowplugin-impl ................................ SUCCESS [02:08 min]
[INFO] openflowjava-extension-nicira-api .................. SUCCESS [ 20.474 s]
[INFO] openflowjava-extension-nicira ...................... SUCCESS [01:05 min]
[INFO] openflowplugin-extension-nicira .................... SUCCESS [02:47 min]
[INFO] openflowplugin-extension-onf ....................... SUCCESS [ 24.707 s]
[INFO] test-extension ..................................... SUCCESS [ 19.055 s]
[INFO] OpenDaylight :: OpenflowPlugin :: NSF :: Model ..... SUCCESS [ 9.862 s]
[INFO] OpenDaylight :: Openflow Plugin :: Libraries ....... SUCCESS [ 7.914 s]
[INFO] openflowplugin-blueprint-config .................... SUCCESS [ 6.305 s]
[INFO] OpenDaylight :: Openflow Plugin :: Li southbound API implementation SUCCESS [01:00 min]
[INFO] OpenDaylight :: Openflow Plugin :: Nicira Extensions SUCCESS [ 8.579 s]
[INFO] OpenDaylight :: Openflow Plugin :: ONF Extensions .. SUCCESS [ 9.245 s]
[INFO] features-openflowplugin-extension .................. SUCCESS [ 8.157 s]
[INFO] features-extension-aggregator ...................... SUCCESS [ 0.018 s]
[INFO] test-provider ...................................... SUCCESS [ 42.999 s]
[INFO] test-common ........................................ SUCCESS [ 23.394 s]
[INFO] drop-test-karaf .................................... SUCCESS [ 16.543 s]
[INFO] applications ....................................... SUCCESS [ 0.388 s]
[INFO] bulk-o-matic ....................................... SUCCESS [ 34.027 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - bulk flow operations support SUCCESS [ 7.986 s]
[INFO] device-ownership-service ........................... SUCCESS [ 14.837 s]
[INFO] of-switch-config-pusher ............................ SUCCESS [ 15.479 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - default config-pusher SUCCESS [ 8.020 s]
[INFO] reconciliation-framework ........................... SUCCESS [ 20.365 s]
[INFO] arbitratorreconciliation-api ....................... SUCCESS [ 19.049 s]
[INFO] arbitratorreconciliation-impl ...................... SUCCESS [ 22.363 s]
[INFO] forwardingrules-manager ............................ SUCCESS [ 32.435 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - FRM SUCCESS [ 7.988 s]
[INFO] forwardingrules-sync ............................... SUCCESS [ 33.750 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - FRS SUCCESS [ 12.649 s]
[INFO] notification-supplier .............................. SUCCESS [ 23.110 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - notifications supplier SUCCESS [ 8.079 s]
[INFO] table-miss-enforcer ................................ SUCCESS [ 16.290 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - table-miss-enforcer SUCCESS [ 7.976 s]
[INFO] topology-lldp-discovery ............................ SUCCESS [ 21.297 s]
[INFO] lldp-speaker ....................................... SUCCESS [ 28.869 s]
[INFO] topology-manager ................................... SUCCESS [ 24.627 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - topology SUCCESS [ 13.079 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - LLDP Speaker SUCCESS [ 7.911 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - Topology LLDP Discovery SUCCESS [ 7.856 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - Topology Manager SUCCESS [ 7.920 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - Reconciliation Framework SUCCESS [ 7.931 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - Arbitrator Reconciliation SUCCESS [ 7.827 s]
[INFO] OpenDaylight :: Openflow Plugin :: Flow Services ... SUCCESS [ 7.790 s]
[INFO] OpenDaylight :: Openflow Plugin :: Drop Test ....... SUCCESS [ 8.061 s]
[INFO] OpenDaylight :: Openflow Plugin :: Flow Services :: REST SUCCESS [01:21 min]
[INFO] southbound-cli ..................................... SUCCESS [ 25.524 s]
[INFO] OpenDaylight :: Openflow Plugin :: Application - Southbound CLI SUCCESS [ 7.931 s]
[INFO] features-openflowplugin ............................ SUCCESS [ 8.330 s]
[INFO] features-aggregator ................................ SUCCESS [ 0.033 s]
[INFO] ODL :: openflowplugin :: arbitratorreconciliation-aggregator SUCCESS [ 0.253 s]
[INFO] learning-switch .................................... SUCCESS [ 19.569 s]
[INFO] sample-consumer .................................... SUCCESS [ 19.830 s]
[INFO] sample-bundles ..................................... SUCCESS [ 22.732 s]
[INFO] openflowplugin-samples-parent ...................... SUCCESS [ 0.257 s]
[INFO] openflowplugin-karaf ............................... SUCCESS [03:22 min]
[INFO] openflowplugin ..................................... SUCCESS [ 1.047 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 50:12 min
[INFO] Finished at: 2018-11-18T18:49:53-08:00
[INFO] ------------------------------------------------------------------------
root@odl_ubuntu:/home/myCarbon/openflowplugin#

7。最后编译openflowjava

进入如下目执行如下命令:

root@odl_ubuntu:/home/myCarbon/openflowjava# mvn clean install -DskipTests

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for openflowjava-aggregator 0.9.0-Carbon:
[INFO]
[INFO] openflowjava-artifacts ............................. SUCCESS [  3.862 s]
[INFO] Openflow Protocol Library - API .................... SUCCESS [05:15 min]
[INFO] openflowjava ....................................... SUCCESS [ 23.379 s]
[INFO] Openflow Protocol Library - SPI .................... SUCCESS [ 51.752 s]
[INFO] openflowjava-util .................................. SUCCESS [ 10.547 s]
[INFO] Openflow Protocol Library - IMPL ................... SUCCESS [01:10 min]
[INFO] Openflow Protocol Library - Blueprint Config ....... SUCCESS [  7.456 s]
[INFO] Openflow Protocol Library - CONFIG ................. SUCCESS [  6.200 s]
[INFO] features-openflowjava .............................. SUCCESS [03:27 min]
[INFO] OpenDaylight :: Openflow Java :: Protocol .......... SUCCESS [ 29.768 s]
[INFO] OpenDaylight :: Openflow Java :: All ............... SUCCESS [  6.763 s]
[INFO] features4-openflowjava ............................. SUCCESS [  6.723 s]
[INFO] features-aggregator ................................ SUCCESS [  0.094 s]
[INFO] Openflow Protocol Simple Client .................... SUCCESS [ 13.701 s]
[INFO] Openflow Protocol Integration Test ................. SUCCESS [  8.796 s]
[INFO] openflowjava-aggregator ............................ SUCCESS [ 15.144 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13:25 min
[INFO] Finished at: 2018-11-19T18:56:40-08:00
[INFO] ------------------------------------------------------------------------
root@odl_ubuntu:/home/myCarbon/openflowjava#

实际上openflowjava一直编译不通过。后来又git了

affinity bgpcep lispflowmapping
三个工程,都编译通过后,才将openflowjava编译通过。
posted @ 2018-11-18 19:55  鸟瞰的鸟  阅读(649)  评论(0编辑  收藏  举报