为 Eclipse 安装检查样式插件时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11865025/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error while installing check style plugin for eclipse
提问by user1564922
I am getting the following error while installing the checkstyle plugin for my eclipuse via the update manager
通过更新管理器为我的 eclipuse 安装 checkstyle 插件时出现以下错误
Cannot complete the install because one or more required items could not be found. Software being installed: EclipseCS SevNTU plugin feature 1.5.0 (com.github.sevntu.checkstyle.checks.feature.feature.group 1.5.0) Missing requirement: Sevntu eclipse-cs Extension Plugin 1.5.0 (com.github.sevntu.checkstyle.checks 1.5.0) requires 'bundle net.sf.eclipsecs.core 0.0.0' but it could not be found Cannot satisfy dependency: From: EclipseCS SevNTU plugin feature 1.5.0 (com.github.sevntu.checkstyle.checks.feature.feature.group 1.5.0) To: com.github.sevntu.checkstyle.checks [1.5.0]
无法完成安装,因为找不到一个或多个必需的项目。正在安装的软件:EclipseCS SevNTU 插件功能 1.5.0 (com.github.sevntu.checkstyle.checks.feature.feature.group 1.5.0) 缺少要求:Sevntu eclipse-cs 扩展插件 1.5.0 (com.github.sevntu. checkstyle.checks 1.5.0) 需要 'bundle net.sf.eclipsecs.core 0.0.0' 但找不到它不能满足依赖:来自:EclipseCS SevNTU 插件功能 1.5.0 (com.github.sevntu.checkstyle.checks .feature.feature.group 1.5.0) 至:com.github.sevntu.checkstyle.checks [1.5.0]
I am using the below update site.
我正在使用以下更新站点。
I have googled a lot on this but could not find a appropriate solution. Please help. Thanks in advance
我在谷歌上搜索了很多,但找不到合适的解决方案。请帮忙。提前致谢
回答by Ashutosh Jindal
When you attempt to install is Contact all update sites during install to find required software
checked ? If not, it should be :
当您尝试安装时被Contact all update sites during install to find required software
选中?如果没有,它应该是:
Expected Result
预期结果
When using the update site in OP's post, following is the expected result :
在 OP 的帖子中使用更新站点时,预期结果如下:
Offline Installation
离线安装
From thispage :
从这个页面:
Alternatively the Checkstyle Eclipse Plug-in can be downloaded from the Eclipse Checkstyle Plug-in's SourceForge download site. The download consists of a archived update site (file name net.sf.eclipsecs-x.x.x.buildstamp-updatesite.zip), containing all mandatory and optional parts of the plugin.
The plugin can be installed from the archived update site in the following ways:
1. Via Eclipse's P2 Installation Manager similar as described above, pointing to the archive file instead 2. Extracted into Eclipse's dropins folder.
或者,可以从 Eclipse Checkstyle 插件的 SourceForge 下载站点下载 Checkstyle Eclipse 插件。下载包含一个存档的更新站点(文件名 net.sf.eclipsecs-xxxbuildstamp-updatesite.zip),其中包含插件的所有必需和可选部分。
可以通过以下方式从存档的更新站点安装插件:
1. Via Eclipse's P2 Installation Manager similar as described above, pointing to the archive file instead 2. Extracted into Eclipse's dropins folder.
So, the steps are as follows :
因此,步骤如下:
Download the file referred above from here
Add the downloaded file as an 'Archived Download site' like so :
从这里下载上面提到的文件
将下载的文件添加为“存档下载站点”,如下所示:
- After that you should get the following :
- 之后你应该得到以下信息:
回答by shashi009
I think Ashutosh' answer should have worked, alternatively another option is to download the zip archive from http://sourceforge.net/projects/eclipse-cs/files/Eclipse%20Checkstyle%20Plug-in/5.5.0/and extract it to eclipse plugins folder.
我认为 Ashutosh 的回答应该有效,或者另一种选择是从http://sourceforge.net/projects/eclipse-cs/files/Eclipse%20Checkstyle%20Plug-in/5.5.0/下载 zip 存档 并将其解压缩eclipse插件文件夹。
回答by ROMANIA_engineer
Eclipse Mars (4.5.1)
日食火星 (4.5.1)
Installation
安装
You can install Checkstyle plugin from the Marketplace.
您可以从Marketplace安装 Checkstyle 插件。
Help > Eclipse Martketplace...
Type
"checkstyle plug-in"
and hit Enter.You can also type only
checkstyle
and then select the plugin from the list.Click on Install.
Usage
用法
Window > Show View > Other...
Type
checkstyle
> select the views (Ctrl+ click) > OKRight click on your project > Checkstyle > Check Code with Checkstyle
The output will be shown in the checkstyle views (2 tabs).
If you listed all the violations for a type (using the arrow / right click / double click), you can go back using the "Go back to the master view" arrow:
回答by Meng Lu
I think the caveat here is the plugin's homepage http://eclipse-cs.sourceforge.net/gives http://sevntu-checkstyle.github.com/sevntu.checkstyle/update-site/as the installation URL, but it does not work (Yes?). However on http://eclipse-cs.sourceforge.net/downloads.htmla different installation URL http://eclipse-cs.sf.net/update/is given, which turns out to work correctly.
我认为这里的警告是插件的主页http://eclipse-cs.sourceforge.net/提供http://sevntu-checkstyle.github.com/sevntu.checkstyle/update-site/作为安装 URL,但它确实不工作(是吗?)。但是在http://eclipse-cs.sourceforge.net/downloads.html 上给出了不同的安装 URL http://eclipse-cs.sf.net/update/,结果证明它可以正常工作。