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

  • Home
  • SEARCH
  • 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 8702001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:32:29+00:00 2026-06-13T02:32:29+00:00

I work as a consultat for two different companies that both use maven and

  • 0

I work as a consultat for two different companies that both use maven and that both have their own nexus repository managers. I have used maven with both repository managers and it works fine but every time I switch customer I need to change my settings.xml file where the address for the repository manager is located.

Is there a way to go around this? To make Maven figure out what repository mangager to use based on what project I am building? I can easily edit the pom-files in both projects and activate different profiles if that is needed.

  • 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-06-13T02:32:30+00:00Added an answer on June 13, 2026 at 2:32 am

    Thanks for all your answers, however I finally had a different approach, and that was to disable the central repository and add the projects nexus repository in each pom.

    The downside of this is that if it is to work fully, it needs to be in every pom, not just the parent.

    However, it is a one-time configuration for each project and the only thing each developer needs to add to their settings.xml is their credentials for the nexus repo which makes the startup for new developers simpler.

    Another downside is that if I run maven outside of a project, like archetype:generate maven is not aware of my nexus repo and I need to specify that on the command line. I believe I could configure a default repo in my settings.xml but I haven’t explored that further.

    I also never have to think about which project I am working on, when I run maven the project knows which repository to use and this is very important to me.

    I suspect that not everyone may agree that this is the best solution but it works for me and the overhead is acceptable.

    This is how my configuration in each pom looks like

        <repositories>
          <repository>
            <id>my-nexus-repo</id>
            <url>http://nexus.mycompany.com/content/groups/private/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>central</id>
            <url>http://repo1.maven.org/maven2</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>my-nexus-repo</id>
            <url>http://nexus.mycompany.com/content/groups/private/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>central</id>
            <url>http://repo1.maven.org/maven2</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my work environment, we have a number of Enterprise Java applications that run
Work on C# Desktop project,I have an account on paypal ,From my desktop application
Work on asp.net vs05. I have three type of value Like:IsDesign,IsPrinting,IsInstall they are bit
Work on this small test application to learn threading/locking. I have the following code,
I work with unordered_set . Here it's written that it has a reserve function
First some background: The company I work for have decided to create an iPhone
As a consultant I might have to deal with different Git repositories, BeanStalk, BitBucket,
I have heard several people claiming that you can not scale the JVM heap
Let's say that I have following situation. I have many customers and many consultans,
I have two dropdownlistfor , and the second of them should be filled with

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.