-
Notifications
You must be signed in to change notification settings - Fork 31
PluginConfigParameters
The Parameters are shared by all mojos of the plugin!
Allows to define site to load SDK archives, by default it has link 'https://storage.googleapis.com/golang/'. The List of SDKs must be in XML format and formatted as ListBucketResult
<sdkSite>https://storage.googleapis.com/golang/</sdkSite>
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>
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>
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.
It is very important required parameter which contains version of needed GoLang SDK.
<goVersion>1.6</goVersion>
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>
It allows to define value for $GOROOT_BOOTSTRAP variable.
<goRootBootstrap>some/sdk/go2</goRootBootstrap>
Sub-path to find the go tool inside SDK folder.
<execSubpath>bin</execSubpath>
The Name of executable go tool application. It should not have extension, the name only!
<exec>go</exec>
List of messages to be printed into log as warnings.
<echoWarn>
<log>It is Warning!!</log>
</echoWarn>
List of messages to be printed into log as info.
<echo>
<log>It is info!!</log>
</echo>
Flag to disable automatic download of needed SDK.
<disableSdkDownload>true</disableSdkDownload>
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>
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>
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>
The Value is needed only for OSX, because SDK name for OSX contains special section with OSX version.
<osxVersion>10.4</osxVersion>
The Value to be provided as $GOARCH variable during Go tool execution.
<targetArch>arm</targetArch>
The Value to be provided as $GOOS variable during Go tool execution.
<targetOs>windows</targetArch>
List of string which will be provided as build flags during execution of Go tool.
<buildFlags>
<flag>-i</flag>
<flag>-c</flag>
</buildFlags>
The Flag allows to make log output more informative.
<verbose>true</verbose>
The Flags allows to keep downloaded SDK archive after unpacking.
<keepSdkArchive>true</keepSdkArchive>
One more way to replace name of standard go tool application.
<useGoTool>golang.sh</useGoTool>
Allows to define directly the name of SDK to be downloaded. If it is defined then SDK list will not be used for search of archive name.
<sdkArchiveName>go1.6.windows-amd64.msi</sdkArchiveName>
Allows to define directly URL to download SDK archive.
<sdkDownloadUrl>https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz</sdkDownloadUrl>
Allows to make plugin use $GOPATH as root folder instead of $GOROOT to find sub-folder where go lang tool is presented
<findExecInGoPath>true</findExecInGoPath>
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>
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>
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>
The Path to the folder where should be placed the build result file. By default it is ${project.build.directory}
<target>${project.build.directory}</target>
It is required parameter which should contain name of the result file.
<name>application.exe</name>
Sometime during get operation it is possible to see error for some cached info for Git repository. The Flag allows to try to fix the state automatically with git rm -r --cached .
for problematic package and restart the task.
<autofixGitCache>true</autofixGitCache>
List of test binary flags to be provided to go lang tool.
<testFlags>
<flag>-x</flag>
<flag>-v</flag>
</testFlags>
It contains command name.
<command>yacc</command>
It contains arguments for the command.
<args>
<arg>-l</arg>
<arg>-v</arg>
</args>