shyiko / servers-maven-extension

Maven extension for exposing settings.xml/servers to ${}
23 stars 4 forks source link

Support Encrypted password #2

Closed sbouchet closed 9 years ago

sbouchet commented 9 years ago

Hi,

your plugin is great, but i cannot use an encrypted password :(

http://maven.apache.org/guides/mini/guide-encryption.html

it seems possible to do so, for example the maven-gae-plugin can do it.

Can you add this support in some next version ?

Regards,

shyiko commented 9 years ago

Hi. If you could provide a sample project (describing actual & expected behaviors) it would greatly increase chances of me fixing the issue. Thank you.

sbouchet commented 9 years ago

sure. below is a settings.xml file with encrypted password :

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <servers>
        <server>
            <id>my_server</id>
            <username>myusername</username>
            <password>{EVNtH1Cq8twHxl3fyX4sPct+9j2A2WraIcltI8QMJac=}</password>
        </server>
    </servers>
</settings>

I can use your plugin, but the result of the ${settings.servers.server.my_server.password} evaluation is the encrypted password, whereas i expect to have the decrypted one. looking at the gae-plugin , it should be possible to interact with the security manager in the pojo class. https://github.com/maven-gae-plugin/maven-gae-plugin/blob/master/maven-gae-plugin/src/main/java/net/kindleit/gae/EngineGoalBase.java

regards

shyiko commented 9 years ago

Should become available through Maven Central (release 0.3.0) in the next 24h. Thanks a lot :beer:

sbouchet commented 9 years ago

great ! tested today, it works :+1:

BTW, the correct version is 1.3.0, not 0.3.0 :smile: