Revisions

gist: 49513 Download_button fork
public
Description:
Look for JARs that contain a given artifact name (Class, Resource, etc.)
Public Clone URL: git://gist.github.com/49513.git
Embed All Files: show embed
findjars.sh #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
 
#Example Usage: findjars com/ambientideas/groovy
 
CLASSNAMETOFIND="$1"
 
for eachjar in `find . -iname "*.jar"`
do
echo "Searching in $eachjar ..."
  jar tvf $eachjar | grep $CLASSNAMETOFIND > /dev/null
  if [ $? == 0 ]
  then
echo "******* Located \"$CLASSNAMETOFIND\" in $eachjar *******"
  fi
done