Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-343

Support for multi-module builds on Kogito s2i images

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Critical Critical
    • 0.6.0
    • 0.4.0
    • Image
    • Medium
    • 2019 Week 41-43 (from Okt 7)

      Today we do not support multi-modules builds in the Kogito s2i images. A classic use case is when we have a Maven project laid out like:

      parent-project
      -- module1
      -- module2
      

      If I need to deploy the service on module1 I could do:

      kogito deploy-service module1 http://git.com/parent-project --context-dir=module1
      

      The problem is that module1 depends on the parent pom to get build, thus the build will fail unless passing a MAVEN_MIRROR_URL with the parent pom deployed on it.

      We should have support for MAVEN_ARGS_APPEND and ARTIFACT_DIR environment variables like the jdk-s2i builds:
      https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html-single/red_hat_java_s2i_for_openshift/index#configuration_environment_variables

      • MAVEN_ARGS_APPEND: Additional Maven arguments
      • ARTIFACT_DIR: Path to target/ where the jar files are created for multi-module builds.

      With this we could do:

      kogito deploy-service module1 http://git.com/parent-project --build-env MAVEN_ARGS_APPEND="-pl module1 -am" ARTIFACT_DIR="module1/target"
      

      In the future, something like that:

      kogito deploy-service module1 http://git.com/parent-project --module=module1
      

      So the CLI would set those vars for the user.

      A very detailed blog post explaning this in detail could be found in:
      https://blog.openshift.com/maven-multi-module-projects-and-openshift/

              rhn-support-zanini Ricardo Zanini
              rhn-support-zanini Ricardo Zanini
              Karel Suta Karel Suta
              Karel Suta Karel Suta
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: