OpenDaylight開發hello-world項目之開發工具安裝


OpenDaylight開發hello-world項目之開發環境搭建

OpenDaylight開發hello-world項目之開發工具安裝

OpenDaylight開發hello-world項目之代碼框架搭建

OpenDaylight開發hello-world項目之功能實現

 

 

 在ODL開發之前,要安裝好開發環境。ODL使用java語言開發,所以要安裝好java。ODL的代碼框架是有maven這個工具來管理的,所以要在開發之前安裝Java和maven。

 

 

 

Maven簡介:

 

Maven是一個項目管理和綜合工具。Maven提供了開發人員構建一個完整的生命周期框架。開發團隊可以自動完成項目的基礎工具建設,Maven使用標准的目錄結構和默認構建生命周期。

在多個開發團隊環境時,Maven可以設置按標准在非常短的時間里完成配置工作。由於大部分項目的設置都很簡單,並且可重復使用,Maven讓開發人員的工作更輕松,同時創建報表,檢查,構建和測試自動化設置。

 

原文出自【易百教程】,更多內容請訪問:https://www.yiibai.com/maven

 

 

一、安裝Java

 

apt update

 

 

apt install openjdk-8-jdk

 

java -version

 

 

 二、安裝maven

apt install maven

 

查看mvn版本

 

mvn -v

 

配置mvn的setting.xmlwen文件,能夠獲取ODL創建時需要的jar包 

wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml

 

 

 

setting.xml文件

<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=2 tabstop=2: -->
<!-- Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html -->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <profiles>
    <profile>
      <id>opendaylight-release</id>
      <repositories>
        <repository>
          <id>opendaylight-mirror</id>
          <name>opendaylight-mirror</name>
          <url>https://nexus.opendaylight.org/content/repositories/public/</url>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>opendaylight-mirror</id>
          <name>opendaylight-mirror</name>
          <url>https://nexus.opendaylight.org/content/repositories/public/</url>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>

    <profile>
      <id>opendaylight-snapshots</id>
      <repositories>
        <repository>
          <id>opendaylight-snapshot</id>
          <name>opendaylight-snapshot</name>
          <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>opendaylight-snapshot</id>
          <name>opendaylight-snapshot</name>
          <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>

  <activeProfiles>
    <activeProfile>opendaylight-release</activeProfile>
    <activeProfile>opendaylight-snapshots</activeProfile>
  </activeProfiles>
</settings>

 


免責聲明!

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



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