Wednesday, January 28, 2015

Maven good book

http://books.sonatype.com/mvnex-book/pdf/mvnex-pdf.pdf

PMD in Eclipse

Install

1.       In Eclipse, click on Help -> Install New Software...
2.       Click on Add.. Enter the following:
3.       Name: PMD for Eclipse Update Site
5.       You should see PMD for Eclipse 3. Select the checkbox next to it and click Next >
Usage
  1. Open new Perspective > Choose PMD
  2.  Open any file and right click > PMD > Check code with PMD
    Violation outline will list out all of the warnings.
    Navigate to the location of the code by double clicking on the warning.
Import Rule

1.       Go to Preferences > PMD > Rules Configuration
2.       Hit 'Clear All' to remove all the default rules.
3.       Import your rule file and click Ok

Check style in Eclipse

Install:
       - In Eclipse, click on Help -> Install New Software...
- Click on Add.. Enter the following: 
- Name: Checkstyle for Eclipse Update Site
- URL: http://eclipse-cs.sf.net/update/  and click OK.
- You should see Checkstyle. Select the checkbox next to it and click Next >

Usage:

- Open new View > Choose Checkstyle violations
- Open any file and right click > Checkstyle > Check code with Checkstyle

Import Rule:
- Go to Preferences > Checkstyle > Rules Configuration
- Choose new to import new rule set.
- Select type as “External configuration file”, browse the path to your rule file and click Ok.  Note: Remember to set your new rule as Default

 

FindBugs for Eclipse



Install

1.       In Eclipse, click on Help -> Install New Software...
2.       Click on Add.. Enter the following:
3.       Name: FindBugs for Eclipse
4.       URL: http://findbugs.cs.umd.edu/eclipse/ and click OK.
5.       You should see FindBugs. Select the checkbox next to it and click Next >

Usage:

    1. Open new Perspective > Choose FindBugs
    2. Open any file and right click > Find Bugs > Check code with Find Bugs 

Now you can see the list of bugs (potential risks, best practice issues) in Bug Explorer.
Click on each bug and then you can see in Bug Info the detail, description and suggestion to solve the bug.