Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1022749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:30:42+00:00 2026-05-16T11:30:42+00:00

How can I lock the version of a Maven plugin I want to use?

  • 0

How can I lock the version of a Maven plugin I want to use?

I have the PMD plugin configured like so:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <outputDirectory>target/pmd</outputDirectory>
                    <targetDirectory>target/</targetDirectory>
                    <aggregate>true</aggregate>
                    <targetJdk>1.6</targetJdk>
                    <rulesets>
                        <ruleset>rulesets/basic.xml</ruleset>
                        <ruleset>rulesets/codesize.xml</ruleset>
                        <ruleset>rulesets/coupling.xml</ruleset>
                        <ruleset>rulesets/design.xml</ruleset>
                        <ruleset>rulesets/imports.xml</ruleset>
                        <ruleset>rulesets/logging-java.xml</ruleset>
                        <ruleset>rulesets/optimizations.xml</ruleset>
                        <ruleset>rulesets/strings.xml</ruleset>
                        <ruleset>rulesets/unusedcode.xml</ruleset>
                    </rulesets>
                </configuration>
            </plugin>

Last night, my nightly build failed and I can no longer run any pmd goals because it is trying to find version 2.6-SNAPSHOT of that plugin. Why is it even trying to find 2.6-SNAPSHOT if I have a version tag that says 2.5? Also, 2.6-SNAPSHOT is not in central – why does my maven client think it exists?

Maven version: 2.0.9
Java version: 1.6.0_17
OS name: “linux” version: “2.6.24-24-generic” arch: “i386” Family: “unix”

Edit:

I upgraded to maven 2.2.1 and observed the same issue as before. I was able to get the project to build by removing 2.6-SNAPSHOT from the metadata in my repository (.m2/repository/org/apache/maven/plugins/maven-pmd-plugin/maven-metadata-central.xml). I also set the latestVersion tag to 2.5. This is obviously not the solution, because I’d have to either deploy my own plugin or change the cached version on all clients.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:30:43+00:00Added an answer on May 16, 2026 at 11:30 am

    Standard procedure in such cases: delete the corresponding plugin folder in your local repo:

    .m2/repository/org/apache/maven/plugins/maven-pmd-plugin/
    

    This helps in most cases.

    If not, you are probably getting bad data from a repository. If you are using a nexus, rebuild the index.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database and want to lock it ... I know I can
When i use RollingFileAppender with Log4cplus,Log4cplus LOCK the file. How can set minimal lock
As we all know,we can use such api as LockWorkStation() in user32.dll to lock
I have this code ,now can anyone reply s what happens to the lock
In SQLServer, you can use syntax (nolock) to ensure the query doesn't lock the
Hibernate complains, Caused by: java.lang.UnsupportedOperationException: Can't write to a readonly object at org.hibernate.cache.ReadOnlyCache.lock(ReadOnlyCache.java:68) for
I'm attempting to write a lock-free version of a call queue I use for
Can you somehow lock an iPad to Safari and only one webpage? I've found
Possible Duplicate: How can I detect if caps lock is toggled in Swing? How
In Java an Object itself can act as a lock for guarding its own

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.