@Test public void testMainGenerate() throws Exception { File outputDir = new File(rootDirectory + "src/test/resources/test-main-generate"); outputDir.mkdirs(); GenerateDescriptors.main( new String[]{ExampleWhitespaceTokenizer.class.getCanonicalName(), outputDir.getAbsolutePath()} ); File destDir = new File(outputDir, "gov/va/vinci/leo/ae"); File[] files = destDir.listFiles(); assertNotNull(files); assertEquals(2, files.length); String descriptorText = FileUtils.readFileToString(new File(destDir, "ExampleWhitespaceTokenizerDescriptor.xml")); assertTrue(StringUtils.isNotBlank(descriptorText)); assertTrue(descriptorText.contains("analysisEngineDescription")); }
public static void main(String[] args) { if (args.length != 2) { System.err.println("Usage: GenerateDescriptors <annotator class name> <root directory to write files to>"); System.exit(1); } String annotatorClassName = args[0]; String outputRootPath = args[1]; try { GenerateDescriptors.generate(annotatorClassName, outputRootPath); } catch (Exception e) { e.printStackTrace(); System.exit(2); } }
GenerateDescriptors { public static void main(String[] args) { if (args.length != 2) { System.err.println("Usage: GenerateDescriptors <annotator class name> <root directory to write files to>"); System.exit(1); } String annotatorClassName = args[0]; String outputRootPath = args[1]; try { GenerateDescriptors.generate(annotatorClassName, outputRootPath); } catch (Exception e) { e.printStackTrace(); System.exit(2); } } }
GenerateDescriptors { public static void main(String[] args) { if (args.length != 2) { System.err.println("Usage: GenerateDescriptors <annotator class name> <root directory to write files to>"); System.exit(1); } String annotatorClassName = args[0]; String outputRootPath = args[1]; try { GenerateDescriptors.generate(annotatorClassName, outputRootPath); } catch (Exception e) { e.printStackTrace(); System.exit(2); } }  }
GenerateDescriptors { public static void main(String[] args) { if (args.length != 2) { System.err.println("Usage: GenerateDescriptors <annotator class name> <root directory to write files to>"); System.exit(1); } String annotatorClassName = args[0]; String outputRootPath = args[1]; try { GenerateDescriptors.generate(annotatorClassName, outputRootPath); } catch (Exception e) { e.printStackTrace(); System.exit(2); } }  static void main(String[] args); static void generate(String annotatorClassName, String outputRootPath); }
GenerateDescriptors { public static void main(String[] args) { if (args.length != 2) { System.err.println("Usage: GenerateDescriptors <annotator class name> <root directory to write files to>"); System.exit(1); } String annotatorClassName = args[0]; String outputRootPath = args[1]; try { GenerateDescriptors.generate(annotatorClassName, outputRootPath); } catch (Exception e) { e.printStackTrace(); System.exit(2); } }  static void main(String[] args); static void generate(String annotatorClassName, String outputRootPath);  }