A Maven plugin allows to build Go applications with maven

mvn-golang

License Apache 2.0 Java 8.0+ Maven central Maven 3.0.3+ PayPal donation YooMoney donation

Changelog

2.3.7 (SNAPSHOT)

2.3.6 (19-dec-2020)

  • improved restoration of go.mod and go.sum state after build
  • refactoring and minor bugfixing
  • updated dependencies
  • default version of GoSDK updated to 1.15.6

2.3.5 (12-sep-2020)

  • fixed bug in go.mod backup restore #73
  • default version of GoSDK updated to 1.15.2

full changelog

GO start!

Taste Go in just two commands!

mvn archetype:generate -B -DarchetypeGroupId=com.igormaznitsa -DarchetypeArtifactId=mvn-golang-hello -DarchetypeVersion=2.3.6 -DgroupId=com.go.test -DartifactId=gohello -Dversion=1.0-SNAPSHOT
mvn -f ./gohello/pom.xml package

The First command in th snippet above generates a maven project with some test files and the second command builds the project. Also you can take a look at the example Hello world project using the plugin

If you want to generate a multi-module project, then you can use such snippet

mvn archetype:generate -B -DarchetypeGroupId=com.igormaznitsa -DarchetypeArtifactId=mvn-golang-hello-multi -DarchetypeVersion=2.3.6 -DgroupId=com.go.test -DartifactId=gohello-multi -Dversion=1.0-SNAPSHOT

Introduction

The Plug-in just wraps Golang tool-chain and allows to use strong maven based infrastructure to build Golang projects. It also can automatically download needed Golang SDK from the main server and tune needed version of packets for their branch, tag or revisions. Because a Golang project in the case is formed as just maven project, it is possible to work with it in any Java IDE which supports Maven. mvn-golang-wrapper

How it works

On start the plug-in makes below steps:

  • analyzing the current platform to generate needed distributive name (it can be defined directly through properties)
  • check that needed Golang SDK is already cached, if it is not cached then needed SDK will be loaded and unpacked from the main Golang SDK site
  • execute needed go lang tool bin/go with defined command, the source folder will be set as current folder
  • all folders of the project which are visible for maven (source folder, test folder, resource folders and test resource folders) are archived in ZIP file and the file is saved as a maven artifact into local maven repository (or remote maven repository). The generated ZIP artifact also contains information about dependencies which can be recognized by the plugin. In opposite to Java, Golang produces platform-dependent artifacts so that it doesn't make sense to share them through maven central but only resources and sources.

How to build

Because it is maven plugin, to build the plugin just use

mvn clean install -Pplugin

To save time, examples excluded from the main build process and activated through special profile

mvn clean install -Pexamples

Important note about automatic Golang SDK load

If you have some problems with certificates during Golang SDK load, then just add <disableSSLcheck>true</disableSSLcheck> into plugin configuration to ignore check of certificates (also you can use property 'mvn.golang.disable.ssl.check'). Also it allows property mvn.golang.disable.ssl.check to disable SSL certificate check during network actions.

How to add the plugin into maven project?

Below described build section for simple golang project which keeps source in src forlder and result should be placed into bin folder. Because it is golang project and mvn-golang plugin provides its own lifecycle, packaging for the project should be <packaging>mvn-golang</packaging>

<build>
    <!--Changing standard Maven project source structure to make it Go compatible-->
    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>
    <directory>${basedir}${file.separator}bin</directory>

    <plugins>
      <plugin>
        <groupId>com.igormaznitsa</groupId>
          <artifactId>mvn-golang-wrapper</artifactId>
          <version>2.3.6</version>
          <extensions>true</extensions>
        <executions>
          <execution>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <packages>
                <package>main.go</package>
              </packages>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
</build>

Work with dependencies

Dependencies from Maven repository (since 2.3.0)

Plugin supports work with maven repository and can install and load dependencies from there. Artifacts generated by the plugin saved in maven respository as zip archives and mvn-golang must be used as type.

<dependency>
  <groupId>com.igormaznitsa</groupId>
  <artifactId>mvn-go-test-lib</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <type>mvn-golang</type>
</dependency>

Plugin makes some trick in work with Maven Golang dependencies, it downloads Golang artifacts from repository and unpack them into temporary folder, then all unpacked dependencies are added to $GOPATH. You can take a look at example project which has two level dependency hierarchy. Dependency mechanism is enabled by default for all goals which need it, but it can be off with <scanDependencies>false</scanDependencies>. If there is any conflicts or errors in Golang for Go modules then you can turn off Go modules with

<env>
  <GO111MODULE>off</GO111MODULE>
</env>

Keep in mind that it is impossible use links to Github and Bitbucket libraries through <dependencies> maven mechanism, links to such dependencies should be processed by standard GET command and information about it you can find below.

Support of Module mode

Since 2.3.3 version, plug-in supports Golang module mode and allows to mix modules and work with golang maven dependencies, I have made some sample to show the possibility. By default support of module mode is turned off, but it can be turned on through <moduleMode>true</moduleMode> or property mvn.golang.module.mode.

Wrapped GET command

