Tuesday, July 4, 2017

One dirty oneliner to check maven integrity

to check if maven artifacts have valid sha1 checksums (not broken)

user@host:~/.m2$ for i in `find ./ -name *.jar` ; do sha1sum $i | awk '{print $1}' > $i.sha1.2 ; awk '{print $1}' $i.sha1 > $i.sha1.1 ; diff -u -w $i.sha1.1 $i.sha1.2 ; rm $i.sha1.2 ; rm $i.sha1.1 ;  done