Maven Tricks

see all the libs that end up on the classpath of your maven project:

mvn dependency:build-classpath | sed 's/:/\n/g' > cp.txt

Jar search:
find . -name \*jar -print -exec jar -tvf {} \; | nawk '/YOURSEARCHSTRING/ || /jar/ {print} '

or use jarscan tool

bash script:
java -jar $JARSCAN_HOME/jarscan.jar $1 $2

alias added to .bashrc:
alias jarscan='~/dev/apps/jarscan/'

and your good to go. Now you can run a recursive search of jars in any directory with a command like:
jarscan MBean


Post a Comment

Popular posts from this blog

Android: How to change size of vector drawable image

AngularJs: User friendly date display with AngularJs and MomentJs

Nerd Tree: A File Explorer with Mac Vim