Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.

PluginConfigParameters

Igor Maznitsa edited this page Mar 25, 2016 · 6 revisions

Configuration parameters of the mvn-golang-wrapper plugin

Common parameters

The Parameters are shared by all mojos of the plugin!

hideBanner

The Boolean flag allows to hide the ASC II banner in the log. By default the flag is false and the banner is shown.

<hideBanner>false</hideBanner>

storeFolder

It is very important value for the plugin, it contains path to the folder where the plugin will keep downloaded and unpacked SDKs and keep misc info. By default it will be created in ${user.home}/.mvnGoLang

<storeFolder>${user.home}${file.separator}.mvnGoLang</storeFolder>

goPath

The Parameter provides the GOPATH value for the plugin, by default it is defined as ${user.home}${file.separator}.mvnGoLang${file.separator}.go_path

<goPath>${user.home}${file.separator}.mvnGoLang${file.separator}.go_path</goPath>

If to enable usage of values from OS environment variables for the plugin (with useEnvVars)and there will be GOPATH then its value will be used.

goVersion

It is very important required parameter which contains version of needed GoLang SDK.

<goVersion>1.6</goVersion>

goRoot

If defined then contains path to the GoLang SDK, if SDK is downloaded and unpacked then the plugin will provide automatically path to the SDK.

<goRoot>some/sdk/go</goRoot>

goRootBootstrap

It allows to define value for $GOROOT_BOOTSTRAP variable.

<goRootBootstrap>some/sdk/go2</goRootBootstrap>

disableSdkDownload

Flag to disable automatic download of needed SDK.

<disableSdkDownload>true</disableSdkDownload>

sources

It is very important parameter because it contains the path to the GoLang application sources which should be processed. By default it has predefined path ${basedir}/src/golang

<sources>${basedir}${file.separator}src${file.separator}golang</sources>

os

The Value is used as host OS name and plugin -uses it to make synthesis of SDK distributive name.If it is not provided then plug-in will try to figure out that automatically.

<os>linux</os>

arch

The Value is used as host architecture name and plug-in uses it to make synthesis of SDK distributive name. If it is not provided then plug-in will try to figure out that automatically.

<arch>amd64</amd>

osxVersion

The Value is needed only for OSX, because SDK name for OSX contains special section with OSX version.

<osxVersion>10.4</osxVersion>

targetArch

The Value to be provided as $GOARCH variable during Go tool execution.

<targetArch>arm</targetArch>

targetOs

The Value to be provided as $GOOS variable during Go tool execution.

<targetOs>windows</targetArch>

buildFlags

List of string which will be provided as build flags during execution of Go tool.

<buildFlags>
  <flag>-i</flag>
  <flag>-c</flag>
</buildFlags>

verbose

The Flag allows to make log output more informative.

<verbose>true</verbose>

keepSdkArchive

The Flags allows to keep downloaded SDK archive after unpacking.

<keepSdkArchive>true</keepSdkArchive>

useGoTool

Allows to define another main Go tool instead of bin/go

<useGoTool>golang.sh</useGoTool>

sdkArchiveName

Allows to define directly the name of SDK to be downloaded.

<sdkArchiveName>go1.6.windows-amd64.msi</sdkArchiveName>

useEnvVars

If the flag is true then plugin will be checking environment variables $GOROOT, $GOROOT_BOOTSTRAP, $GOOS, $GOARCH, $GOPATH and use their values if possible.

<useEnvVars>true</useEnvVars>

env

it allows to define custom environment variables for started go tool process.

<env>
   <GOSOME_PATH>/some/path/to/go</GOSOME_PATH>
   <VERSION>1.6</VERSION>
</env>

keepUnarchFolderIfError

The Flag allows to disable deleting of SDK unpacked folder if there is an error during operation. It is mainly for plug-in testing purposes.

<keepUnarchFolderIfError>true</keepUnarchFolderIfError>
Clone this wiki locally