Permalink
Browse files

Created mvn_classes.rb script

  • Loading branch information...
1 parent cd515cd commit 993769acf6144ee37f95dd61d6ca24da14c65da6 Andrey Paramonov committed Jun 14, 2009
Showing with 17 additions and 0 deletions.
  1. +17 −0 mvn_classes.rb
View
@@ -0,0 +1,17 @@
+#!/usr/local/bin/ruby -w
+#
+# Usage: mvn_classes.rb [log_file]
+
+declared_classes = []
+Dir.glob("#{Dir.pwd}/**/*.class").each do |file|
+ declared_classes << "#{$1}".gsub(/\//, '.') if file =~ /.*target\/classes\/(.*?)\.class$/
+end
+puts "=== Declared classes ===", declared_classes
+
+if log_file = ARGV[0] and File.exists? log_file
+ loaded_classes = []
+ File.foreach log_file do |line|
+ loaded_classes << "#{$1}" if line =~ /^\[Loaded\s(.*?)\s/
+ end
+ puts "=== Declared but not loaded classes ===", declared_classes - loaded_classes
+end

0 comments on commit 993769a

Please sign in to comment.