-
Notifications
You must be signed in to change notification settings - Fork 31
Common params for all plug in mojos
The Parameters listed below are defined for all mojos (tasks) of the plug-in.
Flag to use active proxy settings defined in settings.xml
of maven. The Proxy will be used only to load SDK list and needed SDK. The Default value is true
(since 2.2.0)
<useMavenProxy>false</useMavenProxy>
Allows to define proxy server parameters just in the pom.xml, they similar to proxy settings in settings.xml (but there are not id
and active
parameters). The Proxy server will be used for requests for SDK list and SDK downloading.
<proxy>
<host>someproxy.com</host>
<port>8080</port>
<protocol>http</protocol>
<username>me</username>
<password>secretword</password>
<nonProxyHosts>127.0.0.1|localhost</nonProxyHosts>
</proxy>
The Flag allows to ignore error situation in Golang tool execution (it returns non-zero value). If the flag is true then processing of command will be successful even if the Golang tool returned non-zero. Sometime it is useful to not intercept maven build process. The Default value is false
<ignoreErrorExitCode>true</ignoreErrorExitCode>
Since 2.1.1 the plugin can save Golang tool terminal output as reports and the parameter allows to define place for the files. The default value is ${project.build.directory}/reports
<reportsFolder>some/special/folder_for_logs</reportsFolder>
Name of the report file to save console output log of the called Golang tool. By default the value is empty and in the case the log will not be saved.
<outLogFile>consoleOut.log</outLogFile>
Name of the report file to save console error log of the called Golang tool. By default the value is empty and in the case the log will not be saved.
<errLogFile>consoleErr.log</errLogFile>
The Link to the web site where list of SDK can be found, the default value is https://storage.googleapis.com/golang/
, the SDK ist must be in XML format and formatted as ListBucketResult.
<sdkSite>https://127.0.0.1/sdkList</sdkSite>
Flag to hide or show the title banner of the plugin, sometime it is useful for fast search of the plugin log part in common log files. By default it is turned off and has true
value.
<hideBanner>false</hideBanner>
The Root folder which will be used by the plug-in to keep unpacked SDK and packets to build Golang projects. The Default value is ${user.home}/.mvnGoLang
.
<storeFolder>/home/user/mvngolang_tmp</storeFolder>
The Folder to be used as $GOPATH for project. The Default value is ${user.home}/.mvnGoLang/.go_path
. As you see it is inside store folder by default.
<goPath>/home/user/.gopath</goPath>
Value to be provided as $GOARM environment value for Golang tool. By default it is not defined.
<targetArm>5</targetArm>
Vaue to be provided as $GOBIN environment value for Golang tool. By default it is ${project.build.directory}
<goBin>/home/folder/bin</goBin>
The Version of required Golang SDK. Since 2.2.0 it can be defined through property mvn.golang.go.version
.
<goVersion>1.10.2</goVersion>
The Value allows to define already installed Golang SDK root and in the case the plug-in will not be loading SDK from the SDK site. By default it is undefined.
<goRoot>/home/user/golangSDK/1.7</goRoot>
The Value allows to define $GOROOT_BOOTSTRAP environment variable for starting Golang tool. By default it is undefined.
<goRootBootstrap>/home/user/gobootstrap</goRootBootstrap>
Define $GOCACHE environment variable, should provide path to a folder which will be used as a cache folder during GoLang build process, can be turned off by value off
but it is disabled to turn it off in GoLang 1.12+.
<goCache>${basedir}/.gocache</goCache>
Sub-path to executable file in SDK folder. By default it is bin
<execSubpath>bin/other</execSubpath>
The Executable file name. The Default value is go
. Extension will be automatically added for recognized OS.
<exec>go2</exec>
List of string to be printed before execution into log as INFO.
<echo>
<info>Hello World</info>
<info>He he he!</info>
<echo>
List of string to be printed before execution into log as WARNING.
<echoWarn>
<warn>Too long operation!</warn>
<warn>Needs too much resources!</warn>
</echoWarn>
Direct order to disable SDK loading if it is not found in cache. Default value is false
<disableSdkLoad>true</disableSdkLoad>
Value to be provided for Golang process as environment variable $GOOS. Be default is not defined.
<targetOs>linux</targetOs>
Value to be provided for Golang process as environment variable $GOARCH. Be default is not defined.
<targetArch>linux</targetArch>
Allows to define OS name part for SDK archive. If undefined then plugin will try to recognize OS automatically
<os>freebsd</os>
Name part of Golang SDK archive to define OSX version. By default is undefined.
<osxVersion>10.2</osxVerson>
List of string which will be provided to Golang tool as buld flags section.
<buildFlags>
<flag>-i</flag>
<flag>-c</flag>
</buildFlags>
Flag to make information provided by the plug-in in log more verbose. by default is false.
<verbose>true</verbose>
Flag to disable deleting SDK archive after loading. By default is false.
<keepSdkArchive>true</keepSdkArchive>
Name of tool to be called instead of standard go
tool. by default is undefined.
<useGoTool>someCustomTool<useGoTool>
By default the plug-in doesn't make any import from already defined environment variables like $GOOS or $GOARCH. the Flag allows to turn on import of the values if they are presented. It will be working for $GOPATH, $GOARM, $GOOS, $GOARCH, $GOBIN
<useEnvVars>true</useEnvVars>
List of environment variables to be provided for Golang process.
<env>
<PATH>/home/user/somepath</PATH>
<VAR1>some_value</VAR1>
<GOARM>7</GOARM>
</env>
The Parameter allows to provide full archive name for GoLang SDK instead auto-syntheses.
<sdkArchiveName>special-sdk-1.9.zip</sdkArchiveName>
Parameter allows to define direct link to load SDK instead of search in provided SDK list.
<sdkDownloadUrl>https://sdkurl.com/sdk.zip</sdkDownloadUrl>
Flag allows to disable deleting of the SDK unpacked folder if there were some error in process. by default is false.
<keepUnarchFolderIfError>true</keepUnarchFolderIfError>
List of paths to be included into $GOPATH
<addToGoPath>
<path>/home/user/one</path>
<path>/home/user/two</path>
</addToGoPath>