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
DELETE_GO_SUM_FLAG_FILE, GO_MOD_FILE_NAME_BAKFields inherited from class com.igormaznitsa.mvngolang.AbstractGolangMojo
buildFlagsToIgnore, ENV_GO111MODULE, GO_MOD_FILE_NAME, GO_SUM_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, String consoleOut, String consoleErr)protected booleandoesNeedSessionLock()StringgetBranch()String[]getCustomCvsOptions()CustomScriptgetCustomScript()StringgetCvsExe()booleangetDeleteCommonPkg()StringgetExternalPackageFile()StringgetGoCommand()String[]getPackages()StringgetRelativePathToCvsFolder()StringgetRevision()protected StringgetSkipMojoPropertySuffix()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, findMvnProperty, 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
-
getPackages
- Overrides:
getPackagesin classAbstractGoPackageAndDependencyAwareMojo
-
getCustomScript
-
isDisableCvsAutoSearch
public boolean isDisableCvsAutoSearch() -
getDeleteCommonPkg
public boolean getDeleteCommonPkg() -
getSkipMojoPropertySuffix
- Overrides:
getSkipMojoPropertySuffixin classAbstractGolangMojo
-
isSkip
public boolean isSkip()- Overrides:
isSkipin classAbstractGolangMojo
-
getCustomCvsOptions
-
getRelativePathToCvsFolder
-
isAutoFixGitCache
public boolean isAutoFixGitCache() -
isEnforceDeletePackageFiles
public boolean isEnforceDeletePackageFiles() -
getRevision
-
getBranch
-
getTag
-
getCvsExe
-
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 String consoleOut, @Nonnull String consoleErr) throws IOException, org.apache.maven.plugin.MojoExecutionException- Overrides:
doesNeedOneMoreAttemptin classAbstractGolangMojo- Throws:
IOExceptionorg.apache.maven.plugin.MojoExecutionException
-