Created
March 19, 2018 20:06
-
-
Save serban-petrescu/7d80a36b8e450ee6716f6e05e58596e2 to your computer and use it in GitHub Desktop.
Bash shell which builds a .csv file with all maven dependencies from a folder structure
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
for D in ` find . -maxdepth 2 -type f -name 'pom.xml' | sed -r 's|/[^/]+$||' | sort -u` | |
do | |
(cd $D && mvn -o dependency:tree | | |
grep -E ":.*:.*:(compile|test)" | | |
sed "s,\[INFO\] \(.\)[ |\\+-]*\([^:]*\):\([^:]*\):[^:]*:[^:]*:\([^:]*\),\1;\2;\3;\4,g" | | |
sed "s,[ |];,transitive;,g" | | |
sed "s,[+\\];,direct;,g") | |
done | sort -u | (echo "type;group;artefact;scope" && cat) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment