Last active
November 16, 2017 19:50
-
-
Save markrichardscs/eb252499f454c1a8b5001d100cbba726 to your computer and use it in GitHub Desktop.
Check for upgrades to transitive dependencies in Maven
This file contains 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
#!/bin/bash | |
{ echo "<project><modelVersion>4.0.0</modelVersion><groupId>com.mycompany.app</groupId><artifactId>my-app</artifactId><version>1</version><dependencies>"; mvn dependency:list -DoutputFile=/dev/stdout| tr -d ' ' | grep "^[^\[][^:]*:[^:]" | awk -F "\"*:\"*" '{print "<dependency><groupId>"$1"</groupId>","<artifactId>"$2"</artifactId>","<version>"$4"</version></dependency>"}' -; echo "</dependencies></project>";} | mvn versions:display-dependency-updates -f /dev/stdin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment