简体   繁体   English

用pmd进行Eclipse配置

[英]eclipse configuration with pmd

I was trying to configure PMD plugin in eclipse (window8) but after 50% progress error occures . 我正在尝试在eclipse(window8)中配置PMD plugin ,但是发生50%进度错误之后。

i am using this in path http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/ 我在路径http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/

I need to configure PMD for code review, from some resource's i found pmd useful. 我需要从一些资源中配置PMD进行代码审查,我发现pmd有用。

and it is good code analyzer. 这是一个很好的代码分析器。

在此处输入图片说明

在此处输入图片说明

If you are new to the Eclipse IDE, it's better to know how to install the plugin for it: 如果您是Eclipse IDE的新手,那么最好了解如何为其安装插件:

  1. Start the Eclipse IDE (screenshot from the Eclipse Java EE IDE for Web Developers, version: Helios Service Release 2) 启动Eclipse IDE(用于Web开发人员的Eclipse Java EE IDE的屏幕截图,版本:Helios Service Release 2)

  2. Select the Help –>Install New Software.... in the Eclipse menu item. 在Eclipse菜单项中选择帮助–>安装新软件...。

  3. The install window will be open. 安装窗口将打开。 On there, click the "Add.." button. 在此处,单击“添加..”按钮。

  4. In the "Add Repository" window, enter the name and location (plugin URL) 在“添加存储库”窗口中,输入名称和位置(插件URL)

    PMD plugin: http://pmd.sf.net/eclipse PMD插件: http//pmd.sf.net/eclipse

    Then click the "OK" button. 然后单击“确定”按钮。

  5. Select PMD for Eclipse 3 and Apache Xerces in the "Select the features to install" list and click Next. 在“选择要安装的功能”列表中选择Eclipse 3和Apache Xerces的PMD,然后单击“下一步”。 Accept the terms of the license agreements and click Next. 接受许可协议的条款,然后单击“下一步”。

  6. Verify that the install location in Eclipse installation directory, otherwise select the correct one, then click Finish. 验证安装位置在Eclipse安装目录中,否则选择正确的位置,然后单击“完成”。

Unable to read repository problem can come because of your internet connection or proxy. 可能由于您的Internet连接或代理而无法读取存储库问题。

Check if eclipse update is working. 检查Eclipse更新是否正常。 As per your screenshots you are doing fine. 根据您的屏幕截图,您一切都很好。 Also double check your PMD url by opening it in browser. 另外,通过在浏览器中打开您的PMD网址再次检查它。

PMD Installation PMD安装

To install the PMD for Eclipse plugin:- 要安装PMD for Eclipse插件,请执行以下操作:

In Eclipse, click on 在Eclipse中,点击

  • Help -> Install New Software... 帮助->安装新软件...
  • Click on Add.. 单击添加。
  • Enter the following: 输入以下内容:

Name: PMD for Eclipse Update Site 名称:Eclipse更新站点的PMD

URL: https://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/ and click OK. URL: https : //sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/ ,然后单击“确定”。

  • You should see PMD for Eclipse Select the checkbox next to it and click Next 您应该看到PMD for Eclipse选中它旁边的复选框,然后单击Next。

You'll need to accept the license and confirm you want to install a plugin that is not digitally signed. 您需要接受许可,并确认要安装未进行数字签名的插件。

  • Restart eclipse. 重新开始蚀。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM