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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:24:58+00:00 2026-06-11T02:24:58+00:00

I know that it is possible to encrypt a password and put the encrypted

  • 0

I know that it is possible to encrypt a password and put the encrypted data in the settings.xml, so that Maven can access a remote server (for deployment, etc.).

However, in my case, the password is a parameter in the configuration of a third-party plugin.

Normally, the pom.xml configuration for this plugin looks like that:

<build>
    <plugins>
        <plugin>
            <groupId>xxx</groupId>
            <artifactId>maven-xxx-plugin</artifactId>
            ...
            <configuration>
                <serverAddress>http://myserver</serverAddress>
                <port>4242</port>
                <username>unicorn</username>
                <password>thePassword</password>
                ...

But I don’t like the idea to set the password in plain text in my pom.xml. So I tried to set it as a property (<password>${encrypted.password}</password>) and set the encrypted password in the settings.xml file, using mvn --encrypt-password thePassword command:

<profiles>
    <profile>
        <id>myprofile</id>
        <properties>
            <!-- Encrypted passwords -->
            <encrypted.password>{dJXVRKwRiY8HqzhGecHd/MYju/aIEmMT8cnE6MY53uPNr0ro/CAsXSLlgzEjxYeU}</encrypted.password>
        </properties>

Unfortunately, this does not work (I suspect that the plugin uses the encrypted password as a “clear” password, and does not try to decrypt it).

Is there a way to make it work? If not, what are the alternative to avoid putting plain text password in pom.xml or settings.xml?

Thanks.

ps: I’m using Maven 2.2.1, but I can also use Maven 3.0 if 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-11T02:25:00+00:00Added an answer on June 11, 2026 at 2:25 am

    Maven provided the necessary support to encrypt passwords in settings.xml, and for plugins to retrieve them. See for example SqlExecMojo.java.

    Plugins “just” have to use this feature to be more user-friendly with credentials management.

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

Sidebar

Related Questions

I know that it is possible read and write data from mongodb via hadoop.
I'm running a query to mysql that returns encrypted data. I'd like, if possible,
I know that RSACryptoServiceProvider can encrypt with the public key, then it can be
I am curious to know that could it be possible that in the below
I know that it's possible to implicitly provide asynchronous interaction using: Asynchronous Delegates Asynchronous
I know that it is possible to add swf metadata to the compile command
I know that it is possible to create .xls files from Delphi using ADO,
I know that it is possible to read commands output with a pipe? But
So I know that it's possible to create scripts for use on spreadsheets using
I just came to know that it's possible to record call voice (both incoming

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.