Skip to content

Commit f21259a

Browse files
committed
tmp
1 parent 547f12f commit f21259a

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

product/camel-quarkus-testing.sh

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ if [[ "$TEST_ONLY" != "true" ]]; then
333333
# Hack to fix the missing Jetty BOM (CEQ-8802)
334334
if [[ -f "poms/bom/src/main/generated/flattened-reduced-pom.xml" ]]; then
335335
log "Copying flattened-reduced-pom.xml to poms/bom/pom.xml"
336-
cp poms/bom/src/main/generated/flattened-reduced-pom.xml poms/bom/pom.xml
336+
cp poms/bom/src/main/generated/flattened-reduced-pom.xml poms/bom/pom.xml || exit $?
337337
fi
338338

339339
# Replace Camel version in the top pom.xml
@@ -344,11 +344,34 @@ cd /*[local-name()="project"]/*[local-name()="parent"]/*[local-name()="version"]
344344
set $CAMEL_VERSION
345345
save
346346
EOF
347+
if [[ $? -ne 0 ]]; then
348+
echo "Error: Failed to replace Camel parent version in pom.xml"
349+
exit 1
350+
fi
351+
347352
xmllint --shell pom.xml <<EOF
348353
cd /*[local-name()="project"]/*[local-name()="properties"]/*[local-name()="camel.version"]
349354
set $CAMEL_VERSION
350355
save
351356
EOF
357+
if [[ $? -ne 0 ]]; then
358+
echo "Error: Failed to replace Camel version property in pom.xml"
359+
exit 1
360+
fi
361+
fi
362+
363+
# Replace Quarkus version in the top pom.xml
364+
if [[ -n "$QUARKUS_VERSION" ]]; then
365+
log "Replacing Quarkus version to $QUARKUS_VERSION in pom.xml"
366+
xmllint --shell pom.xml <<EOF
367+
cd /*[local-name()="project"]/*[local-name()="properties"]/*[local-name()="quarkus.version"]
368+
set $QUARKUS_VERSION
369+
save
370+
EOF
371+
if [[ $? -ne 0 ]]; then
372+
echo "Error: Failed to replace Quarkus version property in pom.xml"
373+
exit 1
374+
fi
352375
fi
353376

354377
# Replace Quarkus version in the top pom.xml
@@ -387,6 +410,11 @@ EOF
387410
$SETTINGS_XML_ARG \
388411
$MVN_EXTRA \
389412
$module
413+
MVN_EXIT_CODE=$?
414+
if [[ $MVN_EXIT_CODE -ne 0 ]]; then
415+
echo "Error: Maven build failed for module $module with exit code $MVN_EXIT_CODE"
416+
exit $MVN_EXIT_CODE
417+
fi
390418
done
391419
fi
392420
fi

0 commit comments

Comments
 (0)