Skip to content

Instantly share code, notes, and snippets.

@artemptushkin
Last active August 17, 2023 12:01
Show Gist options
  • Save artemptushkin/281c3d87429aa6fbbd4ca632d3aaa976 to your computer and use it in GitHub Desktop.
Save artemptushkin/281c3d87429aa6fbbd4ca632d3aaa976 to your computer and use it in GitHub Desktop.
Spring Boot Dependencies troubleshooting cheatsheet
#!/usr/bin/env bash
read version
url="https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/$version/spring-boot-dependencies-$version.pom"
properties_lines=$(curl -s "$url" | sed -n '/<properties>/,/<\/properties>/p' | sed -e 's/<properties>//;s/<\/properties>//')
echo "$properties_lines"

Here I'm tired of opening all the tabs and searching for these links to find the exact version and the keys to them

  • Latest Spring Boot dependencies
    • docs
    • actual pom - call the script latest-spring-boot-version.sh below
  • Versions override properties names
  • Easy way to search a maven dependency at https://search.maven.org/ e.g. org.springframework.boot:spring-boot-*-web
  • I want to list all the latest spring boot dependencies versions in the terminal
# once before
chmod +x latest-spring-boot-version.sh
chmod +x current-spring-dependencies.sh
# then
./latest-spring-boot-version.sh | ./second-script.sh
#!/usr/bin/env bash
version=$(curl -s https://api.github.com/repos/spring-projects/spring-boot/releases/latest | jq -r '.tag_name' | sed 's/^v//')
echo "$version"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment