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:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<version>1.4</version>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.5.0</version>
</dependency>
</dependencies>
<configuration>
<driver>oracle.jdbc.driver.OracleDriver</driver>
<url>jdbc:oracle:thin:@ip.com:1521:SID</url>
<username>someUser</username>
<password>{JucQpWS78Q0HW+3ZS/FCCGHQpwbJ8ySl2Io/ILJqf88=}</password>
</configuration>
<executions>
<execution>
<id>update-configuration</id>
<phase>package</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<autocommit>false</autocommit>
<srcFiles>
<srcFile>src/main/sql/update_sim_configuration.sql</srcFile>
</srcFiles>
</configuration>
</execution>
</executions>
</plugin>
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:
mvn -ep the_password
I have in my settings.xml
...
<server>
<id>rms13-db-dev</id>
<username>user</username>
<password>{JucQpWS78Q0HW+3ZS/FCCGHQpwbJ8ySl2Io/ILJqf88=}</password>
</server>
...
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.