openLooKeng开发环境搭建


搭建OpenLooKeng开发环境

在搭建OpenLooKeng开发环境之前,需要确保你的机器上安装了Java Development Kit (JDK) 8以上版本,因为OpenLooKeng是用Java编写的。

要求

Mac OS X或Linux
Java 8 Update 161或更高版本(8u161+)(64位)。同时支持Oracle JDK和OpenJDK。
AArch64 (Bisheng JDK 1.8.262 或更高版本)
Maven 3.3.9+(用于构建)
Python 2.4+(与启动器脚本一起运行)

以下是搭建OpenLooKeng开发环境的基本步骤:

1、从OpenLooKeng的GitHub仓库克隆代码:

git clone https://github.com/openlookeng/openlookeng.git

进入代码目录:

cd openlookeng

确保安装了Maven,用于构建项目:

2、 构建OpenLooKeng

构建OpenLooKeng:

mvn clean install -DskipTests

如果你想要开发或修改OpenLooKeng的代码,你可能需要配置IDE以便于开发,例如使用IntelliJ IDEA:

生成IntelliJ IDEA项目文件

mvn idea:idea

然后用IntelliJ IDEA打开项目。
在这里插入图片描述

这些步骤提供了一个基本的开发环境,你可以在此基础上进行代码的开发和测试。具体的开发活动,比如修改代码、添加功能等,需要根据项目具体情况和开发文档来执行。

airbase

<parent>  
    <groupId>io.airlift</groupId>  
    <artifactId>airbase</artifactId>  
    <version>97</version>  
</parent>

openLooKeng 项目继承自 io.airlift 组织的 airbase 项目,版本为 97。airbase 是 Airlift 公司提供的一个基础构建工具集,它包含了一系列 Maven 插件、依赖管理和其他配置,旨在帮助 Java 开发者更容易地创建、维护和发布 Maven 项目。

通过在项目中包含这个 元素,openLooKeng将继承 airbase POM 中定义的所有配置。这通常包括编译设置、依赖管理、插件配置等。这有助于确保您的项目遵循 Airlift 的最佳实践,并与其他使用 airbase 的项目保持一致性。

当您构建或安装您的 Maven 项目时,Maven 会首先解析父 POM,并将父 POM 中的配置应用到当前项目中。这样,您就可以专注于您项目的特定配置,而不必重复设置那些已经在父 POM 中定义好的通用配置。故openLooKeng很多默认配置都是继承自airbase 。
airbase 将maven检查分为两组:基本组和扩展组

Group Check Skip check (Setting to true skips the check) Fail build (Setting to false only reports a warning)
Basic Maven Enforcer air.check.skip-enforcer air.check.fail-enforcer
Basic Maven Dependencies air.check.skip-dependency air.check.fail-dependency
Basic Maven Duplicate finder air.check.skip-duplicate-finder air.check.fail-duplicate-finder
Basic Maven Dependency scope air.check.skip-dependency-scope air.check.fail-dependency-scope
Extended SpotBugs air.check.skip-spotbugs air.check.fail-spotbugs
Extended PMD air.check.skip-pmd air.check.fail-pmd
Extended License check air.check.skip-license air.check.fail-license
Extended Code coverage air.check.skip-jacoco air.check.fail-jacoco
Extended Modernizer air.check.skip-modernizer air.check.fail-modernizer
Extended Checkstyle air.check.skip-checkstyle air.check.fail-checkstyle

构建项目过程中出现的问题

构建项目过程中的问题大部分与airbase 的配置相关

checkstyle错误

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.0:check (checkstyle) on project presto-array: You have 2 Checkstyle violations. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :presto-array

解决办法
在根 pom.xml增加<air.check.skip-checkstyle>true</air.check.skip-checkstyle> 忽略checkstyle问题

    <properties>
        <air.main.basedir>${project.basedir}</air.main.basedir>

        <air.check.skip-spotbugs>true</air.check.skip-spotbugs>
        <air.check.skip-pmd>true</air.check.skip-pmd>
        <air.check.skip-jacoco>true</air.check.skip-jacoco>
        <air.check.skip-checkstyle>true</air.check.skip-checkstyle>
        .......
    </properties>

版本冲突问题hetu-heuristic-index: Some Enforcer rules have failed

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (default) on project hetu-heuristic-index: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :hetu-heuristic-index

解决办法:

在根 pom.xml增加<air.check.skip-enforcer>true</air.check.skip-enforcer>

    <properties>
        <air.main.basedir>${project.basedir}</air.main.basedir>

        <air.check.skip-spotbugs>true</air.check.skip-spotbugs>
        <air.check.skip-pmd>true</air.check.skip-pmd>
        <air.check.skip-jacoco>true</air.check.skip-jacoco>
        <air.check.skip-checkstyle>true</air.check.skip-checkstyle>
        <air.check.skip-enforcer>true</air.check.skip-enforcer>
        ....................
   </properties>

相关推荐

  1. golang开发环境

    2024-03-30 21:34:04       45 阅读
  2. Dockerr开发环境

    2024-03-30 21:34:04       36 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-03-30 21:34:04       19 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-03-30 21:34:04       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-03-30 21:34:04       20 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-03-30 21:34:04       20 阅读

热门阅读

  1. 大三实习小菜蛋之document元素节点

    2024-03-30 21:34:04       17 阅读
  2. Express

    Express

    2024-03-30 21:34:04      18 阅读
  3. C++知识点总结(27):链表

    2024-03-30 21:34:04       16 阅读
  4. math模块篇(八)

    2024-03-30 21:34:04       16 阅读
  5. vue 通过插槽来分配内容

    2024-03-30 21:34:04       15 阅读
  6. SQL中添加数据的方式

    2024-03-30 21:34:04       14 阅读
  7. 基于IvorySQL+Patroni+vip-manager构建高可用集群

    2024-03-30 21:34:04       15 阅读
  8. Flutter页面生命周期

    2024-03-30 21:34:04       16 阅读
  9. 『C++初阶』第一章-命名空间与缺省参数

    2024-03-30 21:34:04       16 阅读
  10. LeetCode题练习与总结:字母异位词分组

    2024-03-30 21:34:04       28 阅读