public static void main(String[] args) {

		if (args.length < 1) {
			throw new IllegalArgumentException("Path is Mandatory");
		}
		String folderPath = args[0];

		try (FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext("classpath:applicationContext-generator-bash.xml");) {
			logger.info("Context loaded");

			Project project;

			try {
				logger.info("start loading project");

				ProjectMetaDataService projectMetaDataService = appContext.getBean(ProjectMetaDataService.class);
				ProjectLoader projectLoader = appContext.getBean(ProjectLoader.class);

				ProjectMetaData projectMetaData = projectMetaDataService.loadProjectMetaData(folderPath);
				
				ProjectValidationReport report = projectMetaDataService.validate(projectMetaData);
				ValidationPrompter.promptOnValidation(report);
				
				project = projectLoader.loadProject(projectMetaData);

				logger.info("loading project " + project.projectName + " completed");

			} catch (Exception e) {
				logger.error("failed", e);
				return;
			}

			try {
				logger.info("start executing code writing");

				CodeGenerator codeGenerator = appContext.getBean(CodeGenerator.class);
				codeGenerator.generateCode(project);

				logger.info("executing code writing completed");

			} catch (Exception e) {
				logger.error("failed", e);
				return;
			}
		}
	}
public static void main(String[] args) {

		if (args.length < 1) {
			throw new IllegalArgumentException("Path is Mandatory");
		}
		String folderPath = args[0];

		try (FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext("classpath:applicationContext-generator-bash.xml");) {
			logger.info("Context loaded");

			Project project;

			try {
				logger.info("start loading project");

				ProjectMetaDataService projectMetaDataService = appContext.getBean(ProjectMetaDataService.class);
				ProjectLoader projectLoader = appContext.getBean(ProjectLoader.class);

				ProjectMetaData projectMetaData = projectMetaDataService.loadProjectMetaData(folderPath);
				
				ProjectValidationReport report = projectMetaDataService.validate(projectMetaData);
				ValidationPrompter.promptOnValidation(report);
				
				project = projectLoader.loadProject(projectMetaData);

				logger.info("loading project " + project.projectName + " completed");

			} catch (Exception e) {
				logger.error("failed", e);
				return;
			}

			try {
				logger.info("start executing code writing");

				CodeGenerator codeGenerator = appContext.getBean(CodeGenerator.class);
				codeGenerator.generateCode(project);

				logger.info("executing code writing completed");

			} catch (Exception e) {
				logger.error("failed", e);
				return;
			}
		}
	}
public static void main ( String [ ] args ) { if ( args . length < 1 ) { throw new IllegalArgumentException ( "Path is Mandatory" ) ; } String folderPath = args [ 0 ] ; try ( FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext ( "classpath:applicationContext-generator-bash.xml" ) ; ) { logger . info ( "Context loaded" ) ; Project project ; try { logger . info ( "start loading project" ) ; ProjectMetaDataService projectMetaDataService = appContext . getBean ( ProjectMetaDataService . class ) ; ProjectLoader projectLoader = appContext . getBean ( ProjectLoader . class ) ; ProjectMetaData projectMetaData = projectMetaDataService . loadProjectMetaData ( folderPath ) ; ProjectValidationReport report = projectMetaDataService . validate ( projectMetaData ) ; ValidationPrompter . promptOnValidation ( report ) ; project = projectLoader . loadProject ( projectMetaData ) ; logger . info ( "loading project " + project . projectName + " completed" ) ; } catch ( Exception e ) { logger . error ( "failed" , e ) ; return ; } try { logger . info ( "start executing code writing" ) ; CodeGenerator codeGenerator = appContext . getBean ( CodeGenerator . class ) ; codeGenerator . generateCode ( project ) ; logger . info ( "executing code writing completed" ) ; } catch ( Exception e ) { logger . error ( "failed" , e ) ; return ; } } }
main method to be executed

@param args
0->the workspace folder where the "data-model" folder will be
detected
main method to be executed