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 781049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:10:18+00:00 2026-05-14T20:10:18+00:00

Is there a way to tell maven (when doing mvn package , mvn site

  • 0

Is there a way to tell maven (when doing mvn package, mvn site or …) not to resolve the dependencies from the local repository?

Background of this question: Sometimes I get into problems, when previously cached dependencies (e.g. SomeProject-0.7-ALPHA) are no longer available in the remote repository. In my local build everything still works fine as the dependency has been cached before. As soon as I share my pom with others, they may get into trouble, as they dont have a cached version of that dependency and the dependency can no longer be resolved from the remote repository.

Any help will be appreciated. Thanks in advance!

  • 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-14T20:10:19+00:00Added an answer on May 14, 2026 at 8:10 pm

    Is there a way to tell maven (when doing mvn package, mvn site or …) not to resolve the dependencies from the local repository?

    No, that’s how the whole dependency resolution works (via the local repository).

    Sometimes I get into problems, when previously cached dependencies (e.g. SomeProject-0.7-ALPHA) are no longer available in the remote repository.

    Sorry for stating the obvious but removing dependencies from a remote repository is an horrible practice and leads to… well the kind of troubles you’re facing. If possible, avoid doing that.

    As soon as I share my pom with others, they may get into trouble, as they dont have a cached version of that dependency and the dependency can no longer be resolved from the remote repository.

    One way to check that things would work for others would be to purge the dependencies of the project you’re going to share from your local repository and to re-resolve them. Of course, doing this manually would be really painful but the good news is that the Maven Dependency Plugin has a purge-local-repository goal for that.

    mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:purge-local-repository  \
        -DreResolve=true \
        -DactTransitively=true \ 
        -Dverbose=true
    

    If this fails, then you know that something is missing and can’t be resolved anymore which is basically what you want to know. But you’ve also lost it so make a backup of your repository if this matters to you.

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

Sidebar

Related Questions

Is there a way to tell m2e to resolve eclipse variables before invoking maven?
Is there any way to tell GCC to not initialize a particular global array
Is there a way to tell excel to not display non-significant series in a
Is there a way to tell Visual Studio 2005 to not rearrange your SSIS
Is there a way to tell maven to continue the build although a dependency
Is there a way to tell Vim not to highlight a word once? For
If you are using closed repository, but your application uses some dependencies from external(maven
Is there any way to tell Yard not to clutter up my Rails project's
Is there any way to tell db4o to call class default constructor while activating
Is there a way to tell ifort or gfortran to just try to parse

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.