From 3a57af4bed75b57163f48b1e8a5da37c17baefb1 Mon Sep 17 00:00:00 2001 From: Kabir Khan Date: Mon, 15 Jan 2024 12:23:02 +0000 Subject: [PATCH] Ears need to use install to populate the mvn repo Otherwise mvn wildfly:start fails on resolving dependencies in the ear module --- .github/workflows/quickstart_ci.yml | 15 ++++++++++----- .../quickstart_ejb-throws-exception_ci.yml | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/quickstart_ci.yml b/.github/workflows/quickstart_ci.yml index 89df1ffc5d..5e6db1e158 100644 --- a/.github/workflows/quickstart_ci.yml +++ b/.github/workflows/quickstart_ci.yml @@ -47,6 +47,11 @@ on: required: false default: '' type: string + MVN_COMMAND: + description: 'Maven command to use when building the project. Default is ''package'', ears needs ''install''' + required: false + default: 'package' + type: string # Only run the latest job concurrency: @@ -98,7 +103,7 @@ jobs: run: | cd quickstarts cd ${{ inputs.QUICKSTART_PATH }} - mvn -fae clean install -Drelease + mvn -fae clean package -Drelease shell: bash - name: Build, run & test ${{ inputs.QUICKSTART_PATH }} Quickstart with provisioned-server profile if: ${{ inputs.TEST_PROVISIONED_SERVER }} @@ -106,7 +111,7 @@ jobs: cd quickstarts cd ${{ inputs.QUICKSTART_PATH }} echo "Building provisioned server..." - mvn -fae clean package -Pprovisioned-server + mvn -fae clean ${{ inputs.MVN_COMMAND }} -Pprovisioned-server echo "Add quickstartUser..." ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users' echo "Add quickstartAdmin..." @@ -124,7 +129,7 @@ jobs: cd quickstarts cd ${{ inputs.QUICKSTART_PATH }} echo "Building bootable jar..." - mvn -fae clean package -Pbootable-jar + mvn -fae clean ${{ inputs.MVN_COMMAND }} -Pbootable-jar echo "Starting bootable jar..." mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly-jar:start -Djar-file-name=${{ inputs.DEPLOYMENT_DIR }}/target/${{ inputs.QUICKSTART_PATH }}-bootable.jar -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }} echo "Testing bootable jar..." @@ -211,7 +216,7 @@ jobs: cd quickstarts cd ${{ inputs.QUICKSTART_PATH }} echo "Building provisioned server..." - mvn -fae clean package -Pprovisioned-server -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }} + mvn -fae clean ${{ inputs.MVN_COMMAND }} -Pprovisioned-server -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }} echo "Add quickstartUser..." ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartUser' -p 'quickstartPwd1!' -g 'guest,user,JBossAdmin,Users' echo "Add quickstartAdmin..." @@ -229,7 +234,7 @@ jobs: cd quickstarts cd ${{ inputs.QUICKSTART_PATH }} echo "Building bootable jar..." - mvn -fae clean package -Pbootable-jar -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }} + mvn -fae clean ${{ inputs.MVN_COMMAND }} -Pbootable-jar -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }} echo "Starting bootable jar..." mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly-jar:start -Djar-file-name=${{ inputs.DEPLOYMENT_DIR }}/target/${{ inputs.QUICKSTART_PATH }}-bootable.jar -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }} echo "Testing bootable jar..." diff --git a/.github/workflows/quickstart_ejb-throws-exception_ci.yml b/.github/workflows/quickstart_ejb-throws-exception_ci.yml index b7ba9a758c..90038d175a 100644 --- a/.github/workflows/quickstart_ejb-throws-exception_ci.yml +++ b/.github/workflows/quickstart_ejb-throws-exception_ci.yml @@ -14,4 +14,5 @@ jobs: QUICKSTART_PATH: ejb-throws-exception DEPLOYMENT_DIR: ear TEST_PROVISIONED_SERVER: true - TEST_OPENSHIFT: false \ No newline at end of file + TEST_OPENSHIFT: false + MVN_COMMAND: install \ No newline at end of file