@Test public void testExecutionUsingMainMethod() throws Exception { assumeTrue(isRunExecutionTest()); protoypeExecutionTest(() -> { Path pom = testData.getProjectPom(); String[] args; if (hasPropertiesFile()) { Path propertiesFile = testData.getPropertiesFile(); args = new String[]{ pom.toAbsolutePath().toString(), propertiesFile.toAbsolutePath().toString() }; } else { args = new String[]{ pom.toAbsolutePath().toString() }; } AntennaCLIFrontend.main(args); }, tf -> null); }
public static void main(String[] args) { AntennaCLIOptions options = AntennaCLIOptions.parse(args); if (options.isShowHelp()) { printUsage(); System.exit(1); } if (options.isDebugLog()) { enableDebugLogging(); } try { Path pomFilePath = Paths.get(options.getConfigFilePath()).toAbsolutePath(); if (!pomFilePath.toFile().exists()) { throw new IllegalArgumentException("Cannot find " + pomFilePath.toString()); } AntennaCLIFrontend frontend; if (options.getPropertiesFilePath() != null) { Path propertiesFilePath = Paths.get(options.getPropertiesFilePath()).toAbsolutePath(); if (!propertiesFilePath.toFile().exists()) { throw new IllegalArgumentException("Cannot find " + propertiesFilePath.toString()); } frontend = new AntennaCLIFrontend(pomFilePath.toFile(), propertiesFilePath.toFile()); } else { frontend = new AntennaCLIFrontend(pomFilePath.toFile()); } frontend.execute(); } catch (Exception e) { e.printStackTrace(); System.out.println("Error: " + e.getMessage()); System.exit(1); } }
AntennaCLIFrontend extends AbstractAntennaCLIFrontend { public static void main(String[] args) { AntennaCLIOptions options = AntennaCLIOptions.parse(args); if (options.isShowHelp()) { printUsage(); System.exit(1); } if (options.isDebugLog()) { enableDebugLogging(); } try { Path pomFilePath = Paths.get(options.getConfigFilePath()).toAbsolutePath(); if (!pomFilePath.toFile().exists()) { throw new IllegalArgumentException("Cannot find " + pomFilePath.toString()); } AntennaCLIFrontend frontend; if (options.getPropertiesFilePath() != null) { Path propertiesFilePath = Paths.get(options.getPropertiesFilePath()).toAbsolutePath(); if (!propertiesFilePath.toFile().exists()) { throw new IllegalArgumentException("Cannot find " + propertiesFilePath.toString()); } frontend = new AntennaCLIFrontend(pomFilePath.toFile(), propertiesFilePath.toFile()); } else { frontend = new AntennaCLIFrontend(pomFilePath.toFile()); } frontend.execute(); } catch (Exception e) { e.printStackTrace(); System.out.println("Error: " + e.getMessage()); System.exit(1); } } }
AntennaCLIFrontend extends AbstractAntennaCLIFrontend { public static void main(String[] args) { AntennaCLIOptions options = AntennaCLIOptions.parse(args); if (options.isShowHelp()) { printUsage(); System.exit(1); } if (options.isDebugLog()) { enableDebugLogging(); } try { Path pomFilePath = Paths.get(options.getConfigFilePath()).toAbsolutePath(); if (!pomFilePath.toFile().exists()) { throw new IllegalArgumentException("Cannot find " + pomFilePath.toString()); } AntennaCLIFrontend frontend; if (options.getPropertiesFilePath() != null) { Path propertiesFilePath = Paths.get(options.getPropertiesFilePath()).toAbsolutePath(); if (!propertiesFilePath.toFile().exists()) { throw new IllegalArgumentException("Cannot find " + propertiesFilePath.toString()); } frontend = new AntennaCLIFrontend(pomFilePath.toFile(), propertiesFilePath.toFile()); } else { frontend = new AntennaCLIFrontend(pomFilePath.toFile()); } frontend.execute(); } catch (Exception e) { e.printStackTrace(); System.out.println("Error: " + e.getMessage()); System.exit(1); } } AntennaCLIFrontend(File file);  AntennaCLIFrontend(File pomFile, File propertiesFile); }
AntennaCLIFrontend extends AbstractAntennaCLIFrontend { public static void main(String[] args) { AntennaCLIOptions options = AntennaCLIOptions.parse(args); if (options.isShowHelp()) { printUsage(); System.exit(1); } if (options.isDebugLog()) { enableDebugLogging(); } try { Path pomFilePath = Paths.get(options.getConfigFilePath()).toAbsolutePath(); if (!pomFilePath.toFile().exists()) { throw new IllegalArgumentException("Cannot find " + pomFilePath.toString()); } AntennaCLIFrontend frontend; if (options.getPropertiesFilePath() != null) { Path propertiesFilePath = Paths.get(options.getPropertiesFilePath()).toAbsolutePath(); if (!propertiesFilePath.toFile().exists()) { throw new IllegalArgumentException("Cannot find " + propertiesFilePath.toString()); } frontend = new AntennaCLIFrontend(pomFilePath.toFile(), propertiesFilePath.toFile()); } else { frontend = new AntennaCLIFrontend(pomFilePath.toFile()); } frontend.execute(); } catch (Exception e) { e.printStackTrace(); System.out.println("Error: " + e.getMessage()); System.exit(1); } } AntennaCLIFrontend(File file);  AntennaCLIFrontend(File pomFile, File propertiesFile); static void main(String[] args); }
AntennaCLIFrontend extends AbstractAntennaCLIFrontend { public static void main(String[] args) { AntennaCLIOptions options = AntennaCLIOptions.parse(args); if (options.isShowHelp()) { printUsage(); System.exit(1); } if (options.isDebugLog()) { enableDebugLogging(); } try { Path pomFilePath = Paths.get(options.getConfigFilePath()).toAbsolutePath(); if (!pomFilePath.toFile().exists()) { throw new IllegalArgumentException("Cannot find " + pomFilePath.toString()); } AntennaCLIFrontend frontend; if (options.getPropertiesFilePath() != null) { Path propertiesFilePath = Paths.get(options.getPropertiesFilePath()).toAbsolutePath(); if (!propertiesFilePath.toFile().exists()) { throw new IllegalArgumentException("Cannot find " + propertiesFilePath.toString()); } frontend = new AntennaCLIFrontend(pomFilePath.toFile(), propertiesFilePath.toFile()); } else { frontend = new AntennaCLIFrontend(pomFilePath.toFile()); } frontend.execute(); } catch (Exception e) { e.printStackTrace(); System.out.println("Error: " + e.getMessage()); System.exit(1); } } AntennaCLIFrontend(File file);  AntennaCLIFrontend(File pomFile, File propertiesFile); static void main(String[] args);  }