Plugin provides wrapper for Golang GET command and you can just define some external file contains package info through system property mvn.golang.get.packages.file, the file will be loaded and parsed and its definitions will be added into package depedencies. Format of the file is very easy. Each package described on a line in format package: <PACKAGE_NAME>[,branch: <BRANCH>][,tag: <TAG>][,revision: <REVISION>] also it supports single line comments through // and directive #include <FILE_NAME> to load packages from some external file. Also it supports interpolation of properties defined in format ${property.name} and provide access to maven, system and environment variables.
Example:

// example package file
#include "${basedir}/external/file.txt"
package:github.com/maruel/panicparse,tag:v1.0.2 // added because latest changes in panicparse is incompatible with termui
package:github.com/gizak/termui,branch:v2

This mechanism just makes work with dependencies easier and if you want to provide some specific flags and scripts to process CVS folders you have to define configuration parameters in pom.xml, pacages defined in the external file and in the pom.xml will be mixed.

The Plug-in doesn't work with standard maven dependencies and they must be defined through task of the plugin, the example of easiest case of dependencies is

<execution>
   <id>default-get</id>
   <configuration>
     <packages>
       <package>github.com/gizak/termui</package>
       <package>github.com/kataras/iris</package>
     </packages>
   </configuration>
</execution>

it will be executed as bin/go get github.com/gizak/termui github.com/kataras/iris

If you want work with specific branch then use below snipet

<execution>
  <id>default-get</id>
  <configuration>
    <buildFlags>
    <flag>-u</flag>
    </buildFlags>
    <packages>
      <package>github.com/gizak/termui</package>
    </packages>
    <branch>v2</branch>
  </configuration>
</execution>

if you want to have several dependencies with different tag and branch then take a look at the snipet below

<execution>
  <id>dependency1</id>
  <goals>
    <goal>get</goal>
  </goals>
  <configuration>
    <packages>
      <package>github.com/some/framework</package>
    </packages>
    <tag>1.0.1</tag>
  </configuration>
</execution>
<execution>
  <id>dependency2</id>
  <goals>
    <goal>get</goal>
  </goals>
  <configuration>
    <packages>
      <package>github.com/some/another</package>
    </packages>
    <branch>v2</branch>
  </configuration>
</execution>

sometime GIT can produce cache errors and in the case you can try to turn on auto-fix of such errors with <autofixGitCache>true</autofixGitCache> flag.

How to save generated artifact in repository?

By default, artifact will be installed into maven repository automatically during install phase if you want to turn off artifact installation then you can use standard maven properties

<properties>
    <maven.install.skip>true</maven.install.skip>
    <maven.deploy.skip>true</maven.deploy.skip>
</properties>

or disable plugin mojo execution

<execution>
  <id>default-mvninstall</id>
  <phase>none</phase>
</execution>

Configuration

About configuration parameters, you can read at the wiki page.

Testing

The Wrapper just wraps calls to Go tool and recognize the exit code, if call of go test is non-zero then build will be failed, it doesn't make any analysing of test reports!
Sometime it is useful to use GoConvey tool for testing, in the case use snippet below to add dependency and make testing verbose

<execution>
  <id>default-get</id>
  <configuration>
    <buildFlags>
      <flag>-u</flag>
    </buildFlags>
    <packages>
      <package>github.com/smartystreets/goconvey</package>
    </packages>
  </configuration>
</execution>
<execution>
  <id>default-test</id>
  <configuration>
    <buildFlags>
      <flag>-v</flag>
    </buildFlags>
  </configuration>
</execution>                    

Some Examples

