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,GolangModMojo,GolangMvnInstallMojo,GolangToolMojo
public abstract class AbstractGoDependencyAwareMojo extends AbstractGolangMojo
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGO_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 AbstractGoDependencyAwareMojo() -
Method Summary
Modifier and Type Method Description voidafterExecution(ProxySettings proxySettings, boolean error)protected booleandoesNeedSessionLock()voiddoInit()java.lang.StringgetDependencyTempFolder()protected java.lang.StringgetSpecialPartOfGoPath()Internal method which returns special part of GOPATH which can be formed by mojos.booleanisIncludeTestDependencies()protected booleanisRestoreGoMod()booleanisScanDependencies()booleanisSyncSessionIfModules()voidsetDependencyTempFolder(java.lang.String path)voidsetIncludeTestDependencies(boolean value)voidsetScanDependencies(boolean flag)voidsetSyncSessionIfModules(boolean value)Methods inherited from class com.igormaznitsa.mvngolang.AbstractGolangMojo
adaptExecNameForOS, addTmpBuildFlagIfNotPresented, beforeExecution, doesNeedOneMoreAttempt, doMainBusiness, execute, findAllGoModsInFolder, findExisting, findGoPath, findGoRoot, findGoRootBootstrap, 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, processConsoleOut, registerEnvVars, registerOutputBuffers, setDisableSslCheck, setModuleMode, setWorkingDir
-
Field Details
-
GO_MOD_FILE_NAME_BAK
public static final java.lang.String GO_MOD_FILE_NAME_BAK- See Also:
- Constant Field Values
-
-
Constructor Details
-
AbstractGoDependencyAwareMojo
public AbstractGoDependencyAwareMojo()
-
-
Method Details
-
isSyncSessionIfModules
public boolean isSyncSessionIfModules() -
setSyncSessionIfModules
public void setSyncSessionIfModules(boolean value) -
getDependencyTempFolder
@Nonnull public java.lang.String getDependencyTempFolder() -
setDependencyTempFolder
public void setDependencyTempFolder(@Nonnull java.lang.String path) -
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 java.lang.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
-