#!/usr/bin/env bash # Prints, from Maven Central's maven-metadata.xml, the newest versions of every artifact this module depends on, so the # GA / pre-release status quoted in the article can be re-checked. Needs curl. Retries because Maven Central rate-limits. set -uo pipefail fetch() { local xml for i in 1 2 3 4 5 6; do xml=$(curl -sf "https://repo1.maven.org/maven2/$1/maven-metadata.xml") && { echo "$xml"; return 0; } sleep 8 done return 1 } show() { local xml xml=$(fetch "$1") || { echo "$1: could not fetch"; return 0; } echo "$1" echo "$xml" | grep -oE '[^<]+' | sed 's///' | tail -4 | sed 's/^/ /' echo " lastUpdated $(echo "$xml" | grep -oE '[0-9]+' | sed 's///')" } show org/hibernate/orm/hibernate-core show org/hibernate/orm/hibernate-processor show jakarta/data/jakarta.data-api show jakarta/persistence/jakarta.persistence-api show org/springframework/data/spring-data-jpa show org/springframework/boot/spring-boot-starter-parent echo echo "newest Final (GA) hibernate-core:" fetch org/hibernate/orm/hibernate-core | grep -oE '[0-9.]+\.Final' | sed 's///' | tail -1 | sed 's/^/ /' echo "newest GA jakarta.data-api:" fetch jakarta/data/jakarta.data-api | grep -oE '[0-9.]+<' | tr -d '<>version/' | tail -1 | sed 's/^/ /' exit 0