@Mojo(name="share-server-secret",
defaultPhase=INITIALIZE,
requiresProject=true)
public class ShareServerSecretPlugin
extends AbstractPlugin
serverId,
fill the properties :
usernameOut passwordOut privateKeyOut passphraseOut
| Modifier and Type | Class and Description |
|---|---|
static class |
ShareServerSecretPlugin.Property |
Plugin.InitState, Plugin.Packaging| Modifier and Type | Field and Description |
|---|---|
protected String |
passphraseOut
The name of the property where to export the passphrase of the server.
|
protected String |
passwordOut
The name of the property where to export the password of the server.
|
protected String |
privateKeyOut
The name of the property where to export the private key of the server.
|
protected org.apache.maven.project.MavenProject |
project
Project.
|
protected boolean |
runOnce
A flag to execute only once the mojo.
|
protected org.sonatype.plexus.components.sec.dispatcher.SecDispatcher |
sec
password decypher
|
protected String |
serverId
Server id to use for authentication (must be defined in your setting
and use the maven >= 2.1.0 password encryption mecanism).
|
protected org.apache.maven.settings.Settings |
settings
Settings.
|
protected String |
usernameOut
The name of the property where to export the username of the server.
|
protected boolean |
verbose
A flag to activate verbose mode.
|
| Constructor and Description |
|---|
ShareServerSecretPlugin() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkSkip()
Checks if the mojo execution should be skipped.
|
protected void |
doAction()
Do plugin action.
|
String |
getPassphraseOut() |
String |
getPasswordOut() |
String |
getPrivateKeyOut() |
org.apache.maven.project.MavenProject |
getProject() |
String |
getServerId() |
String |
getUsernameOut() |
void |
init()
Method to initialize the mojo before doing any concrete actions.
|
boolean |
isVerbose() |
void |
setPassphraseOut(String passphraseOut) |
void |
setPasswordOut(String passwordOut) |
void |
setPrivateKeyOut(String privateKeyOut) |
void |
setProject(org.apache.maven.project.MavenProject project) |
void |
setRunOnce(boolean runOnce) |
void |
setSec(org.sonatype.plexus.components.sec.dispatcher.SecDispatcher sec) |
void |
setServerId(String serverId) |
void |
setSettings(org.apache.maven.settings.Settings settings) |
void |
setUsernameOut(String usernameOut) |
void |
setVerbose(boolean verbose) |
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkEncoding, checkPackaging, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFilegetLog, getPluginContext, setLog, setPluginContext@Component protected org.apache.maven.project.MavenProject project
@Component protected org.apache.maven.settings.Settings settings
@Parameter(property="helper.serverId",
required=true)
protected String serverId
@Parameter protected String usernameOut
@Parameter protected String passwordOut
@Parameter protected String passphraseOut
@Parameter protected String privateKeyOut
@Parameter(property="helper.verbose",
defaultValue="${maven.verbose}")
protected boolean verbose
@Parameter(property="helper.runOnce",
defaultValue="true")
protected boolean runOnce
true since it is not necessary
to inject twice secrets in session.@Component(hint="maven-helper-plugin") protected org.sonatype.plexus.components.sec.dispatcher.SecDispatcher sec
public void init()
throws Exception
AbstractPluginAbstractPlugin.doAction() method.
init in class AbstractPluginException - if anypublic boolean checkSkip()
AbstractPlugincheckSkip in class AbstractPluginfalse if the mojo should not be executed.protected void doAction()
throws Exception
AbstractPluginAbstractPlugin.execute() invoke this method only and only if :
AbstractPlugin.checkPackaging() returns true.AbstractPlugin.init() returns true.doAction in class AbstractPluginException - if anypublic org.apache.maven.project.MavenProject getProject()
public void setProject(org.apache.maven.project.MavenProject project)
public boolean isVerbose()
public void setVerbose(boolean verbose)
public String getPassphraseOut()
public void setPassphraseOut(String passphraseOut)
public String getPasswordOut()
public void setPasswordOut(String passwordOut)
public String getPrivateKeyOut()
public void setPrivateKeyOut(String privateKeyOut)
public String getUsernameOut()
public void setUsernameOut(String usernameOut)
public String getServerId()
public void setServerId(String serverId)
public void setSec(org.sonatype.plexus.components.sec.dispatcher.SecDispatcher sec)
public void setSettings(org.apache.maven.settings.Settings settings)
public void setRunOnce(boolean runOnce)
Copyright © 2009-2012 CodeLutin. All Rights Reserved.