Posted By

zxeem on 03/18/10


Tagged

class groovy jar


Versions (?)

Search Jars For Class


 / Published in: Groovy
 

  1.  
  2.  
  3. def cDir = new File(".");
  4. def jarContents;
  5. cDir.eachFileRecurse{file ->
  6. if (file.name =~ /.*.jar$/)
  7. {
  8. jarContents = "jar tvf ${file}".execute().text;
  9. jarContents.eachLine{line ->
  10. if (line.contains(args[0])){
  11. print "*** found in ${file.canonicalPath}:";
  12. println line;
  13. }
  14. }
  15. }
  16. }

Report this snippet  

You need to login to post a comment.