Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-17212

(7.2.z) Wildfly Feature Pack needs adjustments for libartemis-native-*

    XMLWordPrintable

Details

      • Clone 4.8.x branch of the keycloak-prod repo
      • Invoke mvn clean install -P'product,!community,jboss-release' -DskipTests -s maven-settings.xml
      • Maven settings need to point to Indy

    Description

      Problem

      During the RHSSO build, we noticed a failure with the following error:

      Failed to execute goal org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.2.10.Final:build (server-provisioning) on project keycloak-server-dist: Execution server-provisioning of goal org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.2.10.Final:build failed: java.lang.RuntimeException: java.lang.RuntimeException: failed to resolve artifact org.apache.activemq:libartemis-native-32:jar:so: Could not find artifact org.apache.activemq:libartemis-native-32:jar:so in indy-mvn (http://indy.newcastle.svc.cluster.local/api/folo/track/build-25138/maven/group/build-25138)
      

      The RHSSO Feature Pack depends on EAP's (org.jboss.eap:wildfly-feature-pack). So during the build, the Wildfly Provisioning Plugin pulls it and adds RHSSO bits on top of EAP. We noticed, that the problem is located in this two lines of wildfly-feature-pack.xml:

      <copy-artifact artifact="org.apache.activemq:libartemis-native-32:::so" to-location="modules/system/layers/base/org/apache/activemq/artemis/journal/main/lib/linux-i686/libartemis-native-32.so"/>
              <copy-artifact artifact="org.apache.activemq:libartemis-native-64:::so" to-location="modules/system/layers/base/org/apache/activemq/artemis/journal/main/lib/linux-x86_64/libartemis-native-64.so"/>
      

      Solution

      I experimented with the wildfly-feature-pack.xml (by changing it in my local Maven repository) and I managed to get this working by adding:

      <artifact groupId="org.apache.activemq" artifactId="libartemis-native-64" version="1.0.0_00003-redhat-1" extension="so"/>
              <artifact groupId="org.apache.activemq" artifactId="libartemis-native-32" version="1.0.0_00003-redhat-1" extension="so"/>
      

      to the artifact-versions section as well as modifying the copy-artifact sections to (be careful and count : characters):

      <copy-artifact artifact="org.apache.activemq:libartemis-native-32:so" to-location="modules/system/layers/base/org/apache/activemq/artemis/journal/main/lib/linux-i686/libartemis-native-32.so"/>
              <copy-artifact artifact="org.apache.activemq:libartemis-native-64:so" to-location="modules/system/layers/base/org/apache/activemq/artemis/journal/main/lib/linux-x86_64/libartemis-native-64.so"/>
      

      Explanation

      The first part is pretty simple, the Server Provisioning tool needs to know the *.so files version. The second part is a bit more tricky. The Server Provisioning tool uses the following artifact syntax: groupId:artifactId[:packaging[:classifier[:version]]]. This means, that so packaging type needs to be right after artifactId. See this piece of the code.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-iweiss Ingo Weiss
              slaskawi@redhat.com Sebastian Ɓaskawiec (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: