使用 OpenGrok 的多个项目

发布于 2024-08-07 23:28:11 字数 101 浏览 7 评论 0原文

我只是想知道为多个项目设置和配置 OpenGrok 的最佳方法是什么,例如通过单个页面和下拉列表。

虽然单个项目的文档非常简单,但设置多项目环境的说明对我来说并不是很清楚。

I was just wondering what is the best way to setup and configure OpenGrok for multiple projects, e.g. via a single page and a dropdown list.

While the documentation for a single project is pretty straight-forward, the instructions for setting up a multi-project environment isn't very clear to me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

深陷 2024-08-14 23:28:11

SRC_ROOT目录下的每个目录都是一个项目。
因此,创建目录结构应该如下所示:

/opengrok
|-- bin
|-- data
`-- source
   |--project1
   |--project2
   `--project3

然后更新索引,在这一步中,configuration.xml 文件将被更新,并且 SRC_ROOT(或 opengrok/source)下的每个目录将被视为一个项目。

Each directory under SRC_ROOT directory is one project.
So create your directory structure should look something like this:

/opengrok
|-- bin
|-- data
`-- source
   |--project1
   |--project2
   `--project3

Then update your index, in this step the configuration.xml file will be updated and each directory under SRC_ROOT (or opengrok/source) will be considered to be a project.

情定在深秋 2024-08-14 23:28:11

我在 Windows 上,为了更好地处理这种情况,我创建了一个合并的 d:\opengroksrc 文件夹,其中包含所有分散的源目录作为目录连接

示例我在 d:\gitsrc 中有一个项目和另一个项目在 d:\hacksrc 中。
我创建了一个名为 d:\opengroksrc

d:\opengroksrc 的文件夹
'-gitsrc =>;硬链接到 d:\gitsrc
'-hacksrc =>;硬链接到 d:\hacksrc

mklink /jd:\opengroksrc\gitsrc d:\gitsrc 可用于在 Windows

和我的 web.xml 中为目录创建连接,我指出我的源是实际上来自 d:\opengroksrc

;
<参数名称>SRC_ROOT
<参数值>D:\opengroksrc\

最后用于索引
java -jar E:\opengrok\lib\opengrok.jar -a on -t 4 -WE:\opengrok\configuration.xml -c C:\Windows\ctags.exe -P -S -v -s D :\opengroksrc -d E:\opengrok\grokdata -I *.cs -I *.c -I *.cpp -I *.h -I *.xml

I am on windows and to better handle the situation, I create a consolidated d:\opengroksrc folder which contains all my scattered source directories as directory junctions

Example I have a project in d:\gitsrc and another project in d:\hacksrc.
I have created a folder named d:\opengroksrc

d:\opengroksrc
'-gitsrc => hardlink to d:\gitsrc
'-hacksrc => hardlink to d:\hacksrc

mklink /j d:\opengroksrc\gitsrc d:\gitsrc can be used to create a junction for a directory in windows

and in my web.xml I indicate that my source are actually coming from d:\opengroksrc

<context-param>
<param-name>SRC_ROOT</param-name>
<param-value>D:\opengroksrc\</param-value>
</context-param>

And finally for indexing
java -jar E:\opengrok\lib\opengrok.jar -a on -t 4 -W E:\opengrok\configuration.xml -c C:\Windows\ctags.exe -P -S -v -s D:\opengroksrc -d E:\opengrok\grokdata -I *.cs -I *.c -I *.cpp -I *.h -I *.xml

枕花眠 2024-08-14 23:28:11

转到OPENGROK_INSTANCE_BASE定义的目录(例如:/var/opengrok)并在此路径中创建子目录“src”。然后创建指向您的项目的软链接,如下所示:

cd /var/opengrok/src
ln -s project1 <absolute path of project1>
ln -s project2 <absolute path of project2>
....

最后通过 'OpenGrok index' 更新索引

Go to the directory defined by OPENGROK_INSTANCE_BASE(for example: /var/opengrok) and create sub directory 'src' in this path. Then create soft links to your projects like following:

cd /var/opengrok/src
ln -s project1 <absolute path of project1>
ln -s project2 <absolute path of project2>
....

Finally update index by 'OpenGrok index'

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文