How to add PMD to maven ?

Discussion in 'Java' started by comp.lang.java.programmer, Feb 23, 2007.

  1. Anyone generated reports using PMD?
    If you did, then pl. give me the steps/ examples to add PMD plugin to
    maven.

    I couldn't find proper documentation from web. Any sample pom.xml will
    help.
     
    comp.lang.java.programmer, Feb 23, 2007
    #1
    1. Advertising

  2. "comp.lang.java.programmer" <> wrote in
    news::

    > Anyone generated reports using PMD?
    > If you did, then pl. give me the steps/ examples to add PMD plugin to
    > maven.


    I'd suggest that you might get a better and faster response, if you posted
    your query to the SourceForge forums for PMD. They're at
    <http://sourceforge.net/forum/?group_id=56262>.

    Cheers!

    --
    ---------------------------------------------------------------------
    Greg R. Broderick

    A. Top posters.
    Q. What is the most annoying thing on Usenet?
    ---------------------------------------------------------------------
     
    Greg R. Broderick, Feb 24, 2007
    #2
    1. Advertising

  3. Thanks for the info. I posted my question there.


    On Feb 24, 12:34 pm, "Greg R. Broderick" <gregb
    > wrote:
    > "comp.lang.java.programmer" <> wrote innews::
    >
    > > Anyone generated reports using PMD?
    > > If you did, then pl. give me the steps/ examples to add PMD plugin to
    > > maven.

    >
    > I'd suggest that you might get a better and faster response, if you posted
    > your query to the SourceForge forums for PMD. They're at
    > <http://sourceforge.net/forum/?group_id=56262>.
    >
    > Cheers!
    >
    > --
    > ---------------------------------------------------------------------
    > Greg R. Broderick
    >
    > A. Top posters.
    > Q. What is the most annoying thing on Usenet?
    > ---------------------------------------------------------------------
     
    comp.lang.java.programmer, Feb 26, 2007
    #3
  4. I added the PMD to maven.

    Here is the entry I added to pom.xml

    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-pmd-plugin</artifactId>
    </plugin>

    I am getting the following error while running the script.

    [INFO] Scanning for projects...
    [INFO] Searching repository for plugin with prefix: 'pmd'.
    [INFO]
    --------------------------------------------------------------------
    ----
    [ERROR] BUILD ERROR
    [INFO]
    --------------------------------------------------------------------
    ----
    [INFO] The plugin 'org.apache.maven.plugins:maven-pmd-plugin' does not
    exis
    t or no valid version could be found
    [INFO]
    --------------------------------------------------------------------
     
    comp.lang.java.programmer, Mar 9, 2007
    #4
  5. comp.lang.java.programmer wrote:
    > I added the PMD to maven.
    >
    > Here is the entry I added to pom.xml
    >
    > <plugin>
    > <groupId>org.apache.maven.plugins</groupId>
    > <artifactId>maven-pmd-plugin</artifactId>
    > </plugin>
    >
    > I am getting the following error while running the script.
    >
    > [INFO] Scanning for projects...
    > [INFO] Searching repository for plugin with prefix: 'pmd'.
    > [INFO]
    > --------------------------------------------------------------------
    > ----
    > [ERROR] BUILD ERROR
    > [INFO]
    > --------------------------------------------------------------------
    > ----
    > [INFO] The plugin 'org.apache.maven.plugins:maven-pmd-plugin' does not
    > exis
    > t or no valid version could be found
    > [INFO]
    > --------------------------------------------------------------------
    >
    >


    it means that your default repository does not have this artifact. Maybe
    you have to specify repository location explicitly.

    At this location:

    http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-pmd-plugin/

    there are few versions.

    Pick one of them. In your pom.xml file you can add

    <repositories>
    <repository>
    <id>central1</id>
    <name>Central Repository 1</name>
    <url>http://repo1.maven.org/maven2</url>
    </repository>
    </repositories>

    or some other location.

    Alexander.
     
    Alexander Shvets, Mar 10, 2007
    #5
  6. Thanks Alexander. It worked.
     
    Anand Balasubramanian, Mar 12, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sherman Haywood Cox II

    Maven and ejbc

    Sherman Haywood Cox II, Jul 25, 2003, in forum: Java
    Replies:
    0
    Views:
    471
    Sherman Haywood Cox II
    Jul 25, 2003
  2. steven

    maven and xdoclet

    steven, Nov 12, 2003, in forum: Java
    Replies:
    1
    Views:
    395
    Bryce (Work)
    Nov 12, 2003
  3. Marko Velic

    XP %HOME% and Maven

    Marko Velic, Jun 10, 2004, in forum: Java
    Replies:
    0
    Views:
    382
    Marko Velic
    Jun 10, 2004
  4. Marcin Cenkier
    Replies:
    1
    Views:
    5,504
    Marcin Cenkier
    Apr 12, 2006
  5. manos
    Replies:
    0
    Views:
    251
    manos
    Oct 6, 2007
Loading...

Share This Page