+
+ private File createFile(String outputPath, String name) {
+ File outputFile;
+ String file = name + ".yaml";
+ outputFile = new File(outputPath, file);
+ outputFile.getParentFile().mkdirs();
+ try {
+ boolean isCreated = outputFile.createNewFile();
+ if (isCreated) {
+ logger.debug("The file " + file + " was successfully created.");
+ } else {
+ logger.debug("The file " + file + " already existed.");
+ }
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ return outputFile;
+ }
+
+ private String readAppVersion() {
+ String appVersion = "";
+ try {
+ MavenXpp3Reader reader = new MavenXpp3Reader();
+ Model model = reader.read(new FileReader("pom.xml"));
+ appVersion = "#bpgen_application_version: " + model.getVersion() + '\n';
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return appVersion;
+ }