Clover Coverage Report - Exec Maven Plugin 1.1
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
../../../../img/srcFileCovDistChart0.png 0% of files have more coverage
10   42   5   5
4   31   0.5   2
2     2.5  
1    
 
  FindClassInClasspath       Line # 9 10 0% 5 16 0% 0.0
 
No Tests
 
1    package org.codehaus.mojo.exec;
2   
3    import java.util.Timer;
4    import java.util.TimerTask;
5   
6    /**
7    * @author <a href="mailto:jerome@coffeebreaks.org">Jerome Lacoste</a>
8    */
 
9    public class FindClassInClasspath
10    {
11    public static final String FOUND_ALL = "OK";
12   
13    /**
14    * @param args the names of classes to search in the classpath
15    * prints 'OK' if all classes found
16    **/
 
17  0 toggle public static void main( String[] args )
18    {
19  0 for (int i = 0; i < args.length; i++)
20    {
21  0 if ( ! isClassInClasspath( args[i] ))
22    {
23  0 System.out.println( "ERROR: class + " + args[i] + " not found in classpath" );
24  0 System.exit( 1 );
25    }
26    }
27  0 System.out.println( FOUND_ALL );
28    }
29   
 
30  0 toggle private static boolean isClassInClasspath( String className )
31    {
32  0 try
33    {
34  0 Class.forName( className );
35  0 return true;
36    } catch ( Exception e )
37    {
38  0 System.out.println( "ERROR: " + e.getMessage() );
39  0 return false;
40    }
41    }
42    }