Re: access password in settings.xml

2012-08-28 Thread Manfred Moser
On Mon, August 27, 2012 1:11 pm, Mirko Friedenhagen wrote: > /** Imports */ > import java.util.List; > import org.apache.maven.plugin.AbstractMojo; > import org.apache.maven.plugin.MojoExecutionException; > import org.apache.maven.plugin.MojoFailureException; > import org.apache.maven.plugins.annot

Re: access password in settings.xml

2012-08-27 Thread Mirko Friedenhagen
/** Imports */ import java.util.List; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.Component; import org.apache.maven.settings.Server; import org.a

Re: access password in settings.xml

2012-08-27 Thread Michael Hüttermann
Hi Mirko, thanks! What are the necessary imports and the POM dependencies for that? Thanks. Michael > 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 { > > /**

RE: access password in settings.xml

2012-08-25 Thread Martin Gainty
7;information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Fri, 24 Aug 2012 22:15:19 -0700 > Subject

Re: access password in settings.xml

2012-08-24 Thread Manfred Moser
On Fri, August 24, 2012 2:36 am, Michael Hüttermann 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? Btw. you can also access collections from settings or pom

Re: access password in settings.xml

2012-08-24 Thread Mirko Friedenhagen
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

Re: access password in settings.xml

2012-08-24 Thread Olivier Lamy
Maybe with : /** * The Maven Wagon manager to use when obtaining server authentication details. */ @Component private WagonManager wagonManager; AuthenticationInfo info = wagonManager.getAuthenticationInfo( server ); server is the serverId String. or using /** * T