美文网首页
OpenGrok项目管理

OpenGrok项目管理

作者: 戈壁堂 | 来源:发表于2020-09-09 20:14 被阅读0次

问题:

将gitlab下的项目按组添加为opengrok的项目,每个组对应为一个opengrok项目。先添加项目最多的几个group,总计项目解决1k。目前为止一起正常。

A project can have zero or more Source Code Management repositories underneath.

根据Per project management and workflow文档进行实践。需要安装OpenGrok tools ,将python封装的命令封装到用户目录的 opengroktools文件夹下。

需要将其他group内容作为新的项目添加到opengrok。

when indexing newly added project, it is necessary to add it to the configuration first, then index it and lastly make the new configuration persistent.

  • 先做备份,将configuration.xml文件备份
  • 添加项目组234_sale添加到配置文件中。
$> opengroktools/bin/opengrok-projadm -b opengrok -a 234_sale
Adding project 234_sale
Refreshing configuration
  • 更新索引。官方动作
curl -s -X GET http://localhost:8080/source/api/v1/configuration -o fresh_config.xml
opengrok-indexer -a /opengrok/dist/lib/opengrok.jar -- \
    -c /usr/local/bin/ctags \
    -U 'http://localhost:8080/source' \
    -o /opengrok/etc/ctags.config \
    -R fresh_config.xml
    -H PROJECT_NAME \
    PROJECT_NAME

分两步操作。首先执行curl -s -X GET http://localhost:8080/source/api/v1/configuration -o fresh_config.xml下载最新的配置文件到本地。
执行建立索引的动作:只针对当前项目。

各个参数的含义可以执行java -jar opengrok.jar --help获取到详细详细。最后备份一份

opengroktools/bin/opengrok-indexer -a opengrok/dist/lib/opengrok.jar -- \
    -c /usr/local/bin/ctags \
    -U 'http://localhost:8080/source' \
    -s /data1/data/groups -d opengrok/data0907 \
    -R fresh_config.xml
    -H 234_sale \
    234_sale

指定了 -s 和 -d 参数后,最后的参数时候被忽略了?自动判断了index的缓存历史,最终效果是将234_sale组添加到了配置文件并生效。

目前无法确定真实的逻辑是怎样的。看来需要去读源码乜?

opengrok-indexer添加项目时,不需要指定源码、数据目录。这些值在配置文件中已经记录。使用官方的方法即可,效果如下——

opengroktools/bin/opengrok-indexer -a opengrok/dist/lib/opengrok.jar -- \
>     -c /usr/local/bin/ctags \
>     -U 'http://localhost:8080/source' \
>     -R fresh_config.xml
    -H sub1 \
    sub1 Sep 11, 2020 3:59:44 PM org.opengrok.indexer.configuration.Configuration read
INFO: Reading configuration from /home/vip/fresh_config.xml
Sep 11, 2020 3:59:45 PM org.opengrok.indexer.index.Indexer parseOptions

-H参数实际是由opengrok.jar包提供的

删除效果——

相关文章

  • OpenGrok tools使用

    OpenGrok项目管理 最后使用 opengrok-indexer时参数其实传递错误。 opengrok-ind...

  • OpenGrok项目管理

    问题: 将9000+gitlab项目一一对应为opengrok下的项目——索引创建成功,UI响应慢,查询无响应 将...

  • opengrok搭建

    opengrok是看代码的利器,主页为 https://github.com/oracle/opengrok 下载...

  • OpenGrok 使用方法

    OpenGrok 使用方法 20170612 初始版本,添加文档 官方路径 http://opengrok.git...

  • Ubuntu opengrok 安装新建项目

    本文中使用的软件: 链接:https://pan.baidu.com/s/1YhoBRfiB_Ic_qi_fudg...

  • 代码阅读工具opengrok

    代码阅读工具opengrok

  • OpenGrok 认证

    将gitlab上的项目作为OpenGrok的输入,直接可以搜索全量代码。需要做基本的认证。 申请内部域名,支持域名...

  • OpenGrok环境搭建

    OpenGrok介绍 OpenGrok为一个方便快速的源码搜索及交叉引用查询引擎。它以Java编写,可用于源码搜索...

  • Docker-OpenGrok的安装及使用

    安装OpenGrok要安装一堆东西,偷个懒,使用别人配置好的docker镜像来使用opengrok,以下为具体步骤...

  • 部署安装OpenGrok {O

    opengrok site Features Comparison with Similar Tools Supp...

网友评论

      本文标题:OpenGrok项目管理

      本文链接:https://www.haomeiwen.com/subject/jupeektx.html