File tree Expand file tree Collapse file tree 1 file changed +20
-10
lines changed Expand file tree Collapse file tree 1 file changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -50,16 +50,26 @@ jobs:
5050 ${{ runner.os }}-maven-
5151 - name : Build artifact
5252 run : |
53- cd ${{ matrix.module-path }}
54- ./mvnw versions:set -DnewVersion=${{ github.event.release.tag_name }} clean
55- ./mvnw package -Dmodel-api-provider=${{ matrix.model-api }} -P${{ matrix.model-api }}
56-
57- jar_final_name=$(./mvnw help:evaluate -Dexpression=project.build.finalName -q -DforceStdout)
58- jar_artifact_id=$(./mvnw help:evaluate -Dexpression=project.artifactId -q -DforceStdout)
59- repacked_jar=$(find target/ -name "${jar_final_name}-*.jar")
60-
61- mv "$repacked_jar" target/cf-kaizen-${{ matrix.module }}-${{ matrix.model-api }}-${{ github.event.release.tag_name }}.jar
62-
53+ # Set version for all modules at once
54+ ./mvnw versions:set -DnewVersion=${{ github.event.release.tag_name }}
55+
56+ # Install all modules first (without packaging specific modules)
57+ ./mvnw clean install -DskipTests
58+
59+ # Now build the specific module with the model-api parameter (not as a profile)
60+ ./mvnw package -pl ${{ matrix.module-path }} -Dmodel-api-provider=${{ matrix.model-api }}
61+
62+ # Create the target directory if it doesn't exist
63+ mkdir -p target
64+
65+ # Find the main JAR (not the sources or javadoc ones)
66+ MAIN_JAR=$(find ${{ matrix.module-path }}/target/ -name "*.jar" ! -name "*-sources.jar" ! -name "*-javadoc.jar" ! -name "*-tests.jar")
67+
68+ echo "Found JAR: $MAIN_JAR"
69+
70+ # Copy the jar to the expected location
71+ cp "$MAIN_JAR" target/cf-kaizen-${{ matrix.module }}-${{ matrix.model-api }}-${{ github.event.release.tag_name }}.jar
72+
6373 echo "Contents of target:"
6474 ls -l target
6575 - name : Upload artifact
You can’t perform that action at this time.
0 commit comments