Last active
September 10, 2023 17:36
-
-
Save Ranjith-Suranga/b879b0a762b0d8ae0d614e48ad4a6021 to your computer and use it in GitHub Desktop.
Download the Latest Spring Framework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# D M R Suranga <[email protected]> (https://ijse.lk) | |
# Download the file | |
# Open the terminal and set the execute permission to the file (chmod 766 download-latest-spring-framework.sh) | |
# Execute the file (./download-latest-spring-framework.sh) | |
#! /usr/bin/bash | |
wget -O maven-metadata.xml https://repo1.maven.org/maven2/org/springframework/spring-framework-bom/maven-metadata.xml | |
VERSION=$(cat maven-metadata.xml | grep "latest" | awk -F'[<>]' '/<latest>/{print $3}') | |
rm maven-metadata.xml | |
mkdir spring-framework-$VERSION | |
wget -O spring-framework-$VERSION/spring-framework-bom-$VERSION.pom https://repo1.maven.org/maven2/org/springframework/spring-framework-bom/$VERSION/spring-framework-bom-$VERSION.pom | |
DEPS=$(grep -oP '<artifactId>\K[^<]+' spring-framework-$VERSION/spring-framework-bom-$VERSION.pom | tail -n +2) | |
for DEP in $DEPS; do | |
wget -P spring-framework-$VERSION https://repo1.maven.org/maven2/org/springframework/$DEP/$VERSION/$DEP-$VERSION.jar | |
echo $DEP '- Downloaded' | |
done | |
# zip spring-framework-$VERSION.zip spring-framework-$VERSION | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment