ONOS开发笔记

开发环境

  Win10+ VMware+ Ubuntu 14.04 LTS 64bit Desktop

  虚机详细信息:

    hostname: build

    user: sdn

    passwd: rocks

    2GB RAM, 2 core cpu, 10GB DISK, 1 NAT interface

Install required software

  build:~$ ssh-keygen -t rsa

Install Git:

  build:~$ sudo apt-get install git-core

Download the Karaf 3.0.3 and Maven 3.3.1 binaries:

build:~$ cd; mkdir Downloads Applications

build:~$ cd Downloads

build:~$ wget http://archive.apache.org/dist/karaf/3.0.3/apache-karaf-3.0.3.tar.gz

build:~$ wget http://archive.apache.org/dist/maven/maven-3/3.3.1/binaries/apache-maven-3.3.1-bin.tar.gz

build:~$ tar -zxvf apache-karaf-3.0.3.tar.gz -C ../Applications/

build:~$ tar -zxvf apache-maven-3.3.1-bin.tar.gz -C ../Applications/  

install Oracle Java 8:

build:~$ sudo apt-get install software-properties-common -y

build:~$ sudo add-apt-repository ppa:webupd8team/java -y

  报错: Cannot add PPA: 'ppa:webupd8team/java'.

      Please check that the PPA name or format is correct.

    解决: build:~$ sudo apt-get install --reinstall ca-certificates

build:~$ sudo apt-get update

build:~$ sudo apt-get install oracle-java8-installer oracle-java8-set-default -y

  报错: Oracle JDK 8 is NOT installed.

  解决: 以上两个软件按前后依次安装。若中断,则恢复

        build:~$ sudo dpkg --configure -a    

clone the ONOS source to the build machine's home directory:

  build:~$ git clone https://gerrit.onosproject.org/onos

 

Set up your build environment

 

  adding the following line to it at the end of .bashrc:

    . ~/onos/tools/dev/bash_profile

  Edit ~/Applications/apache-karaf-3.0.3/etc/org.apache.karaf.features.cfg by appending the following line to featuresRepositories:

    mvn:org.onosproject/onos-features/1.2.0-SNAPSHOT/xml/features

  build ONOS with Maven:

    build:~$ cd ~/onos

    build:~$ mvn clean install  # or use the alias 'mci'

打包:mvn package
编译:mvn compile
编译测试程序:mvn test-compile
清空:mvn clean
运行测试:mvn test
生成站点目录: mvn site
生成站点目录并发布:mvn site-deploy
安装当前工程的输出文件到本地仓库: mvn install

  

  

    

 

 

 

 
posted @ 2015-12-09 22:17  lsyu  阅读(541)  评论(0编辑  收藏  举报