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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:42:24+00:00 2026-05-31T18:42:24+00:00

I am very close to finally having a working setup with archiva and maven.

  • 0

I am very close to finally having a working setup with archiva and maven.

The last thing that’s really boggling me, is how to set up my internal and snapshot repositories – without using a profile which contains activeByDefault set to true.

I am using a SUPER super pom – a company-wide pom which contains distributionManagement information for releases. I was thinking that I could specify the repositories in this pom, and configure the authentication settings in settings.xml? Can I use repositories tag without a profile? There should be no “profile” for my internal and snapshot repositories, as they will never change…

What I’m trying to steer clear from, is using a “default” profile, which is active all the time. I hear activeByDefault is NOT a best practice and I don’t intend to use it.

With that said, how should I go about doing this? My internal repo is a mirror of the maven central repo, so I would like to lock down my developers to ONLY use our internal artifact server. Remember – I do NOT want a profile with activeByDefault set to true. I cannot stress this enough! Should I use Maven mirrors? Should I “add” additional repositories?

If I take the repositories tag instead of the mirrors tag, will maven force builds to use ONLY my archiva settings, instead of the default maven central?

Or is what I seek to accomplish able to be done using only the mirrors tag in maven? I know how to configure repo credentials when using repositories tag, but not with mirrors. How is this done? Is providing credentials for anything in mirrors tags the same as for anything in repositories tags?

Am I missing something obvious? I’ve had it up to here with getting things up and running using maven. I know it will be worthwhile in the end, but it is surely causing me a ton of aggravation and resources seem to be sparse. Either that, or people are content using it however they please without regard to best-practices.

Thank you

  • 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-31T18:42:26+00:00Added an answer on May 31, 2026 at 6:42 pm

    To use your internal repo as a mirror of central you need to setup a mirror like this (in settings.xml):

    <mirrors>
        <mirror>
            <id>my-internal-repo</id>
            <mirrorOf>central</mirrorOf> // use * for do mirror of all
            <name>Clinker Maven Repository</name>
            <url>http://my-repo-host/my-repo-path</url>
        </mirror>
    </mirrors>
    

    If my-internal-repo is protected you can set credentials:

    <servers>
        <server>
            <id>my-internal-repo</id>
            <username>youruser</username>
            <password>yourpassword</password>
        </server>
    </servers>
    

    Please, note the server id tag content should match the id of your mirror.

    To use your internal-snapshots repository you must set a repository in your project POM, since the use of snapshots artifact should be controlled and clearly defined at the project level, not at the settings level:

    <repository>
        <id>internal-snapshots</id>
        <url>http://your-repo-host/internal-snapshots-path</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
    

    And finally, you must exclude internal-snapshots from the mirror:

    <mirrors>
        <mirror>
            <id>my-internal-repo</id>
            <mirrorOf>central, !internal-snapshots</mirrorOf> // use * to do mirror of all
            <name>Clinker Maven Repository</name>
            <url>http://my-repo-host/my-repo-path</url>
        </mirror>
    </mirrors>
    

    and add a server (if it’s protected):

    <servers>
        <server>
            <id>my-internal-repo</id>
            <username>youruser</username>
            <password>yourpassword</password>
        </server>
        <server>
            <id>internal-snapshots</id>
            <username>youruser</username>
            <password>yourpassword</password>
        </server>
    </servers>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The jQuery attached is very close to working. It is returning (or appending) text
We have a game that is very close to being released, but we have
I would like to make a plot with ggplot that looks very close to
I feel I am very close, to my regex -9.99 through 0. I have
My question is very close to Setting id and className dynamically in Backbone.js views
I am looking for something very close to an application server with these features:
This SQL statement example is very close to what I think I need... update
I am attempting to style a page and its very close but I am
Ok, I am very close to the solution but I just can not figure
i have found an very good method for retrieving any result set from the

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.