raydac / mvn-golang

maven plugin to automate GoSDK load and build of projects
Apache License 2.0
163 stars 31 forks source link

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

Closed sarveshtamba closed 4 years ago

sarveshtamba commented 4 years ago

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.

raydac commented 4 years ago

it looks like that plugin is wrong in its platform detection, it uses go1.9.2.linux-amd64 instead of go1.9.2.linux-ppc64le, as a workaround it is possible to define architecture directly through <arch>ppc64le</arch> in configuration of the plugin

sarveshtamba commented 4 years ago

Could the below piece of code be the problem in file mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/AbstractGolangMojo.java?

@Nonnull
  private static String investigateArch() {
    final String arch = System.getProperty("os.arch").toLowerCase(Locale.ENGLISH);
    if (arch.contains("arm")) {
      return "arm";
    }
    if (arch.equals("386") || arch.equals("i386") || arch.equals("x86")) {
      return "386";
    }
    return "amd64";
  }
raydac commented 4 years ago

yes, problem in this piece of code, could you provide your os.arch value?

sarveshtamba commented 4 years ago
[root@p006n04 mvn-golang]# arch
ppc64le
raydac commented 4 years ago

I mean java property, it can be a bit different, you can get java property list through java -XshowSettings:properties -version

sarveshtamba commented 4 years ago

os.arch = ppc64le

raydac commented 4 years ago

ok, I will improve detector to support such arch

raydac commented 4 years ago

you can try snapshot version (you can just clone plugin and build it through mvn clean install)

sarveshtamba commented 4 years ago

Thanks @raydac for the prompt response. You would need to rebuild the 'mvn-golang-wrapper' and upload the latest one at 'https://mvnrepository.com/artifact/com.igormaznitsa/mvn-golang-wrapper', is that correct ?

raydac commented 4 years ago

I public into maven central only release versions, I will make some extra testing and improvements and will make release in several days

sarveshtamba commented 4 years ago

@raydac sure, thanks! Appreciate your timely support.

sarveshtamba commented 4 years ago

I public into maven central only release versions, I will make some extra testing and improvements and will make release in several days

@raydac please do let us know here as and when you publish the release version of the plugin in maven central. Thanks in advance!

raydac commented 4 years ago

@sarveshtamba new 2.3.4 version is published in maven central, you can try