Class AbstractMavenExecutor
- java.lang.Object
-
- org.apache.maven.shared.release.exec.AbstractMavenExecutor
-
- All Implemented Interfaces:
MavenExecutor
,org.codehaus.plexus.logging.LogEnabled
- Direct Known Subclasses:
ForkedMavenExecutor
,InvokerMavenExecutor
public abstract class AbstractMavenExecutor extends java.lang.Object implements MavenExecutor, org.codehaus.plexus.logging.LogEnabled
-
-
Field Summary
Fields Modifier and Type Field Description private org.sonatype.plexus.components.cipher.PlexusCipher
cipher
private org.codehaus.plexus.logging.Logger
logger
private org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher
secDispatcher
When this plugin requires Maven 3.0 as minimum, this component can be removed and o.a.m.s.c.SettingsDecrypter be used instead.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMavenExecutor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
enableLogging(org.codehaus.plexus.logging.Logger logger)
private java.lang.String
encryptAndDecorate(java.lang.String passwd)
protected org.apache.maven.settings.Settings
encryptSettings(org.apache.maven.settings.Settings settings)
void
executeGoals(java.io.File workingDirectory, java.lang.String goals, ReleaseEnvironment releaseEnvironment, boolean interactive, java.lang.String additionalArguments, java.lang.String pomFileName, ReleaseResult result)
Execute goals using Maven.protected abstract void
executeGoals(java.io.File workingDirectory, java.util.List<java.lang.String> goals, ReleaseEnvironment releaseEnvironment, boolean interactive, java.lang.String additionalArguments, java.lang.String pomFileName, ReleaseResult result)
protected org.codehaus.plexus.logging.Logger
getLogger()
protected org.apache.maven.settings.io.xpp3.SettingsXpp3Writer
getSettingsWriter()
private boolean
isEncryptedString(java.lang.String str)
-
-
-
Field Detail
-
logger
private org.codehaus.plexus.logging.Logger logger
-
secDispatcher
@Requirement(role=org.sonatype.plexus.components.sec.dispatcher.SecDispatcher.class, hint="mng-4384") private org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher secDispatcher
When this plugin requires Maven 3.0 as minimum, this component can be removed and o.a.m.s.c.SettingsDecrypter be used instead.
-
cipher
@Requirement private org.sonatype.plexus.components.cipher.PlexusCipher cipher
-
-
Method Detail
-
executeGoals
public void executeGoals(java.io.File workingDirectory, java.lang.String goals, ReleaseEnvironment releaseEnvironment, boolean interactive, java.lang.String additionalArguments, java.lang.String pomFileName, ReleaseResult result) throws MavenExecutorException
Description copied from interface:MavenExecutor
Execute goals using Maven.- Specified by:
executeGoals
in interfaceMavenExecutor
- Parameters:
workingDirectory
- the directory to execute ingoals
- the goals to run (space delimited)releaseEnvironment
- the environmental settings, maven-home, etc used for this releaseinteractive
- whether to execute in interactive mode, or the default batch modeadditionalArguments
- additional arguments to pass to the Maven commandpomFileName
- the file name of the POM to execute onresult
- holds all results of the execution- Throws:
MavenExecutorException
- if an error occurred executing Maven
-
executeGoals
protected abstract void executeGoals(java.io.File workingDirectory, java.util.List<java.lang.String> goals, ReleaseEnvironment releaseEnvironment, boolean interactive, java.lang.String additionalArguments, java.lang.String pomFileName, ReleaseResult result) throws MavenExecutorException
- Throws:
MavenExecutorException
-
getLogger
protected final org.codehaus.plexus.logging.Logger getLogger()
-
enableLogging
public void enableLogging(org.codehaus.plexus.logging.Logger logger)
- Specified by:
enableLogging
in interfaceorg.codehaus.plexus.logging.LogEnabled
-
encryptSettings
protected org.apache.maven.settings.Settings encryptSettings(org.apache.maven.settings.Settings settings)
-
encryptAndDecorate
private java.lang.String encryptAndDecorate(java.lang.String passwd) throws java.lang.IllegalStateException, org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException, org.sonatype.plexus.components.cipher.PlexusCipherException
- Throws:
java.lang.IllegalStateException
org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException
org.sonatype.plexus.components.cipher.PlexusCipherException
-
isEncryptedString
private boolean isEncryptedString(java.lang.String str)
-
getSettingsWriter
protected org.apache.maven.settings.io.xpp3.SettingsXpp3Writer getSettingsWriter()
-
-