opendaylight(Li) l2switch 源代码分析(2)--parent

2024-04-14 21:38

本文主要是介绍opendaylight(Li) l2switch 源代码分析(2)--parent,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

本文主要介绍l2switch中的parent工程,该工程定义了运行L2switch所使用的依赖模块以及版本等。
该工程下只有一个pom.xml文件,下面对该文件中的主要内容进行说明:

1.
<parent>
    <groupId>org.opendaylight.odlparent</groupId>
    <artifactId>odlparent</artifactId>
    <version>1.7.0-SNAPSHOT</version>
    <relativePath/>
</parent>
该工程继承了工程“org.opendaylight.odlparent”,这个工程在l2 switch中不存在,查看opendaylight
的github(https://github.com/opendaylight/odlparent),确实有一个odlparent工程,查看该工程
的pom.xml:
<parent>
   <groupId>org.opendaylight.odlparent</groupId>
   <artifactId>odlparent-lite</artifactId>
   <version>1.7.0-SNAPSHOT</version>
   <relativePath>odlparent-lite</relativePath>
</parent>
貌似odlparent还继承于odlparent-lite,在odlparent工程目录下找到了odlparent-lite文件下的pom.xml,
貌似该pom.xml不再继承于其他的工程,应该找到源头了。
后面会介绍到其他的工程,如packethandler、loopremover等,它们的pom.xml都会继承于parent工程,即在
这些工程的pom.xml下面都有一下内容:
    <parent>
        <groupId>org.opendaylight.l2switch</groupId>
        <artifactId>l2switch-parent</artifactId>
        <version>0.4.0-SNAPSHOT</version>
        <relativePath>../parent</relativePath>
    </parent>

2.
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.opendaylight.yangtools</groupId>
        <artifactId>yangtools-artifacts</artifactId>
        <version>${yangtools.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.mdsal</groupId>
        <artifactId>mdsal-artifacts</artifactId>
        <version>2.1.0-SNAPSHOT</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.mdsal.model</groupId>
        <artifactId>mdsal-model-artifacts</artifactId>
        <version>0.9.0-SNAPSHOT</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>config-artifacts</artifactId>
        <version>${config.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>mdsal-artifacts</artifactId>
        <version>${mdsal.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.openflowplugin</groupId>
        <artifactId>openflowplugin-artifacts</artifactId>
        <version>${openflow.plugin.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.l2switch</groupId>
        <artifactId>l2switch-artifacts</artifactId>
        <version>${project.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>

      <dependency>
        <groupId>org.opendaylight.controller.thirdparty</groupId>
        <artifactId>net.sf.jung2</artifactId>
        <version>${jung2.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
这边定义了l2switch需要依赖的工程:yangtools,mdsal,controller,openflowplugin,jung2......
子pom会继承父pom中配置的所有依赖,子pom中只需配置自己特需的依赖就行了。

3.
  <build>
      <pluginManagement>
          <plugins>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-compiler-plugin</artifactId>
                  <version>${maven.compile.plugin.version}</version>
                  <configuration>
                      <source>${java.version.source}</source>
                      <target>${java.version.target}</target>
                  </configuration>
              </plugin>

              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${checkstyle.version}</version>
                <configuration>
                  <failsOnError>true</failsOnError>
                  <configLocation>controller/checkstyle.xml</configLocation>
                  <consoleOutput>true</consoleOutput>
                  <includeTestSourceDirectory>true</includeTestSourceDirectory>
                  <sourceDirectory>${project.basedir}</sourceDirectory>
                  <includes>**\/*.java,**\/*.yang,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat</includes>
                  <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,\/,**\/xtend-gen\/,**\/yang-gen-code\/,**\/${codeGeneratorPath}\/,**\/${configCodeGeneratorPath}\/,</excludes>
                </configuration>
                <dependencies>
                  <dependency>
                    <groupId>org.opendaylight.controller</groupId>
                    <artifactId>checkstyle</artifactId>
                    <version>0.3.0-SNAPSHOT</version>
                  </dependency>
                </dependencies>
                <executions>
                  <execution>
                    <id>check</id>
                    <goals>
                      <goal>check</goal>
                    </goals>
                    <phase>process-sources</phase>
                  </execution>
                </executions>
              </plugin>

              <!--  tells eclipse to import these folders into the package explorer as "source" folders
                    which allows eclipse to resolve the classes correctly during an eclipse build -->
              <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>build-helper-maven-plugin</artifactId>
                  <version>1.8</version>
                  <executions>
                      <execution>
                          <id>add-source</id>
                          <goals>
                              <goal>add-source</goal>
                          </goals>
                          <phase>generate-sources</phase>
                          <configuration>
                              <sources>
                                  <source>src/main/yang</source>
                                  <source>${codeGeneratorPath}</source>
                                  <source>${configCodeGeneratorPath}</source>
                              </sources>
                          </configuration>
                      </execution>
                  </executions>
              </plugin>
              <!--  cleans up auto generated code  -->
              <plugin>
                  <artifactId>maven-clean-plugin</artifactId>
                  <configuration>
                      <filesets>
                          <fileset>
                              <directory>${codeGeneratorPath}</directory>
                              <directory>${configCodeGeneratorPath}</directory>
                              <includes>
                                  <include>**</include>
                              </includes>
                          </fileset>
                      </filesets>
                  </configuration>
              </plugin>

              <!-- Ignore/Execute plugin execution -->
              <plugin>
                  <groupId>org.eclipse.m2e</groupId>
                  <artifactId>lifecycle-mapping</artifactId>
                  <version>1.0.0</version>
                  <configuration>
                      <lifecycleMappingMetadata>
                          <pluginExecutions>
                              <pluginExecution>
                                  <pluginExecutionFilter>
                                      <groupId>org.codehaus.mojo</groupId>
                                      <artifactId>properties-maven-plugin</artifactId>
                                      <versionRange>[0.0,)</versionRange>
                                      <goals>
                                          <goal>set-system-properties</goal>
                                      </goals>
                                  </pluginExecutionFilter>
                                  <action>
                                      <ignore />
                                  </action>
                              </pluginExecution>
                              <pluginExecution>
                                  <pluginExecutionFilter>
                                      <groupId>org.jacoco</groupId>
                                      <artifactId>jacoco-maven-plugin</artifactId>
                                      <versionRange>[0.0,)</versionRange>
                                      <goals>
                                          <goal>prepare-agent</goal>
                                          <goal>pre-test</goal>
                                          <goal>post-test</goal>
                                      </goals>
                                  </pluginExecutionFilter>
                                  <action>
                                      <ignore />
                                  </action>
                              </pluginExecution>
                              <pluginExecution>
                                  <pluginExecutionFilter>
                                      <groupId>org.ops4j.pax.exam</groupId>
                                      <artifactId>maven-paxexam-plugin</artifactId>
                                      <versionRange>[1.2.4,)</versionRange>
                                      <goals>
                                          <goal>generate-depends-file</goal>
                                      </goals>
                                  </pluginExecutionFilter>
                                  <action>
                                      <execute>
                                          <runOnIncremental>false</runOnIncremental>
                                      </execute>
                                  </action>
                              </pluginExecution>
                              <pluginExecution>
                                  <pluginExecutionFilter>
                                      <groupId>org.apache.maven.plugins</groupId>
                                      <artifactId>maven-checkstyle-plugin</artifactId>
                                      <versionRange>[2.0,)</versionRange>
                                      <goals>
                                          <goal>check</goal>
                                      </goals>
                                  </pluginExecutionFilter>
                                  <action>
                                      <ignore />
                                  </action>
                              </pluginExecution>
                              <pluginExecution>
                                  <pluginExecutionFilter>
                                      <groupId>org.opendaylight.yangtools</groupId>
                                      <artifactId>yang-maven-plugin</artifactId>
                                      <versionRange>[0.5,)</versionRange>
                                      <goals>
                                          <goal>generate-sources</goal>
                                      </goals>
                                  </pluginExecutionFilter>
                                  <action>
                                      <execute />
                                  </action>
                              </pluginExecution>
                              <pluginExecution>
                                  <pluginExecutionFilter>
                                      <groupId>org.codehaus.groovy.maven</groupId>
                                      <artifactId>gmaven-plugin</artifactId>
                                      <versionRange>1.0</versionRange>
                                      <goals>
                                          <goal>execute</goal>
                                      </goals>
                                  </pluginExecutionFilter>
                                  <action>
                                      <ignore />
                                  </action>
                              </pluginExecution>
                              <pluginExecution>
                                  <pluginExecutionFilter>
                                      <groupId>org.apache.maven.plugins</groupId>
                                      <artifactId>maven-enforcer-plugin</artifactId>
                                      <versionRange>${enforcer.version}</versionRange>
                                      <goals>
                                          <goal>enforce</goal>
                                      </goals>
                                  </pluginExecutionFilter>
                                  <action>
                                      <ignore />
                                  </action>
                              </pluginExecution>
                          </pluginExecutions>
                      </lifecycleMappingMetadata>
                  </configuration>
              </plugin>
          </plugins>
      </pluginManagement>
      <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
          </plugin>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-checkstyle-plugin</artifactId>
          </plugin>
      </plugins>
  </build>
这一段定义了在编译时用到的插件。

这篇关于opendaylight(Li) l2switch 源代码分析(2)--parent的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/904094

相关文章

性能分析之MySQL索引实战案例

文章目录 一、前言二、准备三、MySQL索引优化四、MySQL 索引知识回顾五、总结 一、前言 在上一讲性能工具之 JProfiler 简单登录案例分析实战中已经发现SQL没有建立索引问题,本文将一起从代码层去分析为什么没有建立索引? 开源ERP项目地址:https://gitee.com/jishenghua/JSH_ERP 二、准备 打开IDEA找到登录请求资源路径位置

SWAP作物生长模型安装教程、数据制备、敏感性分析、气候变化影响、R模型敏感性分析与贝叶斯优化、Fortran源代码分析、气候数据降尺度与变化影响分析

查看原文>>>全流程SWAP农业模型数据制备、敏感性分析及气候变化影响实践技术应用 SWAP模型是由荷兰瓦赫宁根大学开发的先进农作物模型,它综合考虑了土壤-水分-大气以及植被间的相互作用;是一种描述作物生长过程的一种机理性作物生长模型。它不但运用Richard方程,使其能够精确的模拟土壤中水分的运动,而且耦合了WOFOST作物模型使作物的生长描述更为科学。 本文让更多的科研人员和农业工作者

MOLE 2.5 分析分子通道和孔隙

软件介绍 生物大分子通道和孔隙在生物学中发挥着重要作用,例如在分子识别和酶底物特异性方面。 我们介绍了一种名为 MOLE 2.5 的高级软件工具,该工具旨在分析分子通道和孔隙。 与其他可用软件工具的基准测试表明,MOLE 2.5 相比更快、更强大、功能更丰富。作为一项新功能,MOLE 2.5 可以估算已识别通道的物理化学性质。 软件下载 https://pan.quark.cn/s/57

衡石分析平台使用手册-单机安装及启动

单机安装及启动​ 本文讲述如何在单机环境下进行 HENGSHI SENSE 安装的操作过程。 在安装前请确认网络环境,如果是隔离环境,无法连接互联网时,请先按照 离线环境安装依赖的指导进行依赖包的安装,然后按照本文的指导继续操作。如果网络环境可以连接互联网,请直接按照本文的指导进行安装。 准备工作​ 请参考安装环境文档准备安装环境。 配置用户与安装目录。 在操作前请检查您是否有 sud

线性因子模型 - 独立分量分析(ICA)篇

序言 线性因子模型是数据分析与机器学习中的一类重要模型,它们通过引入潜变量( latent variables \text{latent variables} latent variables)来更好地表征数据。其中,独立分量分析( ICA \text{ICA} ICA)作为线性因子模型的一种,以其独特的视角和广泛的应用领域而备受关注。 ICA \text{ICA} ICA旨在将观察到的复杂信号

【软考】希尔排序算法分析

目录 1. c代码2. 运行截图3. 运行解析 1. c代码 #include <stdio.h>#include <stdlib.h> void shellSort(int data[], int n){// 划分的数组,例如8个数则为[4, 2, 1]int *delta;int k;// i控制delta的轮次int i;// 临时变量,换值int temp;in

Android fill_parent、match_parent、wrap_content三者的作用及区别

这三个属性都是用来适应视图的水平或者垂直大小,以视图的内容或尺寸为基础的布局,比精确的指定视图的范围更加方便。 1、fill_parent 设置一个视图的布局为fill_parent将强制性的使视图扩展至它父元素的大小 2、match_parent 和fill_parent一样,从字面上的意思match_parent更贴切一些,于是从2.2开始,两个属性都可以使用,但2.3版本以后的建议使

三相直流无刷电机(BLDC)控制算法实现:BLDC有感启动算法思路分析

一枚从事路径规划算法、运动控制算法、BLDC/FOC电机控制算法、工控、物联网工程师,爱吃土豆。如有需要技术交流或者需要方案帮助、需求:以下为联系方式—V 方案1:通过霍尔传感器IO中断触发换相 1.1 整体执行思路 霍尔传感器U、V、W三相通过IO+EXIT中断的方式进行霍尔传感器数据的读取。将IO口配置为上升沿+下降沿中断触发的方式。当霍尔传感器信号发生发生信号的变化就会触发中断在中断

kubelet组件的启动流程源码分析

概述 摘要: 本文将总结kubelet的作用以及原理,在有一定基础认识的前提下,通过阅读kubelet源码,对kubelet组件的启动流程进行分析。 正文 kubelet的作用 这里对kubelet的作用做一个简单总结。 节点管理 节点的注册 节点状态更新 容器管理(pod生命周期管理) 监听apiserver的容器事件 容器的创建、删除(CRI) 容器的网络的创建与删除

PostgreSQL核心功能特性与使用领域及场景分析

PostgreSQL有什么优点? 开源和免费 PostgreSQL是一个开源的数据库管理系统,可以免费使用和修改。这降低了企业的成本,并为开发者提供了一个活跃的社区和丰富的资源。 高度兼容 PostgreSQL支持多种操作系统(如Linux、Windows、macOS等)和编程语言(如C、C++、Java、Python、Ruby等),并提供了多种接口(如JDBC、ODBC、ADO.NET等