protected void addBuild() { Build build = model.getBuild(); if (build == null) { build = new Build(); } if (bwEdition.equals("cf")) { boolean cfplugin = false; List<Plugin> plugins = build.getPlugins(); for (Plugin plg : plugins) { if (plg.getArtifactId().equals("cf-maven-plugin")) { cfplugin = true; } } // Add only if doesn't exist if (!cfplugin) { addPCFWithSkipMavenPlugin(build); } } else if (bwEdition.equals("docker")) { boolean dockerPlugin = false; List<Plugin> plugins = build.getPlugins(); for (Plugin plg : plugins) { if (plg.getArtifactId().equals("docker-maven-plugin")) { dockerPlugin = true; } } if (!dockerPlugin) { // Add docker and platform plugins if doesn't exist addDockerWithSkipMavenPlugin(build); String platform = ""; for (BWModule module : project.getModules()) { if (module.getType() == BWModuleType.Application) { platform = module.getBwDockerModule().getPlatform(); } } if (platform.equals("K8S")) { addDockerK8SMavenPlugin(build, true); } else if (platform.equals("Mesos")) { } else if (platform.equals("Swarm")) { } } } model.setBuild(build); }
protected void addModules() { if (model.getModules().size() > 0) { return; } for (BWModule module : project.getModules()) { if (module.getType() == BWModuleType.PluginProject) { model.getModules().add(module.getToPath()); } } ModuleOrderBuilder builder = new ModuleOrderBuilder(); List<String> list = builder.getDependencyOrder(project); for (String str : list) { BWModule module = ModuleHelper.getModule(project.getModules(), str); model.getModules().add(module.getToPath()); } }