public static void main(String[] args) throws IOException {
if (args[0].contains("OVERWRITE_THIS_VALUE")) {
return;
}
SnakeCaseTranslatingStrategy strategy = new SnakeCaseTranslatingStrategy();
TableResolver tableResolver = new TableResolver();
// Set<Class<?>> inputClasses = new Scanner().scanPackage("com.digitolio.jdbi.codegen.test");
Set<Class<?>> inputClasses = scanPackage(args[0]);
List<Class<?>> classes = orderClasses(inputClasses);
cleanDirectoryForNewDll(new File(args[1].concat("/db/h2/")));
// File targetDir = new File("D:\\PersonalProjects\\digitolio\\jdbi-codegen\\src\\main\\java\\cemo");
File targetDir = new File(args[1]);
StringBuilder allDdl = new StringBuilder();
for (Class<?> aClass : classes) {
Table resolve = tableResolver.resolve(aClass, strategy);
H2Generator h2Generator = new H2Generator(resolve, aClass, targetDir);
Object generate = h2Generator.generate();
String content = generate.toString();
allDdl.append(content).append("\n\n");
File file = new File(args[1].concat("/db/h2/").concat(resolve.getTableName().toLowerCase().concat(".ddl")));