当前位置:网站首页>ODL framework project construction trial -demo
ODL framework project construction trial -demo
2022-07-03 06:09:00 【vincentwc】
Preface
Recently started using odl frame , For rigid contact odl I still need a little adaptation period , Feeling odl Compared with spring Too little , Record your learning experience here
One 、 Code acquisition
github Address Let's sun it out first , Those who are interested can go and have a look
odl Learning documents , It's provided on the official website toaster\demo, If you are interested, you can have a look at
Two 、 Step breakdown
First step , modify maven Of settings.xml file ,odl The compilation of requires setting Configure the corresponding remote library in the file , The settings Documents can be obtained from odlparent Get... From the project , Replace setting file , Add your corresponding local warehouse address , You can start
The second step , Create project ,cmd Go to the appropriate directory , Then enter the following command , Start project creation , As shown below .
Enter the command line :
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeRepository=https://nexus.opendaylight.org/content/repositories/opendaylight.release -DarchetypeCatalog=remote -DarchetypeVersion=1.0.1-Lithium-SR1 -DarchetypeCatalog=internal
F:\odlLearn>mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeRepository=https://nexus.opendaylight.org/content/repositories/opendaylight.release -DarchetypeCatalog=remote -DarchetypeVersion=1.0.1-Lithium-SR1 -DarchetypeCatalog=internal
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.1.2:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.1.2:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO]
[INFO] --- maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[WARNING] Archetype not found in any catalog. Falling back to central repository.
[WARNING] Add a repository with id 'archetype' in your settings.xml if archetype's repository is elsewhere.
Define value for property 'groupId': com.vincent.example
Define value for property 'artifactId': example
Define value for property 'version' 1.0-SNAPSHOT: :
Define value for property 'package' com.vincent.example: :
Define value for property 'classPrefix' Example: :
Define value for property 'copyright': Example
Confirm properties configuration:
groupId: com.vincent.example
artifactId: example
version: 1.0-SNAPSHOT
package: com.vincent.example
classPrefix: Example
copyright: Example
Y: : y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: opendaylight-startup-archetype:1.0.1-Lithium-SR1
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.vincent.example
[INFO] Parameter: artifactId, Value: example
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: com.vincent.example
[INFO] Parameter: packageInPathFormat, Value: com/vincent/example
[INFO] Parameter: classPrefix, Value: Example
[INFO] Parameter: package, Value: com.vincent.example
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: copyright, Value: Example
[INFO] Parameter: groupId, Value: com.vincent.example
[INFO] Parameter: artifactId, Value: example
[WARNING] Don't override file F:\odlLearn\example\pom.xml
[INFO] Project created from Archetype in dir: F:\odlLearn\example
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 38.894 s
[INFO] Finished at: 2019-08-31T10:06:09+08:00
[INFO] ------------------------------------------------------------------------
F:\odlLearn>
expand , About DarchetypeVersion Version of , You may not want to develop 1.0.1-Lithium-SR1 This version , So what versions are available ? You can check this website again ,https://nexus.opendaylight.org/content/repositories/opendaylight.release/archetype-catalog.xml, Select the version you need to create the project
The third step , Project creation complete , At this point, you get the project file tree as shown in the figure below
F:.
├─api
│ └─src
│ └─main
│ └─yang
├─artifacts
├─features
│ └─src
│ └─main
│ └─features
├─impl
│ └─src
│ ├─main
│ │ ├─config
│ │ ├─java
│ │ │ ├─com
│ │ │ │ └─vincent
│ │ │ │ └─example
│ │ │ │ └─impl
│ │ │ └─org
│ │ │ └─opendaylight
│ │ │ └─yang
│ │ │ └─gen
│ │ │ └─v1
│ │ │ └─urn
│ │ │ └─opendaylight
│ │ │ └─params
│ │ │ └─xml
│ │ │ └─ns
│ │ │ └─yang
│ │ │ └─example
│ │ │ └─impl
│ │ │ └─rev141210
│ │ └─yang
│ └─test
│ └─java
│ ├─com
│ │ └─vincent
│ │ └─example
│ │ └─impl
│ └─org
│ └─opendaylight
│ └─yang
│ └─gen
│ └─v1
│ └─urn
│ └─opendaylight
│ └─params
│ └─xml
│ └─ns
│ └─yang
│ └─example
│ └─impl
│ └─rev141210
└─karaf
F:\odlLearn\example>
Step four 、cmd To example Folder , Compile the project mvn clean install -DskipTests, Compilation takes a long time , You can do something else , Waiting for success
Step five 、 Project start ,karaf
win10 start-up karaff Flash back problem solving
modify karaf\sdotn-distribution\target\assembly\etc In the catalog system.properties file , Add... At the end org.osgi.framework.os.name=Win32.win7 Directly start
Once the boot is complete , adopt log:display | grep example Command line correlation
3、 ... and 、 Thank you very much
Thank you very much :
http://www.bubuko.com/infodetail-2229492.html
https://www.cnblogs.com/zjd1396/p/9993655.html
边栏推荐
- Using the ethtool command by example
- Kubernetes cluster environment construction & Deployment dashboard
- [Zhao Yuqiang] deploy kubernetes cluster with binary package
- 卷积神经网络CNN中的卷积操作详解
- Apt update and apt upgrade commands - what is the difference?
- MySQL带二进制的库表导出导入
- Solve the problem that Anaconda environment cannot be accessed in PowerShell
- [teacher Zhao Yuqiang] redis's slow query log
- Core principles and source code analysis of disruptor
- 88. 合并两个有序数组
猜你喜欢
Method of converting GPS coordinates to Baidu map coordinates
[video of Teacher Zhao Yuqiang's speech on wot] redis high performance cache and persistence
Pytorch dataloader implements minibatch (incomplete)
Core principles and source code analysis of disruptor
智牛股项目--05
Oauth2.0 - explanation of simplified mode, password mode and client mode
Project summary --01 (addition, deletion, modification and query of interfaces; use of multithreading)
Zhiniu stock project -- 05
卷积神经网络CNN中的卷积操作详解
pytorch DataLoader实现miniBatch(未完成)
随机推荐
技术管理进阶——你了解成长的全貌吗?
从小数据量 MySQL 迁移数据到 TiDB
Why should there be a firewall? This time xiaowai has something to say!!!
Intel's new GPU patent shows that its graphics card products will use MCM Packaging Technology
Txt document download save as solution
BeanDefinitionRegistryPostProcessor
1. Somme des deux nombres
Analysis of Clickhouse mergetree principle
MySQL帶二進制的庫錶導出導入
Leetcode solution - 02 Add Two Numbers
Understand one-way hash function
Disruptor learning notes: basic use, core concepts and principles
Jedis source code analysis (I): jedis introduction, jedis module source code analysis
There is no one of the necessary magic skills PXE for old drivers to install!!!
Cesium 点击获取模型表面经纬度高程坐标(三维坐标)
MySQL带二进制的库表导出导入
Ext4 vs XFS -- which file system should you use
[teacher Zhao Yuqiang] index in mongodb (Part 1)
Project summary --04
Kubernetes notes (IV) kubernetes network