Git Product home page Git Product logo

Comments (2)

acanda avatar acanda commented on September 24, 2024

You can use your custom rule classes if you add your jar as an Eclipse plug-in fragment to your Eclipse installation. The host of the plug-in fragment must be ch.acanda.eclipse.pmd.core.

To convert the jar to a plug-in fragment you have to modify the file MANIFEST.MF file and add a few manifest headers. The following is a complete manifest of an Eclipse plug-in fragment:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Custom PMD Rules
Bundle-SymbolicName: org.example.customrules
Bundle-Version: 1.0.0
Fragment-Host: ch.acanda.eclipse.pmd.core;bundle-version="1.4.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7

You can choose your own values for the headers Bundle-Name, Bundle-SymbolicName and Bundle-Version. The value of the header Bundle-ManifestVersion must be 2. Fragment-Host must contain the symbolic name of the host bundle ch.acanda.eclipse.pmd.core and optionally the version of eclipse-pmd you have installed. Bundle-RequiredExecutionEnvironment specifies the minimum execution environment the plug-in fragment requires. Its value is JavaSE-1.7 if you compiled it with Java 7 or JavaSE-1.8 if you used Java 8.

Once you changed the manifest of your jar you can copy it into the folder dropins of your eclipse installation. Your plug-in fragment is installed when you start Eclipse.

from eclipse-pmd.

PrabakaranSK avatar PrabakaranSK commented on September 24, 2024

@acanda - It worked. Thanks a lot for prompt reply.

from eclipse-pmd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.