Skip to content

Commit ecda469

Browse files
authored
Merge pull request #322 from FromDoppler/doi-2542-fix-workflow-for-maven
[DOI-2542] Move packages to maven dir
2 parents 976afdd + 8e96f23 commit ecda469

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/continuous-delivery-maven-java17.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,20 @@ jobs:
143143
shopt -s nullglob
144144
for file in "${target_dir}"/*.zip; do
145145
echo "Descomprimiendo ${file}"
146-
unzip -o "${file}" -d .
146+
unzip_dir="${target_dir}/unzipped/$(basename "${file}" .zip)"
147+
mkdir -p "${unzip_dir}"
148+
unzip -o "${file}" -d "${unzip_dir}"
149+
150+
mapfile -t maven_dirs < <(find "${unzip_dir}" -type d \( -name ".maven" -o -name ".m2" \))
151+
if (( ${#maven_dirs[@]} == 0 )); then
152+
echo "No se encontró carpeta .maven/.m2 dentro de ${file};" >&2
153+
else
154+
for mdir in "${maven_dirs[@]}"; do
155+
echo "Sincronizando repo Maven desde ${mdir} hacia ${MAVEN_USER_HOME}"
156+
mkdir -p "${MAVEN_USER_HOME}"
157+
cp -R "${mdir}/." "${MAVEN_USER_HOME}/"
158+
done
159+
fi
147160
done
148161
for file in "${target_dir}"/*.jar; do
149162
echo "Copiando ${file} a ${MAVEN_USER_HOME}"

0 commit comments

Comments
 (0)