private void printUsage ( final Options options , final String errorMessage ) { if ( errorMessage != null ) { System . out . println ( "Error: " + errorMessage ) ; } final HelpFormatter formatter = new HelpFormatter ( ) ; formatter . printHelp ( Main . class . getCanonicalName ( ) + " <task> [options]" , options ) ; System . out . println ( "Tasks are: " + gatherTaskNames ( taskFactory ) ) ; System . out . println ( "Example: " + Main . class . getCanonicalName ( ) + " scan -f java:classpath::target/classes java:classpath::target/test-classes" ) ; }
Print usage information .