Hello Michael, reading your Agile ALM book right now :-):
Here is an example how to get all servers with password decrypted: public class MyMojo extends AbstractMojo { /** * Maven settings. */ @Component private Settings settings; /** * The decrypter for passwords. */ @Component private SettingsDecrypter settingsDecrypter; /** * Returns the list of servers with decrypted passwords. * * @return list of servers with decrypted passwords. */ List<Server> getDecryptedServers() { final SettingsDecryptionRequest settingsDecryptionRequest = new DefaultSettingsDecryptionRequest(); settingsDecryptionRequest.setServers(settings.getServers()); final SettingsDecryptionResult decrypt = settingsDecrypter.decrypt(settingsDecryptionRequest); return decrypt.getServers(); } } Regards Mirko -- http://illegalstateexception.blogspot.com/ https://github.com/mfriedenhagen/ https://bitbucket.org/mfriedenhagen/ https://twitter.com/mfriedenhagen On Fri, Aug 24, 2012 at 11:36 AM, Michael Hüttermann <mich...@huettermann.net> wrote: > Hello, > > how can I (e.g. programmatically, in an own Maven plugin) access the > "server">"password" element of settings.xml, to re-use the value. Is there > any chance to do so? > > > > Thanks! > > Michael > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org