ApiDiffCmd { @SuppressWarnings("checkstyle:regexp") public static void main(final String[] args) throws DependencyResolutionException, VersionRangeResolutionException, IOException, ArtifactResolutionException, JavadocExecutionException { Options options = new Options(); CmdLineParser parser = new CmdLineParser(options); try { parser.parseArgument(args); } catch (CmdLineException e) { System.err.println("Error: " + e.getMessage() + "\nUsage:"); parser.printUsage(System.err); System.exit(64); } JDiffRunner runner = new JDiffRunner(); runner.runDiffBetweenReleases(options.groupId, options.artifactId, options.fromVersion, options.toVersion, options.destination, ImmutableSet.copyOf(options.packages)); System.exit(0); } private  ApiDiffCmd(); @SuppressWarnings("checkstyle:regexp") static void main(final String[] args);  }
@Test public void testCmdLine() throws DependencyResolutionException, VersionRangeResolutionException, IOException, ArtifactResolutionException, JavadocExecutionException { File dest = Files.createTempDir(); try { ApiDiffCmd.main(new String[]{ "-gId", "org.spf4j", "-aId", "spf4j-core", "-fromVersion", "8.3.4", "-toVersion", "8.3.5", "-o", dest.toString(), "-p", "org.spf4j.concurrent", "org.spf4j.reflect" }); } catch (ExitException ex) { Assert.assertEquals(0, ex.getExitCode()); } LOG.debug("Written diff reports to: {}", dest); Assert.assertTrue(new File(dest, "changes.html").exists()); }