CheckStyle Integration with JDeveloper through Ant External Tools

When developers switch from Eclipse to JDeveloper they sometime find that a plug-in that they were using in Eclipse is not available for JDeveloper. In many of the cases a plug-in is not really needed since the functionality is already built-in in JDeveloper. But still sometimes developers would like to get a plug-in they were used to.

Case in point, Checkstyle - an open source utility that audits your Java code according to rules you define for it. JDeveloper has a built in Audit framework with lots of rules that you can turn on or off, and you can also add new audit rules and checks. But what if you want to leverage Checkstyle instead?

One solution is to build an extension that will integrate the two, but for a quicker - and more basic - solution you could opt for the Tools->External Tools option. This option has been there for ages now and allows you to invoke command line interfaces and pass parameters. In recent versions two new options were added that allow you to integrate either Ant or Maven scripts as well.

In this demo I show how to integrate CheckStyle into JDeveloper using this simple Ant script:

<?xml version="1.0" encoding="windows-1252" ?>
<project xmlns="antlib:org.apache.tools.ant" name="Project1" default="all" basedir=".">
    <taskdef resource="checkstyletask.properties" classpath="checkstyle-5.5-all.jar"/>
    <target name="checkstyleAll">
        <checkstyle config="sun_checks.xml">
            <fileset dir="${dir}" includes="**/*.java"/>
        </checkstyle>
    </target>
    <target name="checkstyle">
        <checkstyle config="sun_checks.xml" file="${file}"></checkstyle>
    </target>
</project>

 Here are the steps:


Comments:

thanks

Posted by guest on May 31, 2012 at 01:22 AM PDT #

i am able to customize the look and feel according to my requirement but i have problem in customizing af:selectOneChoice content drop down image.
Could you please provide some input on this.

Posted by guest on June 06, 2012 at 12:28 PM PDT #

guest - I'm not sure what this question has to do with this specific blog entry - you should probably post this on the OTN discussion forum though.
A basic demo of skinning the selectOneChoice is here:
http://jdevadf.oracle.com/adf-richclient-demo/faces/components/skinningKeys/selectOneChoice.jspx

Posted by Shay on June 06, 2012 at 02:01 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today