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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:08:17+00:00 2026-05-11T18:08:17+00:00

I am trying to setup a shared authentication system on a build server. We

  • 0

I am trying to setup a shared authentication system on a build server.
We have several maven projects that declares how the deployment should be done regarding the different teams that we have (each team has its own authentication user/password):

<profile>
  <id>release-profile</id>
  <distributionManagement>
    <repository>
        <id>rep-releases</id>
        <name>rep-releases</name>
        <url>http://somewhere-releases</url>
    </repository>
    <snapshotRepository>
        <id>rep-snapshots</id>
        <name>rep-snapshots</name>
        <url>http://somewhere-snapshots</url>
    </snapshotRepository>
  </distributionManagement>
</profile>    

Then I declare in the settings.xml the authentification to the declared servers as following:

<servers>
  <server>
    <id>rep-releases</id>
    <username>${release.user.name}</username>
    <password>${release.user.password}</password>
  </server>     
  <server>
    <id>rep-snapshots</id>
    <username>${release.user.name}</username>
    <password>${release.user.password}</password>
  </server>      
</servers>

Finally, depending on the projects I want to deploy I have several profiles defined in the settings.xml of the build server:

<profile>
  <id>dep-team1</id>
  <activation>
    <activeByDefault>false</activeByDefault>
  </activation>
  <properties>
    <release.user.name>team1-user</release.user.name>
    <release.user.password>team1-password</release.user.password>
  </properties>
</profile>

The problem is that when doing a deploy of the project I got an authentication error (HTTP 401) like the following:

Error deploying artifact: Failed to transfer file: http://......./my-project-0.2-20090423.123247-3.pom. Return code is: 401

If I modify the server authentication by replacing the properties with the user/password of the team, all is working fine.

Don’t the tags <servers><server> accept values as properties?

How do others setup their build system in order to achieve the same?

Thanks for your help.

Edit: I am using hudson, a solution for me can be to install several time maven2 and have duplicated settings (except user/password) for each team and tie each project to the good maven installation. I must admit that this solution does not enchant me…

  • 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-11T18:08:17+00:00Added an answer on May 11, 2026 at 6:08 pm

    The easiest and most direct method if you have multiple teams and thus multiple auth schemes, is just use a different id in the distributionManagement. So instead of rep-releases/rep-snapshots, you can have team1-repo / team2-repo (there’s generally no value in separating the auth between release and snapshots…particularly if you use a repo manager with good security controls)

    Then in the settings of your build machine, just define a user and password for each team for the build server.

    This approach does have a draw back that it would mess up inheritence if you defined the repos in a single corporate pom…but if you have a team level pom it would be easy.

    Another thought is why does the same build machine need to login as a different person when doing builds? Shouldn’t that build machine have mostly full access?

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

Sidebar

Ask A Question

Stats

  • Questions 149k
  • Answers 149k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer function validate_form_checks() { var error; // check whether the available… May 12, 2026 at 9:31 am
  • Editorial Team
    Editorial Team added an answer Two steps: You may need to use a Javascript's window.onunload… May 12, 2026 at 9:31 am
  • Editorial Team
    Editorial Team added an answer You need some sort of persistent data storage, whether that's… May 12, 2026 at 9:31 am

Related Questions

I am learning linq to sql and I am trying to setup a lookup
I am using shared hosting with IIS7 and support for PHP. I am trying
The following code is a combination of samples taken from red5. Basically I am
I am trying to add a port to my local repo in MacPorts. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.