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
/** 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
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 {
>
> /**
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
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
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
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