Owner
Igor Maznitsa
a friend of paradoxes
Igor Maznitsa
Comments
  • mvn-golang package swallows other packagings

    mvn-golang package swallows other packagings

    my mvn-golang module produces multiple golang binaries. then I use maven-assembly-plugin to tar them up and have maven to install and deploy to maven repo.

    However, this plugin seems to swallow my assembly. please add default maven install and deploy to its build lifecycle

    existing install/deploy phase currently bind to

              <install>com.igormaznitsa:mvn-golang-wrapper:mvninstall</install>
              <deploy>com.igormaznitsa:mvn-golang-wrapper:install</deploy>
    
  • Could not perform multiple build, because It takes output file name from artifact ID

    Could not perform multiple build, because It takes output file name from artifact ID

    I have to build my GO application for different OS and different architectures. so I need Output file as windows32.exe, windows64.exe, linux32.sh and linux64.sh. But It takes filename from artifact ID. Even though I included this plugin multiple times in my pom.xml, I was able to build only one output file. Please solve this issue

  • `go get` from artfactory

    `go get` from artfactory

    Thanks a lot for this plugin.

    Many of the artifacts that we use are internal packages which reside in artifactory. Is there a way to configure go get to use artifactory so that packages can also be downloaded from there?

    Thanks

  • Looking for mvn-golang example with multi-module using go-module dependency management

    Looking for mvn-golang example with multi-module using go-module dependency management

    My apology if this is asked at the wrong place.

    basically my go-module A depends on mvn-golang package B, and mvn build fails with

     cannot find module providing package xxxxxx/yyyyyy  
    

    xxxxx/yyyy is from my mvn-golang dependency

    and xxxx/yyyy does show up under target/.dep/ dir

    I do have GO111MODULE = on

  • how to lock a Go build to a master ref?

    how to lock a Go build to a master ref?

    Hi my build needs to lock down an external project at git hub which does not provide tag ( https://github.com/hashicorp/go-plugin/issues/30). is there a way in this plugin to lock the source to a ref?

  • Platform support for mvn-golang-wrapper for keycloak/keycloak on PowerPC64LE

    Platform support for mvn-golang-wrapper for keycloak/keycloak on PowerPC64LE

    I am trying to build/install keycloak/keycloak on PPC64LE architecture with Red Hat Enterprise Linux 7, using the commands mentioned here - https://github.com/keycloak/keycloak/blob/master/docs/building.md

    However I am seeing the following issues as below:-

    [INFO]
    [INFO] -------< org.keycloak.testsuite:integration-arquillian-tests >--------
    [INFO] Building Tests 8.0.0-SNAPSHOT [161/169]
    [INFO] -------------------------------[ pom ]--------------------------------
    [INFO]
    [INFO] — maven-enforcer-plugin:3.0.0-M2:enforce (enforce-java-version) @ integration-arquillian-tests —
    [INFO]
    [INFO] — maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven-version) @ integration-arquillian-tests —
    [INFO]
    [INFO] — buildnumber-maven-plugin:1.4:create (get-scm-revision) @ integration-arquillian-tests —
    [INFO]
    [INFO] — shrinkwrap-resolver-maven-plugin:2.2.6:propagate-execution-context (default) @ integration-arquillian-tests —
    [INFO]
    [INFO] — maven-source-plugin:3.0.1:jar-no-fork (attach-sources) @ integration-arquillian-tests —
    [INFO]
    [INFO] — maven-install-plugin:2.5.2:install (default-install) @ integration-arquillian-tests —
    [INFO] Installing /root/keycloak/keycloak/testsuite/integration-arquillian/tests/pom.xml to /root/.m2/repository/org/keycloak/testsuite/integration-arquillian-tests/8.0.0-SNAPSHOT/integration-arquillian-tests-8.0.0-SNAPSHOT.pom
    [INFO]
    [INFO] -----< org.keycloak.testsuite:integration-arquillian-tests-base >-----
    [INFO] Building Base TestSuite 8.0.0-SNAPSHOT [162/169]
    [INFO] -------------------------------[ jar ]--------------------------------
    [INFO]
    [INFO] — maven-enforcer-plugin:3.0.0-M2:enforce (enforce-java-version) @ integration-arquillian-tests-base —
    [INFO]
    [INFO] — maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven-version) @ integration-arquillian-tests-base —
    [INFO]
    [INFO] — buildnumber-maven-plugin:1.4:create (get-scm-revision) @ integration-arquillian-tests-base —
    [INFO]
    [INFO] — mvn-golang-wrapper:2.1.6:get (get-mousetrap) @ integration-arquillian-tests-base —
    [INFO] Prepared command line : bin/go get github.com/inconshreveable/mousetrap
    [ERROR]
    [ERROR] --------Exec.Err--------
    [ERROR] /root/.mvnGoLang/go1.9.2.linux-amd64/bin/go: /root/.mvnGoLang/go1.9.2.linux-amd64/bin/go: cannot execute binary file
    [ERROR]
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary for Keycloak 8.0.0-SNAPSHOT:
    [INFO]
    [INFO] Keycloak BOM Parent ................................ SUCCESS [ 0.950 s]
    [INFO] Keycloak BOM for adapters .......................... SUCCESS [ 0.016 s]
    [INFO] Keycloak BOM for server extensions ................. SUCCESS [ 0.013 s]
    [INFO] Keycloak BOM utilities for the quickstarts ......... SUCCESS [ 0.013 s]
    [INFO] Keycloak ........................................... SUCCESS [ 0.064 s]
    [INFO] Keycloak Common .................................... SUCCESS [ 6.404 s]
    [INFO] Keycloak Core ...................................... SUCCESS [ 7.300 s]
    [INFO] Keycloak Dependencies Parent ....................... SUCCESS [ 0.016 s]
    [INFO] Keycloak Drools BOM ................................ SUCCESS [ 0.036 s]
    [INFO] Keycloak Server SPI ................................ SUCCESS [ 2.491 s]
    [INFO] Keycloak Server Private SPI ........................ SUCCESS [ 3.723 s]
    [INFO] Keycloak Kerberos Federation ....................... SUCCESS [ 0.188 s]
    [INFO] Keycloak LDAP UserStoreProvider .................... SUCCESS [ 1.590 s]
    [INFO] Keycloak SAML Core Public API ...................... SUCCESS [ 0.728 s]
    [INFO] Keycloak SAML Core ................................. SUCCESS [ 4.523 s]
    [INFO] Keycloak REST Services ............................. SUCCESS [ 14.388 s]
    [INFO] Keycloak JS Integration ............................ SUCCESS [ 6.173 s]
    [INFO] Keycloak Themes .................................... SUCCESS [ 1.817 s]
    [INFO] Keycloak Dependencies Server Min ................... SUCCESS [ 0.030 s]
    [INFO] Keycloak Model Parent .............................. SUCCESS [ 0.013 s]
    [INFO] Keycloak Model JPA ................................. SUCCESS [ 2.740 s]
    [INFO] Keycloak Model Infinispan .......................... SUCCESS [ 3.912 s]
    [INFO] Keycloak SSSD Federation ........................... SUCCESS [ 0.821 s]
    [INFO] KeyCloak Authz: Parent ............................. SUCCESS [ 0.014 s]
    [INFO] KeyCloak AuthZ: Provider Parent .................... SUCCESS [ 0.013 s]
    [INFO] KeyCloak AuthZ: Common Policy Providers ............ SUCCESS [ 0.338 s]
    [INFO] KeyCloak AuthZ: Drools Policy Provider ............. SUCCESS [ 0.328 s]
    [INFO] Keycloak Dependencies Server All ................... SUCCESS [ 0.260 s]
    [INFO] Keycloak Federation ................................ SUCCESS [ 0.013 s]
    [INFO] Keycloak Util Embedded LDAP ........................ SUCCESS [ 0.632 s]
    [INFO] Keycloak Util Parent ............................... SUCCESS [ 0.013 s]
    [INFO] Keycloak WildFly Integration ....................... SUCCESS [ 0.013 s]
    [INFO] Keycloak WildFly Add User Script ................... SUCCESS [ 0.177 s]
    [INFO] Keycloak WildFly Extensions ........................ SUCCESS [ 0.159 s]
    [INFO] Keycloak WildFly Server Subsystem .................. SUCCESS [ 4.621 s]
    [INFO] Keycloak Integration ............................... SUCCESS [ 0.013 s]
    [INFO] Keycloak Admin REST Client ......................... SUCCESS [ 0.294 s]
    [INFO] Keycloak Client Registration API ................... SUCCESS [ 0.100 s]
    [INFO] Keycloak Client CLI ................................ SUCCESS [ 0.013 s]
    [INFO] Keycloak Client Registration CLI ................... SUCCESS [ 3.274 s]
    [INFO] Keycloak Admin CLI ................................. SUCCESS [ 2.864 s]
    [INFO] Keycloak Client CLI Distribution ................... SUCCESS [ 1.046 s]
    [INFO] Keycloak Adapter SPI ............................... SUCCESS [ 0.217 s]
    [INFO] Keycloak Tomcat Adapter SPI ........................ SUCCESS [ 0.098 s]
    [INFO] Keycloak Undertow Integration SPI .................. SUCCESS [ 0.274 s]
    [INFO] Keycloak Servlet Integration ....................... SUCCESS [ 0.194 s]
    [INFO] Common JBoss/Wildfly Core Classes .................. SUCCESS [ 0.073 s]
    [INFO] Keycloak Jetty Adapter SPI ......................... SUCCESS [ 0.224 s]
    [INFO] Keycloak Client Adapter SPI Modules ................ SUCCESS [ 0.041 s]
    [INFO] Keycloak SAML Client Adapter Public API ............ SUCCESS [ 0.079 s]
    [INFO] Keycloak SAML Client Adapter Core .................. SUCCESS [ 1.793 s]
    [INFO] Keycloak Undertow SAML Adapter ..................... SUCCESS [ 0.159 s]
    [INFO] Keycloak SAML Tomcat Integration ................... SUCCESS [ 0.011 s]
    [INFO] Keycloak Tomcat Core SAML Integration .............. SUCCESS [ 0.104 s]
    [INFO] Keycloak Tomcat SAML Integration ................... SUCCESS [ 0.093 s]
    [INFO] Keycloak Tomcat 7 SAML Integration ................. SUCCESS [ 0.079 s]
    [INFO] Keycloak Wildfly SAML Adapter ...................... SUCCESS [ 0.167 s]
    [INFO] KeyCloak Authz: Client API ......................... SUCCESS [ 0.329 s]
    [INFO] Keycloak Adapter Core .............................. SUCCESS [ 2.467 s]
    [INFO] Keycloak WildFly Elytron SAML Adapter .............. SUCCESS [ 0.254 s]
    [INFO] Keycloak Wildfly SAML Adapter Subsystem ............ SUCCESS [ 4.758 s]
    [INFO] Keycloak SAML Wildfly Integration .................. SUCCESS [ 0.010 s]
    [INFO] Keycloak AS7 / JBoss EAP 6 Integration ............. SUCCESS [ 0.013 s]
    [INFO] Keycloak AS7 SPI ................................... SUCCESS [ 1.619 s]
    [INFO] Keycloak SAML EAP Integration ...................... SUCCESS [ 0.013 s]
    [INFO] Keycloak SAML AS7 Integration ...................... SUCCESS [ 0.267 s]
    [INFO] Keycloak SAML AS7 Subsystem ........................ SUCCESS [ 3.443 s]
    [INFO] Keycloak SAML Servlet Filter ....................... SUCCESS [ 0.093 s]
    [INFO] Keycloak Jetty Core SAML Integration ............... SUCCESS [ 0.248 s]
    [INFO] Keycloak Jetty 9.2.x SAML Integration .............. SUCCESS [ 0.235 s]
    [INFO] Keycloak Jetty 9.3.x SAML Integration .............. SUCCESS [ 0.256 s]
    [INFO] Keycloak Jetty 9.4.x SAML Integration .............. SUCCESS [ 0.231 s]
    [INFO] Keycloak SAML Jetty Integration .................... SUCCESS [ 0.011 s]
    [INFO] Keycloak SAML Client Adapter Modules ............... SUCCESS [ 0.011 s]
    [INFO] Keycloak Tomcat Integration ........................ SUCCESS [ 0.010 s]
    [INFO] Keycloak Tomcat Core Integration ................... SUCCESS [ 0.105 s]
    [INFO] Keycloak AS7 Integration ........................... SUCCESS [ 0.202 s]
    [INFO] Keycloak AS7 Subsystem ............................. SUCCESS [ 1.409 s]
    [INFO] Keycloak Installed Application ..................... SUCCESS [ 0.124 s]
    [INFO] Keycloak Undertow Integration ...................... SUCCESS [ 0.291 s]
    [INFO] Keycloak Fuse 7.0 Integration ...................... SUCCESS [ 0.011 s]
    [INFO] Keycloak Fuse 7.0 Adapter - Camel + Undertow ....... SUCCESS [ 0.645 s]
    [INFO] Keycloak OSGI Adapter .............................. SUCCESS [ 1.078 s]
    [INFO] Keycloak Fuse 7.0 Adapter - Undertow ............... SUCCESS [ 0.486 s]
    [INFO] Keycloak Jetty Core Integration .................... SUCCESS [ 0.202 s]
    [INFO] Keycloak Jetty 9.4.x Integration ................... SUCCESS [ 0.181 s]
    [INFO] Keycloak Fuse 7.0 Adapter - Jetty 9.4 .............. SUCCESS [ 0.365 s]
    [INFO] Keycloak Tomcat Integration ........................ SUCCESS [ 0.086 s]
    [INFO] Keycloak Fuse 7.0 Adapter - Tomcat 8 ............... SUCCESS [ 0.298 s]
    [INFO] Keycloak CLI SSO Framework ......................... SUCCESS [ 1.966 s]
    [INFO] Keycloak JAX-RS OAuth Client ....................... SUCCESS [ 0.111 s]
    [INFO] Keycloak Jetty 9.2.x Integration ................... SUCCESS [ 0.177 s]
    [INFO] Keycloak Jetty 9.3.x Integration ................... SUCCESS [ 0.212 s]
    [INFO] Keycloak Jetty Integration ......................... SUCCESS [ 0.010 s]
    [INFO] Keycloak Servlet Filter Adapter Integration ........ SUCCESS [ 0.179 s]
    [INFO] spring-boot-container-bundle ....................... SUCCESS [ 0.210 s]
    [INFO] Keycloak Spring Security Integration ............... SUCCESS [ 3.083 s]
    [INFO] Keycloak Spring Boot Adapter Core .................. SUCCESS [ 0.346 s]
    [INFO] Keycloak Spring Boot Integration ................... SUCCESS [ 1.471 s]
    [INFO] Keycloak Spring Boot 2 Integration ................. SUCCESS [ 1.682 s]
    [INFO] Keycloak Tomcat 7 Integration ...................... SUCCESS [ 0.077 s]
    [INFO] Keycloak Wildfly Integration ....................... SUCCESS [ 0.089 s]
    [INFO] Keycloak Wildfly Elytron OIDC Adapter .............. SUCCESS [ 0.186 s]
    [INFO] Keycloak Wildfly Adapter Subsystem ................. SUCCESS [ 4.236 s]
    [INFO] Keycloak WildFly Integration ....................... SUCCESS [ 0.010 s]
    [INFO] Keycloak OIDC Client Adapter Modules ............... SUCCESS [ 0.010 s]
    [INFO] Keycloak Adapters .................................. SUCCESS [ 0.009 s]
    [INFO] Keycloak Misc ...................................... SUCCESS [ 0.009 s]
    [INFO] Keycloak :: Spring :: Boot ......................... SUCCESS [ 0.010 s]
    [INFO] Keycloak :: Spring :: Boot :: Default :: Starter .. SUCCESS [ 0.077 s]
    [INFO] Keycloak :: Spring :: Boot ......................... SUCCESS [ 0.009 s]
    [INFO] Keycloak :: Legacy :: Spring :: Boot :: Default :: Starter SUCCESS [ 0.078 s]
    [INFO] keycloak-test-helper ............................... SUCCESS [ 0.231 s]
    [INFO] Keycloak TestSuite ................................. SUCCESS [ 0.010 s]
    [INFO] DB Allocator Plugin ................................ SUCCESS [ 2.852 s]
    [INFO] Keycloak Arquillian Integration TestSuite .......... SUCCESS [ 0.040 s]
    [INFO] Test apps .......................................... SUCCESS [ 0.010 s]
    [INFO] Test apps distribution ............................. SUCCESS [ 1.064 s]
    [INFO] Keycloak Authz: PhotoZ Test Parent ................ SUCCESS [ 0.013 s]
    [INFO] Keycloak Authz Test: Photoz RESTful API ............ SUCCESS [ 0.487 s]
    [INFO] Keycloak Authz Tests: Photoz HTML5 Client .......... SUCCESS [ 0.324 s]
    [INFO] Keycloak Authz Tests: Photoz Authz Rule-based Policy SUCCESS [ 0.082 s]
    [INFO] Keycloak Authz Tests: Hello World Example .......... SUCCESS [ 0.051 s]
    [INFO] Keycloak Authz: Servlet Authorization Test ......... SUCCESS [ 0.091 s]
    [INFO] Keycloak Authz: Simple Servlet App with Policy Enforcer SUCCESS [ 0.039 s]
    [INFO] integration-arquillian-test-apps-servlets .......... SUCCESS [ 0.210 s]
    [INFO] Keycloak Test App Profile JEE ...................... SUCCESS [ 0.098 s]
    [INFO] integration-arquillian-test-apps-cors-parent ....... SUCCESS [ 0.012 s]
    [INFO] Angular Product Portal JS .......................... SUCCESS [ 0.580 s]
    [INFO] JAX-RS Database Service Using OAuth Bearer Tokens .. SUCCESS [ 0.088 s]
    [INFO] Fuse Test Applications ............................. SUCCESS [ 0.011 s]
    [INFO] Customer Portal - Secured in Karaf/Fuse ............ SUCCESS [ 0.643 s]
    [INFO] CXF JAXRS Example - Secured in Karaf/Fuse .......... SUCCESS [ 0.358 s]
    [INFO] CXF JAXRS Example - Secured in Karaf/Fuse 7 on Undertow SUCCESS [ 0.199 s]
    [INFO] CXF JAXWS Example - Secured in Karaf/Fuse .......... SUCCESS [ 0.258 s]
    [INFO] CXF JAXWS Example - Secured in Karaf/Fuse 7 on Undertow SUCCESS [ 0.177 s]
    [INFO] Product Portal - Secured in Karaf/Fuse ............. SUCCESS [ 0.255 s]
    [INFO] Product Portal - Secured in Karaf/Fuse 7 on Undertow SUCCESS [ 0.241 s]
    [INFO] Camel endpoint example - Secured in Karaf/Fuse ..... SUCCESS [ 0.357 s]
    [INFO] Camel endpoint example - Secured in Karaf/Fuse 7.0 on Undertow SUCCESS [ 0.252 s]
    [INFO] Keycloak Fuse Example - Features ................... SUCCESS [ 0.129 s]
    [INFO] Keycloak Examples - External Config ................ SUCCESS [ 0.161 s]
    [INFO] spring-boot-adapter-app ............................ SUCCESS [ 0.298 s]
    [INFO] Servers ............................................ SUCCESS [ 0.010 s]
    [INFO] Auth Server ........................................ SUCCESS [ 0.010 s]
    [INFO] Auth Server Services ............................... SUCCESS [ 0.010 s]
    [INFO] Auth Server Services - Testsuite Providers ......... SUCCESS [ 1.015 s]
    [INFO] Auth Server - JBoss ................................ SUCCESS [ 0.010 s]
    [INFO] Keycloak TestSuite Utils ........................... SUCCESS [ 0.942 s]
    [INFO] Test Util .......................................... SUCCESS [ 0.603 s]
    [INFO] Auth Server - Undertow ............................. SUCCESS [ 0.507 s]
    [INFO] App Server ......................................... SUCCESS [ 0.010 s]
    [INFO] App Server - SPI ................................... SUCCESS [ 0.063 s]
    [INFO] App Server - JBoss ................................. SUCCESS [ 0.011 s]
    [INFO] App Server - Karaf ................................. SUCCESS [ 0.010 s]
    [INFO] App Server - Tomcat ................................ SUCCESS [ 0.009 s]
    [INFO] App Server - Undertow .............................. SUCCESS [ 0.430 s]
    [INFO] App Server - Jetty Parent .......................... SUCCESS [ 0.011 s]
    [INFO] Cache Server ....................................... SUCCESS [ 0.009 s]
    [INFO] Cache Server - JBoss Family ........................ SUCCESS [ 0.010 s]
    [INFO] Tests .............................................. SUCCESS [ 0.093 s]
    [INFO] Base TestSuite ..................................... FAILURE [ 0.745 s]
    [INFO] Other Tests Modules ................................ SKIPPED
    [INFO] Adapter Tests ...................................... SKIPPED
    [INFO] Adapter Tests - JBoss .............................. SKIPPED
    [INFO] Adapter Tests - Karaf .............................. SKIPPED
    [INFO] Adapter Tests - WAS ................................ SKIPPED
    [INFO] Adapter Tests - WLS ................................ SKIPPED
    [INFO] SSSD tests ......................................... SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 02:08 min
    [INFO] Finished at: 2019-10-31T05:52:03-04:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal com.igormaznitsa:mvn-golang-wrapper:2.1.6:get (get-mousetrap) on project integration-arquillian-tests-base: Process exit code : 126 -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
    [ERROR]
    [ERROR] After correcting the problems, you can resume the build with the command
    [ERROR] mvn <goals> -rf :integration-arquillian-tests-base
    

    Any inputs to support mvn-golang-wrapper for keycloak/keycloak on PowerPC64LE Platform would be appreciated.

  • Abiblity to default-build to attach its output executable binary to maven session

    Abiblity to default-build to attach its output executable binary to maven session

    I have maven go build with has many maven modules, each module produce a go executable

    Below the dependecyManagement where I disabel mvn-golang lifecycle and only enable default-build

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.igormaznitsa</groupId>
          <artifactId>mvn-golang-wrapper</artifactId>
          <executions>
            <!-- turn off default steps -->
            <!-- keep default-build -->
            <execution>
              <id>default-generate</id>
              <phase>none</phase>
            </execution>
            <execution>
              <id>default-fix</id>
              <phase>none</phase>
            </execution>
            <execution>
              <id>default-fmt</id>
              <phase>none</phase>
            </execution>
            <execution>
              <id>default-test</id>
              <phase>none</phase>
            </execution>
            <execution>
              <id>default-mvninstall</id>
              <phase>none</phase>
            </execution>
            <execution>
              <id>default-install</id>
              <phase>none</phase>
            </execution>
            <execution>
              <id>default-build</id>
              <configuration>
                <strip>${go.strip}</strip>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    

    I'd like to have the ability to add an additional setting at default-build configure to attach is build output to maven session.

    I currently use maven-antrun-plugin to repeat each child module, like this

    <plugins>
    
      <plugin>
        <groupId>com.igormaznitsa</groupId>
        <artifactId>mvn-golang-wrapper</artifactId>
        <extensions>true</extensions>
        <configuration>
          <workingDir>${golang.src.dir}/${project.artifactId}</workingDir> <!--proprietary path -->
        </configuration>
      </plugin>
    
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-artifacts</id>
            <phase>package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <attachartifact file="${project.build.directory}/${project.build.finalName}" type="${exe.ext}" />
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
    
    </plugins>
    

    Propose settings for build mojo

    <attached>true</attache>
    <type>xxxx</type>
    <classifier>optional</optional>
    
  • Add ability for maven plugin to obtain GOROOT location

    Add ability for maven plugin to obtain GOROOT location

    my maven project set the required GO version where mvn-golang automatically download and place GO sdk under ~/.mvngolang

    Requesting mvn-golang to push the download GOROOT path to a maven property ( like ${go.root} so I can retrieve it for other purposes

    For my case, I need to run another external script which needs the location of my GOROOT (https://github.com/kubernetes/code-generator/blob/master/generate-groups.sh)

    if user passes in plugin parameter, mvn-golang should push it into the property as well

  • Received fatal alert: access_denied

    Received fatal alert: access_denied

    I am using maven behind an enterprise proxy, and encounter error as the title, the following is the maven log, any idea? thanks env: jdk: openjdk version "1.8.0_121" maven: 3.3.9

    log: [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] suite-deployer-adaptor [INFO] deployer-adaptor-binary [INFO] itsma-deployer-adaptor [INFO]
    [INFO] ------------------------------------------------------------------------ [INFO] Building suite-deployer-adaptor 2017.11-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ suite-deployer-adaptor --- [INFO] [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ suite-deployer-adaptor --- [INFO] Installing /home/danny/src/golang/src/suite-deploy-adaptor/pom.xml to /home/danny/.m2/repository/com/hpe/itsma/suite-deployer-adaptor/2017.11-SNAPSHOT/suite-deployer-adaptor-2017.11-SNAPSHOT.pom [INFO]
    [INFO] ------------------------------------------------------------------------ [INFO] Building deployer-adaptor-binary 2017.11-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ deployer-adaptor-binary --- [INFO] [INFO] --- mvn-golang-wrapper:2.1.6:run (default) @ deployer-adaptor-binary --- [WARNING] Loading list of available GoLang SDKs from https://storage.googleapis.com/golang/ [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] suite-deployer-adaptor ............................. SUCCESS [ 0.211 s] [INFO] deployer-adaptor-binary ............................ FAILURE [ 0.954 s] [INFO] itsma-deployer-adaptor ............................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.572 s [INFO] Finished at: 2017-12-07T17:19:36+08:00 [INFO] Final Memory: 13M/205M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.igormaznitsa:mvn-golang-wrapper:2.1.6:run (default) on project deployer-adaptor-binary: Received fatal alert: access_denied -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :deployer-adaptor-binary

  • goBin is not hornor

    goBin is not hornor

    Go: 1.7.1 mvn: 3.3.9 this plugin: 2.1.2 (ie latest)

    I am trying to configure goBin to use ${project.build.directory}/bin

    <configuration>
        <goBin>${project.build.directory}${file.separator}bin</goBin>
        [...]
    </configuration>
    

    the outputs always go to ${project.build.directory}

  • Cannot do crosscompiles because the plugin sets the GOBIN environment regardless

    Cannot do crosscompiles because the plugin sets the GOBIN environment regardless

    If you change the Go OS and Go Architecture values in the configuration, the go binary will try and do cross compiles. But, this will fail all the time due to the fact that GOBIN is set in the plugin as an environmentvariable as seen at:

    https://github.com/raydac/mvn-golang/blob/master/mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/AbstractGolangMojo.java#L1286

    Resulting in:

    [ERROR] ---------Exec.Err--------- [ERROR] go install: cannot install cross-compiled binaries when GOBIN is set

Maven-client - A command line tool to query first order and transitive maven coordinates based off an initial list of coordinates.

maven-client Description This CLI reads a list of maven group artifact version (GAV) coordinates and returns an ordered list of first order and transi

Jan 6, 2022
Cf-cli-find-app-plugin - CF CLI plugin to find applications containing a search string

Overview This cf cli plugin allows users to search for application names that co

Jan 3, 2022
Nada is a JS runtime, just like Nodejs. The difference is that Nada allows JS developers to easily achieve millions of concurrent applications.

Nada is a JS runtime, just like Nodejs. The difference is that Nada allows JS developers to easily achieve millions of concurrent applications. It also adds some new enhancements to THE JS syntax (types, interfaces, generics) that fundamentally address JS's perennial complaints.

Jul 11, 2022
Pulp allows you to write dynamic web-applications entirely in go

pulp Pulp allows you to write dynamic web-applications entirely in go, by reacting to events on the server-side. func (c index) Render(pulp.Socket) (p

Dec 5, 2022
Snowflake grafana datasource plugin allows Snowflake data to be visually represented in Grafana dashboards.
Snowflake grafana datasource plugin allows Snowflake data to be visually represented in Grafana dashboards.

Snowflake Grafana Data Source With the Snowflake plugin, you can visualize your Snowflake data in Grafana and build awesome chart. Get started with th

Dec 29, 2022
Mattermost outline plugin allows you to search your teams documents.
Mattermost outline plugin allows you to search your teams documents.

mattermost-plugin-outline Mattermost Outline plugin allows you to search your teams documents. Installation In Mattermost 5.16 and later, this plugin

Dec 7, 2022
This plugin allows you to start a local server with hot reloading with Esbuild

esbuild-dev-server This plugin allows you to start a local server with hot reloading with Esbuild Installation npm npm i esbuild-dev-server -D yarn y

Nov 4, 2022
Powered by Matterbridge, MatterAMXX is a plugin for AMXX that allows simple bridging between your game servers, Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, and more.
Powered by Matterbridge, MatterAMXX is a plugin for AMXX that allows simple bridging between your game servers, Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, and more.

Powered by Matterbridge, MatterAMXX is a plugin for AMXX that allows simple bridging between your game servers, Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, and more.

Dec 27, 2022
Boxygen is a container as code framework that allows you to build container images from code

Boxygen is a container as code framework that allows you to build container images from code, allowing integration of container image builds into other tooling such as servers or CLI tooling.

Dec 13, 2021
SigNoz helps developer monitor applications and troubleshoot problems in their deployed applications
SigNoz helps developer monitor applications and troubleshoot problems in their deployed applications

SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. ?? ??

Dec 27, 2022
vault-plugin-auth-usertotp is an auth method plugin for HashiCorp Vault

vault-plugin-auth-usertotp is an auth method plugin for HashiCorp Vault. Create user accounts, add TOTP tokens (user supplied pin + totp), and have peace of mind using 2FA.

Jul 5, 2021
Kubectl Locality Plugin - A plugin to get the locality of pods

Kubectl Locality Plugin - A plugin to get the locality of pods

Nov 18, 2021
vault-plugin-auth-usertotp is an auth method plugin for HashiCorp Vault.

vault-plugin-auth-usertotp is an auth method plugin for HashiCorp Vault. Create user accounts, add TOTP tokens (user supplied pin + totp), and have peace of mind using 2FA.

Jul 30, 2021
Create a Protocol Buffers (Protobuf) plugin, which is executed with the protoc compileCreate a Protocol Buffers (Protobuf) plugin, which is executed with the protoc compile

Interview Assignment Overview You assignment is to create a Protocol Buffers (Protobuf) plugin, which is executed with the protoc compiler. In this ex

Nov 19, 2021
The plugin serves as a starting point for writing a Mattermost plugin

Plugin Starter Template This plugin serves as a starting point for writing a Mattermost plugin. Feel free to base your own plugin off this repository.

Dec 10, 2021
Feb 10, 2022
Packer Plugin Vagrant - The Vagrant multi-component plugin can be used with HashiCorp Packer to create custom images

Packer Plugin Vagrant - The Vagrant multi-component plugin can be used with HashiCorp Packer to create custom images

Jul 13, 2022
Twitter-plugin - Falco Plugin for Twitter Stream

Twitter Plugin This repository contains the twittter plugin for Falco, which fol

Mar 17, 2022
Flamingo Framework and Core Library. Flamingo is a go based framework for pluggable web projects. It is used to build scalable and maintainable (web)applications.
Flamingo Framework and Core Library. Flamingo is a go based framework for pluggable web projects. It is used to build scalable and maintainable (web)applications.

Flamingo Framework Flamingo is a web framework based on Go. It is designed to build pluggable and maintainable web projects. It is production ready, f

Jan 5, 2023
Build event-driven and event streaming applications with ease

Commander ?? Commander is Go library for writing event-driven applications. Enabling event sourcing, RPC over messages, SAGA's, bidirectional streamin

Dec 19, 2022