@Test public void testDisplayHelp() { AnalyzeCommand.main(new String[] {"-h"}); }
public static void main(String[] args) { final CommandLineParser parser = new DefaultParser(); final CommandLine line; try { line = parser.parse(OPTIONS, args); } catch (Exception e) { reportError(e); System.exit(ExitStatus.CLI_INIT_FAILED); return; } if (line.hasOption(Params.HELP_LONG)) { System.out.println(toHelpString(OPTIONS)); return; } if (line.hasOption(Params.VERSION_LONG)) { System.out.println(findImplementationVersion().orElse("")); return; } final JarvizConfig jarvizConfig; final ApplicationSet applicationSet; final CouplingFilterConfig filterConfig; final String reportFile; try { final File configFile = loadFileFromArgument(line, Params.CONFIG_LONG, false); final File artifactsFile = loadFileFromArgument(line, Params.ARTIFACTS_LONG, true); final File filterFile = loadFileFromArgument(line, Params.FILTER_LONG, true); final String output = loadStringFromArgument(line, Params.OUTPUT_LONG); jarvizConfig = configFile != null ? fromJsonString(readFileAsString(configFile), JarvizConfig.class) : null; applicationSet = fromJsonString(readFileAsString(artifactsFile), ApplicationSet.class); filterConfig = fromJsonString(readFileAsString(filterFile), CouplingFilterConfig.class); reportFile = (output == null || output.isEmpty()) ? DEFAULT_OUTPUT : output; } catch (Exception e) { reportError(e); System.exit(ExitStatus.CLI_INIT_FAILED); return; } try { final CouplingAnalyser analyser = new CouplingAnalyser(); analyser.start(jarvizConfig, applicationSet, filterConfig, reportFile); } catch (Exception e) { reportError(e); System.exit(ExitStatus.ANALYSER_FAILED); } }
AnalyzeCommand { public static void main(String[] args) { final CommandLineParser parser = new DefaultParser(); final CommandLine line; try { line = parser.parse(OPTIONS, args); } catch (Exception e) { reportError(e); System.exit(ExitStatus.CLI_INIT_FAILED); return; } if (line.hasOption(Params.HELP_LONG)) { System.out.println(toHelpString(OPTIONS)); return; } if (line.hasOption(Params.VERSION_LONG)) { System.out.println(findImplementationVersion().orElse("")); return; } final JarvizConfig jarvizConfig; final ApplicationSet applicationSet; final CouplingFilterConfig filterConfig; final String reportFile; try { final File configFile = loadFileFromArgument(line, Params.CONFIG_LONG, false); final File artifactsFile = loadFileFromArgument(line, Params.ARTIFACTS_LONG, true); final File filterFile = loadFileFromArgument(line, Params.FILTER_LONG, true); final String output = loadStringFromArgument(line, Params.OUTPUT_LONG); jarvizConfig = configFile != null ? fromJsonString(readFileAsString(configFile), JarvizConfig.class) : null; applicationSet = fromJsonString(readFileAsString(artifactsFile), ApplicationSet.class); filterConfig = fromJsonString(readFileAsString(filterFile), CouplingFilterConfig.class); reportFile = (output == null || output.isEmpty()) ? DEFAULT_OUTPUT : output; } catch (Exception e) { reportError(e); System.exit(ExitStatus.CLI_INIT_FAILED); return; } try { final CouplingAnalyser analyser = new CouplingAnalyser(); analyser.start(jarvizConfig, applicationSet, filterConfig, reportFile); } catch (Exception e) { reportError(e); System.exit(ExitStatus.ANALYSER_FAILED); } } }
AnalyzeCommand { public static void main(String[] args) { final CommandLineParser parser = new DefaultParser(); final CommandLine line; try { line = parser.parse(OPTIONS, args); } catch (Exception e) { reportError(e); System.exit(ExitStatus.CLI_INIT_FAILED); return; } if (line.hasOption(Params.HELP_LONG)) { System.out.println(toHelpString(OPTIONS)); return; } if (line.hasOption(Params.VERSION_LONG)) { System.out.println(findImplementationVersion().orElse("")); return; } final JarvizConfig jarvizConfig; final ApplicationSet applicationSet; final CouplingFilterConfig filterConfig; final String reportFile; try { final File configFile = loadFileFromArgument(line, Params.CONFIG_LONG, false); final File artifactsFile = loadFileFromArgument(line, Params.ARTIFACTS_LONG, true); final File filterFile = loadFileFromArgument(line, Params.FILTER_LONG, true); final String output = loadStringFromArgument(line, Params.OUTPUT_LONG); jarvizConfig = configFile != null ? fromJsonString(readFileAsString(configFile), JarvizConfig.class) : null; applicationSet = fromJsonString(readFileAsString(artifactsFile), ApplicationSet.class); filterConfig = fromJsonString(readFileAsString(filterFile), CouplingFilterConfig.class); reportFile = (output == null || output.isEmpty()) ? DEFAULT_OUTPUT : output; } catch (Exception e) { reportError(e); System.exit(ExitStatus.CLI_INIT_FAILED); return; } try { final CouplingAnalyser analyser = new CouplingAnalyser(); analyser.start(jarvizConfig, applicationSet, filterConfig, reportFile); } catch (Exception e) { reportError(e); System.exit(ExitStatus.ANALYSER_FAILED); } }  }
AnalyzeCommand { public static void main(String[] args) { final CommandLineParser parser = new DefaultParser(); final CommandLine line; try { line = parser.parse(OPTIONS, args); } catch (Exception e) { reportError(e); System.exit(ExitStatus.CLI_INIT_FAILED); return; } if (line.hasOption(Params.HELP_LONG)) { System.out.println(toHelpString(OPTIONS)); return; } if (line.hasOption(Params.VERSION_LONG)) { System.out.println(findImplementationVersion().orElse("")); return; } final JarvizConfig jarvizConfig; final ApplicationSet applicationSet; final CouplingFilterConfig filterConfig; final String reportFile; try { final File configFile = loadFileFromArgument(line, Params.CONFIG_LONG, false); final File artifactsFile = loadFileFromArgument(line, Params.ARTIFACTS_LONG, true); final File filterFile = loadFileFromArgument(line, Params.FILTER_LONG, true); final String output = loadStringFromArgument(line, Params.OUTPUT_LONG); jarvizConfig = configFile != null ? fromJsonString(readFileAsString(configFile), JarvizConfig.class) : null; applicationSet = fromJsonString(readFileAsString(artifactsFile), ApplicationSet.class); filterConfig = fromJsonString(readFileAsString(filterFile), CouplingFilterConfig.class); reportFile = (output == null || output.isEmpty()) ? DEFAULT_OUTPUT : output; } catch (Exception e) { reportError(e); System.exit(ExitStatus.CLI_INIT_FAILED); return; } try { final CouplingAnalyser analyser = new CouplingAnalyser(); analyser.start(jarvizConfig, applicationSet, filterConfig, reportFile); } catch (Exception e) { reportError(e); System.exit(ExitStatus.ANALYSER_FAILED); } }  static void main(String[] args); }
AnalyzeCommand { public static void main(String[] args) { final CommandLineParser parser = new DefaultParser(); final CommandLine line; try { line = parser.parse(OPTIONS, args); } catch (Exception e) { reportError(e); System.exit(ExitStatus.CLI_INIT_FAILED); return; } if (line.hasOption(Params.HELP_LONG)) { System.out.println(toHelpString(OPTIONS)); return; } if (line.hasOption(Params.VERSION_LONG)) { System.out.println(findImplementationVersion().orElse("")); return; } final JarvizConfig jarvizConfig; final ApplicationSet applicationSet; final CouplingFilterConfig filterConfig; final String reportFile; try { final File configFile = loadFileFromArgument(line, Params.CONFIG_LONG, false); final File artifactsFile = loadFileFromArgument(line, Params.ARTIFACTS_LONG, true); final File filterFile = loadFileFromArgument(line, Params.FILTER_LONG, true); final String output = loadStringFromArgument(line, Params.OUTPUT_LONG); jarvizConfig = configFile != null ? fromJsonString(readFileAsString(configFile), JarvizConfig.class) : null; applicationSet = fromJsonString(readFileAsString(artifactsFile), ApplicationSet.class); filterConfig = fromJsonString(readFileAsString(filterFile), CouplingFilterConfig.class); reportFile = (output == null || output.isEmpty()) ? DEFAULT_OUTPUT : output; } catch (Exception e) { reportError(e); System.exit(ExitStatus.CLI_INIT_FAILED); return; } try { final CouplingAnalyser analyser = new CouplingAnalyser(); analyser.start(jarvizConfig, applicationSet, filterConfig, reportFile); } catch (Exception e) { reportError(e); System.exit(ExitStatus.ANALYSER_FAILED); } }  static void main(String[] args);  }