当前位置:网站首页>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
边栏推荐
- Bernoulli distribution, binomial distribution and Poisson distribution, and the relationship between maximum likelihood (incomplete)
- [Zhao Yuqiang] deploy kubernetes cluster with binary package
- 卷积神经网络CNN中的卷积操作详解
- Method of converting GPS coordinates to Baidu map coordinates
- 輕松上手Fluentd,結合 Rainbond 插件市場,日志收集更快捷
- 1. 两数之和
- ThreadLocal的简单理解
- Advanced technology management - do you know the whole picture of growth?
- Leetcode problem solving summary, constantly updating!
- 从小数据量分库分表 MySQL 合并迁移数据到 TiDB
猜你喜欢
Es remote cluster configuration and cross cluster search
[teacher Zhao Yuqiang] Flink's dataset operator
Redhat7 system root user password cracking
Alibaba cloud OOS file upload
Deep learning, thinking from one dimensional input to multi-dimensional feature input
tabbar的设置
Apt update and apt upgrade commands - what is the difference?
Simple solution of small up main lottery in station B
How does win7 solve the problem that telnet is not an internal or external command
輕松上手Fluentd,結合 Rainbond 插件市場,日志收集更快捷
随机推荐
1. Somme des deux nombres
从小数据量 MySQL 迁移数据到 TiDB
What's the difference between using the Service Worker Cache API and regular browser cache?
Kubernetes notes (VII) kuberetes scheduling
Oauth2.0 - using JWT to replace token and JWT content enhancement
Jackson: what if there is a lack of property- Jackson: What happens if a property is missing?
Understand the first prediction stage of yolov1
Txt document download save as solution
Kubernetes notes (10) kubernetes Monitoring & debugging
从小数据量分库分表 MySQL 合并迁移数据到 TiDB
Disruptor learning notes: basic use, core concepts and principles
SVN分支管理
深度学习,从一维特性输入到多维特征输入引发的思考
Understand expectations (mean / estimate) and variances
The server data is all gone! Thinking caused by a RAID5 crash
[teacher Zhao Yuqiang] index in mongodb (Part 2)
Leetcode solution - 02 Add Two Numbers
Why should there be a firewall? This time xiaowai has something to say!!!
Jedis source code analysis (II): jediscluster module source code analysis
Crontab command usage