问题描述
我有带有 MyEclipse 10 Java 企业开发插件的 Eclipse Indigo 3.7 基础:
I have Eclipse Indigo 3.7 base with MyEclipse 10 Java enterprise development plug-in:
- 我已经为 eclipse 安装了 Sonar 插件.
- 安装 Sonar 服务器并从 localhost (localhost:9000) 在本地运行它
- 在 Eclipse 中测试了服务器连接,来自
Windows>首选项>声纳>服务器.连接成功. - 对于我的项目,为声纳 (sonar:sonar) 运行 Maven 目标.构建是成功的.我可以在 localhost 中浏览结果.(本地主机:9000)
我的问题是将项目与声纳相关联.当我右键单击我的项目时,配置 > 与声纳关联,我得到一个没有任何反应的屏幕.
My issue is with Associating the project to Sonar. When i right click on my project, Configure > Associate with Sonar, I get a screen where nothing happens.
屏幕基本上有 2 个字段,Project 和 Sonar Project.Project 字段包含我的项目的名称,Sonar Project 字段列出了此消息 - 单击此处开始搜索远程 Sonar 项目"
Basically the screen has 2 fields,Project and Sonar Project. The Project field contains the name of my Project and Sonar Project field lists this message - "click here to start searching for a remote Sonar project"
- 我单击该字段并输入我的 groupid:artifactid 但什么也没有发生.
- 我还尝试输入 Sonar 仪表板中列出的项目名称但这也无济于事.
当我右键单击我的项目时,在上下文菜单中我无法看到声纳"选项.
When i right click on my project, In the context menu i am unable to see 'Sonar' option.
帮助我将我的项目与 Eclipse 中的 Sonar 关联起来.请让我知道我错过了什么.提前致谢.
Help me associate my project to Sonar in eclipse. Please let me know what i am missing. Thanks in advance.
推荐答案
我在 Eclipse (liferay-plugins-sdk.6.2.0) 中的 Liferay 项目遇到了同样的问题,下面是我如何让它工作的:
I had the same issue with my Liferay project in Eclipse (liferay-plugins-sdk.6.2.0) and here is how I got it working:
- 安装eclipse插件,并测试服务器连接
- 安装 Sonar 服务器并启动它(例如在 yourhost:9000 上)
- 转到 yourhost:9000 并登录(管理员/管理员,除非您更改它)
- 转到设置 -> 系统 -> 配置
- 新建项目(右上角+Create)
- 我使用过 key=Liferay6.2 和 name=liferay-plugins-sdk-6.2.0
- Install the eclipse plugin, and test server connection
- Install the Sonar server and start it (for example on yourhost:9000)
- Go to yourhost:9000 and login (*****/***** unless you changed it)
- Go to Settings -> System -> Provisioning
- Create new project (+Create in the top right corner)
- I've used key=Liferay6.2 and name=liferay-plugins-sdk-6.2.0
完成上述步骤后,我回到了我的 eclipse 项目并在 Configure > Associate with Sonar 中搜索/找到了 liferay 项目.
After the above steps I went back to my eclipse project and in Configure > Associate with Sonar I was able to search/find the liferay project.