Package com.igormaznitsa.mvngolang
Class GolangGetMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- 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 AbstractModuleAwareThe Mojo wraps the 'get' command.
-
-
Field Summary
-
Fields inherited from class com.igormaznitsa.mvngolang.AbstractModuleAware
mod
-
Fields inherited from class com.igormaznitsa.mvngolang.AbstractGoDependencyAwareMojo
DELETE_GO_SUM_FLAG_FILE, GO_MOD_FILE_NAME_BAK
-
Fields 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
All Methods Instance Methods Concrete Methods 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.AbstractModuleAware
getAdditionalCommandFlags, getCommandFlags, getMod
-
Methods inherited from class com.igormaznitsa.mvngolang.AbstractGoPackageAndDependencyAwareMojo
getDefaultPackages, getTailArguments, setPackages
-
Methods inherited from class com.igormaznitsa.mvngolang.AbstractGoDependencyAwareMojo
afterExecution, doInit, getDependencyTempFolder, getSpecialPartOfGoPath, isDeleteSumFile, isIncludeTestDependencies, isRestoreGoMod, isScanDependencies, isSyncSessionIfModules, setDependencyTempFolder, setIncludeTestDependencies, setScanDependencies, setSyncSessionIfModules
-
Methods inherited from class com.igormaznitsa.mvngolang.AbstractGolangMojo
adaptExecNameForOS, addTmpBuildFlagIfNotPresented, doLogging, 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, registerEnvVars, registerOutputBuffers, setDisableSslCheck, setModuleMode, setWorkingDir
-
-
-
-
Method Detail
-
isAllowLockSession
public boolean isAllowLockSession()
-
setAllowLockSession
public void setAllowLockSession(boolean flag)
-
getPackages
@Nonnull @MustNotContainNull public String[] getPackages()
- Overrides:
getPackagesin classAbstractGoPackageAndDependencyAwareMojo
-
getCustomScript
@Nullable public CustomScript getCustomScript()
-
isDisableCvsAutoSearch
public boolean isDisableCvsAutoSearch()
-
getDeleteCommonPkg
public boolean getDeleteCommonPkg()
-
getSkipMojoPropertySuffix
@Nullable protected String getSkipMojoPropertySuffix()
- Overrides:
getSkipMojoPropertySuffixin classAbstractGolangMojo
-
isSkip
public boolean isSkip()
- Overrides:
isSkipin classAbstractGolangMojo
-
isAutoFixGitCache
public boolean isAutoFixGitCache()
-
isEnforceDeletePackageFiles
public boolean isEnforceDeletePackageFiles()
-
getGoCommand
@Nonnull public 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 String consoleOut, @Nonnull String consoleErr) throws IOException, org.apache.maven.plugin.MojoExecutionException
- Overrides:
doesNeedOneMoreAttemptin classAbstractGolangMojo- Throws:
IOExceptionorg.apache.maven.plugin.MojoExecutionException
-
-