Package com.igormaznitsa.mvngolang
Class AbstractGoDependencyAwareMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.igormaznitsa.mvngolang.AbstractGolangMojo
-
- com.igormaznitsa.mvngolang.AbstractGoDependencyAwareMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractGoPackageAndDependencyAwareMojo,GolangJfrogCliMojo,GolangMvnInstallMojo,GolangToolMojo
public abstract class AbstractGoDependencyAwareMojo extends AbstractGolangMojo
-
-
Field Summary
Fields Modifier and Type Field Description static StringDELETE_GO_SUM_FLAG_FILEstatic StringGO_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 AbstractGoDependencyAwareMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterExecution(ProxySettings proxySettings, boolean error)protected booleandoesNeedSessionLock()voiddoInit()StringgetDependencyTempFolder()protected StringgetSpecialPartOfGoPath()Internal method which returns special part of GOPATH which can be formed by mojos.booleanisDeleteSumFile()booleanisIncludeTestDependencies()protected booleanisRestoreGoMod()booleanisScanDependencies()booleanisSyncSessionIfModules()voidsetDependencyTempFolder(String path)voidsetIncludeTestDependencies(boolean value)voidsetScanDependencies(boolean flag)voidsetSyncSessionIfModules(boolean value)-
Methods inherited from class com.igormaznitsa.mvngolang.AbstractGolangMojo
adaptExecNameForOS, addTmpBuildFlagIfNotPresented, beforeExecution, doesNeedOneMoreAttempt, doLogging, doMainBusiness, execute, findAllGoModsInFolder, findExisting, findGoPath, findGoRoot, findGoRootBootstrap, findMvnProperty, getArch, getArtifactResolver, getBuildFlags, getCommandFlags, getConnectionTimeout, getEnv, getErrLogFile, getExec, getExecSubpath, getExecution, getExtraBuildFlags, getGoBin, getGoCache, getGoCommand, getGoPath, getGoRoot, getGoRootBootstrap, getGoVersion, getOptionalExtraTailArguments, getOs, getOSXVersion, getOutLogFile, getProject, getProxy, getRemoteRepositories, getReportsFolder, getSdkArchiveName, getSdkDownloadUrl, getSdkSite, getSession, getSkipMojoPropertySuffix, getSources, getStoreFolder, getSupposeSdkArchiveFileName, getTailArguments, getTarget386, getTargetArch, getTargetArm, getTargetOS, getTempFileFolder, getUseGoTool, getWorkingDir, getWorkingDirectoryForExecutor, initConsoleBuffers, isCheckSdkHash, isCommandSupportVerbose, isDisableSdkLoad, isDisableSslCheck, isEnforceGoPathToEnd, isEnforcePrintOutput, isFilterEnvPath, isHideBanner, isIgnoreErrorExitCode, isKeepSdkArchive, isKeepUnarchFolderIfError, isModuleMode, isMojoMustNotBeExecuted, isSkip, isSourceFolderRequired, isUseEnvVars, isUseMavenProxy, isVerbose, logOptionally, makeExecutableFileSubpath, makePathFromExtraGoPathElements, prepareExecutor, printLogs, registerEnvVars, registerOutputBuffers, setDisableSslCheck, setModuleMode, setWorkingDir
-
-
-
-
Field Detail
-
GO_MOD_FILE_NAME_BAK
public static final String GO_MOD_FILE_NAME_BAK
- See Also:
- Constant Field Values
-
DELETE_GO_SUM_FLAG_FILE
public static final String DELETE_GO_SUM_FLAG_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isSyncSessionIfModules
public boolean isSyncSessionIfModules()
-
setSyncSessionIfModules
public void setSyncSessionIfModules(boolean value)
-
isDeleteSumFile
public boolean isDeleteSumFile()
-
isScanDependencies
public boolean isScanDependencies()
-
setScanDependencies
public void setScanDependencies(boolean flag)
-
isIncludeTestDependencies
public boolean isIncludeTestDependencies()
-
setIncludeTestDependencies
public void setIncludeTestDependencies(boolean value)
-
doInit
public final void doInit() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException- Overrides:
doInitin classAbstractGolangMojo- Throws:
org.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionException
-
afterExecution
public void afterExecution(@Nullable ProxySettings proxySettings, boolean error) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
- Overrides:
afterExecutionin classAbstractGolangMojo- Throws:
org.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionException
-
doesNeedSessionLock
protected boolean doesNeedSessionLock()
- Overrides:
doesNeedSessionLockin classAbstractGolangMojo
-
isRestoreGoMod
protected boolean isRestoreGoMod()
-
getSpecialPartOfGoPath
@Nonnull protected final String getSpecialPartOfGoPath()
Description copied from class:AbstractGolangMojoInternal method which returns special part of GOPATH which can be formed by mojos. Must be either empty or contain folders divided by file path separator.- Overrides:
getSpecialPartOfGoPathin classAbstractGolangMojo- Returns:
- special part of GOPATH, must not be null, by default must be empty
-
-