Package com.igormaznitsa.mvngolang
Class GolangBuildMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="build", defaultPhase=PACKAGE, threadSafe=true, requiresDependencyResolution=COMPILE) public class GolangBuildMojo extends AbstractModuleAwareThe Mojo wraps the 'build' 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 GolangBuildMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterExecution(ProxySettings proxySettings, boolean error)voidbeforeExecution(ProxySettings proxySettings)protected String[]getAdditionalCommandFlags()StringgetAttachClassifier()StringgetAttachType()StringgetBuildMode()StringgetGoCommand()List<String>getLdflagsAsList()StringgetResultFolder()StringgetResultName()protected StringgetSkipMojoPropertySuffix()booleanisAttach()booleanisCommandSupportVerbose()booleanisStrip()voidsetBuildMode(String buildMode)voidsetResultFolder(String folder)voidsetResultName(String resultName)voidsetStrip(boolean flag)-
Methods inherited from class com.igormaznitsa.mvngolang.AbstractModuleAware
getCommandFlags, getMod
-
Methods inherited from class com.igormaznitsa.mvngolang.AbstractGoPackageAndDependencyAwareMojo
getDefaultPackages, getPackages, getTailArguments, setPackages
-
Methods inherited from class com.igormaznitsa.mvngolang.AbstractGoDependencyAwareMojo
doesNeedSessionLock, doInit, getDependencyTempFolder, getSpecialPartOfGoPath, isDeleteSumFile, isIncludeTestDependencies, isRestoreGoMod, isScanDependencies, isSyncSessionIfModules, setDependencyTempFolder, setIncludeTestDependencies, setScanDependencies, setSyncSessionIfModules
-
Methods inherited from class com.igormaznitsa.mvngolang.AbstractGolangMojo
adaptExecNameForOS, addTmpBuildFlagIfNotPresented, doesNeedOneMoreAttempt, 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, isEnforcePrintOutput, isFilterEnvPath, isHideBanner, isIgnoreErrorExitCode, isKeepSdkArchive, isKeepUnarchFolderIfError, isModuleMode, isMojoMustNotBeExecuted, isSkip, isSourceFolderRequired, isUseEnvVars, isUseMavenProxy, isVerbose, logOptionally, makeExecutableFileSubpath, makePathFromExtraGoPathElements, prepareExecutor, printLogs, registerEnvVars, registerOutputBuffers, setDisableSslCheck, setModuleMode, setWorkingDir
-
-
-
-
Method Detail
-
isAttach
public boolean isAttach()
-
getSkipMojoPropertySuffix
@Nullable protected String getSkipMojoPropertySuffix()
- Overrides:
getSkipMojoPropertySuffixin classAbstractGolangMojo
-
isStrip
public boolean isStrip()
-
setStrip
public void setStrip(boolean flag)
-
getGoCommand
@Nonnull public String getGoCommand()
- Specified by:
getGoCommandin classAbstractGolangMojo
-
beforeExecution
public void beforeExecution(@Nullable ProxySettings proxySettings) throws org.apache.maven.plugin.MojoFailureException
- Overrides:
beforeExecutionin classAbstractGolangMojo- Throws:
org.apache.maven.plugin.MojoFailureException
-
afterExecution
public void afterExecution(@Nullable ProxySettings proxySettings, boolean error) throws org.apache.maven.plugin.MojoFailureException
- Overrides:
afterExecutionin classAbstractGoDependencyAwareMojo- Throws:
org.apache.maven.plugin.MojoFailureException
-
isCommandSupportVerbose
public boolean isCommandSupportVerbose()
- Overrides:
isCommandSupportVerbosein classAbstractGolangMojo
-
getAdditionalCommandFlags
@Nonnull @MustNotContainNull protected String[] getAdditionalCommandFlags()
- Overrides:
getAdditionalCommandFlagsin classAbstractModuleAware
-
-