使用 OpenGrok 的多个项目
我只是想知道为多个项目设置和配置 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
SRC_ROOT目录下的每个目录都是一个项目。
因此,创建目录结构应该如下所示:
然后更新索引,在这一步中,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:
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.
我在 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 junctionsExample 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 windowsand in my
web.xml
I indicate that my source are actually coming fromd:\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
转到OPENGROK_INSTANCE_BASE定义的目录(例如:/var/opengrok)并在此路径中创建子目录“src”。然后创建指向您的项目的软链接,如下所示:
最后通过 '
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:Finally update index by '
OpenGrok index
'