Package com.igormaznitsa.mvngolang
Class GolangGetMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.igormaznitsa.mvngolang.AbstractGolangMojo
com.igormaznitsa.mvngolang.AbstractGoDependencyAwareMojo
com.igormaznitsa.mvngolang.AbstractGoPackageAndDependencyAwareMojo
com.igormaznitsa.mvngolang.GolangGetMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="get",
defaultPhase=INITIALIZE,
threadSafe=true,
requiresDependencyResolution=NONE)
public class GolangGetMojo
extends AbstractGoPackageAndDependencyAwareMojo
The Mojo wraps the 'get' command.
-
Field Summary
Fields inherited from class com.igormaznitsa.mvngolang.AbstractGoDependencyAwareMojo
GO_MOD_FILE_NAME_BAKFields inherited from class com.igormaznitsa.mvngolang.AbstractGolangMojo
buildFlagsToIgnore, ENV_GO111MODULE, GO_MOD_FILE_NAME, GOARTIFACT_PACKAGING, NAME_PATTERN, settings, tempBuildFlags -
Constructor Summary
Constructors Constructor Description GolangGetMojo() -
Method Summary
Modifier and Type Method Description voidbeforeExecution(ProxySettings proxySettings)protected booleandoesNeedOneMoreAttempt(org.zeroturnaround.exec.ProcessResult processResult, java.lang.String consoleOut, java.lang.String consoleErr)protected booleandoesNeedSessionLock()java.lang.StringgetBranch()java.lang.String[]getCustomCvsOptions()CustomScriptgetCustomScript()java.lang.StringgetCvsExe()booleangetDeleteCommonPkg()java.lang.StringgetExternalPackageFile()java.lang.StringgetGoCommand()java.lang.String[]getPackages()java.lang.StringgetRelativePathToCvsFolder()java.lang.StringgetRevision()protected java.lang.StringgetSkipMojoPropertySuffix()java.lang.StringgetTag()booleanisAllowLockSession()booleanisAutoFixGitCache()booleanisCommandSupportVerbose()booleanisDisableCvsAutosearch()booleanisEnforceDeletePackageFiles()booleanisEnforcePrintOutput()booleanisMojoMustNotBeExecuted()booleanisSkip()voidsetAllowLockSession(boolean flag)Methods inherited from class com.igormaznitsa.mvngolang.AbstractGoPackageAndDependencyAwareMojo
getCommandFlags, getDefaultPackages, getTailArguments, setPackagesMethods inherited from class com.igormaznitsa.mvngolang.AbstractGoDependencyAwareMojo
afterExecution, doInit, getDependencyTempFolder, getSpecialPartOfGoPath, isIncludeTestDependencies, isRestoreGoMod, isScanDependencies, isSyncSessionIfModules, setDependencyTempFolder, setIncludeTestDependencies, setScanDependencies, setSyncSessionIfModulesMethods inherited from class com.igormaznitsa.mvngolang.AbstractGolangMojo
adaptExecNameForOS, addTmpBuildFlagIfNotPresented, doMainBusiness, execute, findAllGoModsInFolder, findExisting, findGoPath, findGoRoot, findGoRootBootstrap, getArch, getArtifactResolver, getBuildFlags, getConnectionTimeout, getEnv, getErrLogFile, getExec, getExecSubpath, getExecution, getExtraBuildFlags, getGoBin, getGoCache, getGoPath, getGoRoot, getGoRootBootstrap, getGoVersion, getOptionalExtraTailArguments, getOs, getOSXVersion, getOutLogFile, getProject, getProxy, getRemoteRepositories, getReportsFolder, getSdkArchiveName, getSdkDownloadUrl, getSdkSite, getSession, getSources, getStoreFolder, getSupposeSdkArchiveFileName, getTarget386, getTargetArch, getTargetArm, getTargetOS, getTempFileFolder, getUseGoTool, getWorkingDir, getWorkingDirectoryForExecutor, initConsoleBuffers, isCheckSdkHash, isDisableSdkLoad, isDisableSslCheck, isEnforceGoPathToEnd, isFilterEnvPath, isHideBanner, isIgnoreErrorExitCode, isKeepSdkArchive, isKeepUnarchFolderIfError, isModuleMode, isSourceFolderRequired, isUseEnvVars, isUseMavenProxy, isVerbose, logOptionally, makeExecutableFileSubpath, makePathFromExtraGoPathElements, prepareExecutor, printLogs, processConsoleOut, registerEnvVars, registerOutputBuffers, setDisableSslCheck, setModuleMode, setWorkingDir
-
Constructor Details
-
GolangGetMojo
public GolangGetMojo()
-
-
Method Details
-
isAllowLockSession
public boolean isAllowLockSession() -
setAllowLockSession
public void setAllowLockSession(boolean flag) -
getExternalPackageFile
@Nullable public java.lang.String getExternalPackageFile() -
getPackages
@Nonnull @MustNotContainNull public java.lang.String[] getPackages()- Overrides:
getPackagesin classAbstractGoPackageAndDependencyAwareMojo
-
getCustomScript
-
isDisableCvsAutosearch
public boolean isDisableCvsAutosearch() -
getDeleteCommonPkg
public boolean getDeleteCommonPkg() -
getSkipMojoPropertySuffix
@Nullable protected java.lang.String getSkipMojoPropertySuffix()- Overrides:
getSkipMojoPropertySuffixin classAbstractGolangMojo
-
isSkip
public boolean isSkip()- Overrides:
isSkipin classAbstractGolangMojo
-
getCustomCvsOptions
@Nullable @MustNotContainNull public java.lang.String[] getCustomCvsOptions() -
getRelativePathToCvsFolder
@Nullable public java.lang.String getRelativePathToCvsFolder() -
isAutoFixGitCache
public boolean isAutoFixGitCache() -
isEnforceDeletePackageFiles
public boolean isEnforceDeletePackageFiles() -
getRevision
@Nullable public java.lang.String getRevision() -
getBranch
@Nullable public java.lang.String getBranch() -
getTag
@Nullable public java.lang.String getTag() -
getCvsExe
@Nullable public java.lang.String getCvsExe() -
getGoCommand
@Nonnull public java.lang.String getGoCommand()- Specified by:
getGoCommandin classAbstractGolangMojo
-
isEnforcePrintOutput
public boolean isEnforcePrintOutput()- Overrides:
isEnforcePrintOutputin classAbstractGolangMojo
-
isMojoMustNotBeExecuted
public boolean isMojoMustNotBeExecuted() throws org.apache.maven.plugin.MojoFailureException- Overrides:
isMojoMustNotBeExecutedin classAbstractGolangMojo- Throws:
org.apache.maven.plugin.MojoFailureException
-
doesNeedSessionLock
protected boolean doesNeedSessionLock()- Overrides:
doesNeedSessionLockin classAbstractGoDependencyAwareMojo
-
beforeExecution
public void beforeExecution(@Nullable ProxySettings proxySettings) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException- Overrides:
beforeExecutionin classAbstractGolangMojo- Throws:
org.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionException
-
isCommandSupportVerbose
public boolean isCommandSupportVerbose()- Overrides:
isCommandSupportVerbosein classAbstractGolangMojo
-
doesNeedOneMoreAttempt
protected boolean doesNeedOneMoreAttempt(@Nonnull org.zeroturnaround.exec.ProcessResult processResult, @Nonnull java.lang.String consoleOut, @Nonnull java.lang.String consoleErr) throws java.io.IOException, org.apache.maven.plugin.MojoExecutionException- Overrides:
doesNeedOneMoreAttemptin classAbstractGolangMojo- Throws:
java.io.IOExceptionorg.apache.maven.plugin.MojoExecutionException
-