Maven: Read encrypted password from settings.xml in pom.xml
<p>I am trying to use an encrypted password in my settings.xml. I have in my pom.xml a plugin connecting to the database, usin sql-maven-plugin:</p>

<pre><code>&lt;plugin&gt;
  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
  &lt;artifactId&gt;sql-maven-plugin&lt;/artifactId&gt;
  &lt;version&gt;1.4&lt;/version&gt;

  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;com.oracle&lt;/groupId&gt;
      &lt;artifactId&gt;ojdbc14&lt;/artifactId&gt;
      &lt;version&gt;10.2.0.5.0&lt;/version&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;

  &lt;configuration&gt;
    &lt;driver&gt;oracle.jdbc.driver.OracleDriver&lt;/driver&gt;
    &lt;url&gt;jdbc:oracle:thin:@ip.com:1521:SID&lt;/url&gt;
    &lt;username&gt;someUser&lt;/username&gt;
    &lt;password&gt;{JucQpWS78Q0HW+3ZS/FCCGHQpwbJ8ySl2Io/ILJqf88=}&lt;/password&gt;
  &lt;/configuration&gt;

  &lt;executions&gt;
    &lt;execution&gt;
      &lt;id&gt;update-configuration&lt;/id&gt;
      &lt;phase&gt;package&lt;/phase&gt;
      &lt;goals&gt;
        &lt;goal&gt;execute&lt;/goal&gt;
      &lt;/goals&gt;
      &lt;configuration&gt;
        &lt;autocommit&gt;false&lt;/autocommit&gt;
        &lt;srcFiles&gt;
          &lt;srcFile&gt;src/main/sql/update_sim_configuration.sql&lt;/srcFile&gt;
        &lt;/srcFiles&gt;
      &lt;/configuration&gt;
    &lt;/execution&gt;

  &lt;/executions&gt;
&lt;/plugin&gt;
</code></pre>

<p>Which is working OK if I put the password as plain text in my pom.xml, I want to read this password from my settings.xml, the password is encrypted in this way:</p>

<pre><code>mvn -ep the_password
</code></pre>

<p>I have in my settings.xml</p>

<pre><code>...
&lt;server&gt;
  &lt;id&gt;rms13-db-dev&lt;/id&gt;
  &lt;username&gt;user&lt;/username&gt;
  &lt;password&gt;{JucQpWS78Q0HW+3ZS/FCCGHQpwbJ8ySl2Io/ILJqf88=}&lt;/password&gt;
&lt;/server&gt;
...
</code></pre>

<p>I want to 'read' decode in someway the 'password' from 'rms13-db-dev', how can I achieve this? or if you have an alternative version to achieve this.</p>