private void installApplicationConfiguration(String moduleName) { // Add Spring Boot dependences final Element configuration = XmlUtils.getConfiguration(getClass()); final List<Dependency> requiredDependencies = new ArrayList<Dependency>(); final List<Element> dependencies = XmlUtils.findElements("/configuration/dependencies/dependency", configuration); for (final Element dependencyElement : dependencies) { requiredDependencies.add(new Dependency(dependencyElement)); } getProjectOperations().addDependencies(moduleName, requiredDependencies); // Add Plugins List<Element> plugins = XmlUtils.findElements("/configuration/plugins/plugin", configuration); for (Element element : plugins) { Plugin plugin = new Plugin(element); getProjectOperations().addBuildPlugin(moduleName, plugin); } }
/** * Add maven-jar-plugin to provided module. * * @param moduleName the name of the module. */ private void addMavenJarPlugin(String moduleName) { // Add plugin maven-jar-plugin Pom module = projectOperations.getPomFromModuleName(moduleName); // Stop if the plugin is already installed for (final Plugin plugin : module.getBuildPlugins()) { if (plugin.getArtifactId().equals(MAVEN_JAR_PLUGIN)) { return; } } final Element configuration = XmlUtils.getConfiguration(getClass()); final Element plugin = XmlUtils.findFirstElement("/configuration/plugin", configuration); // Now install the plugin itself if (plugin != null) { projectOperations.addBuildPlugin(moduleName, new Plugin(plugin), false); } }
"plugin[artifactId = '" + plugin.getArtifactId() + "' and version = '" + plugin.getVersion() + "']", pluginsElement)) { final Plugin candidatePlugin = new Plugin(candidate); if (candidatePlugin.getGroupId().equals(plugin.getGroupId())) {
final Plugin existingPlugin = new Plugin(existingPluginElement);
/** * Add needed dependencies and plugins to run created integration tests. * * @param module {@link String} the module name where add dependencies. */ private void addIntegrationTestDependencies(String moduleName) { // Add dependencies if needed projectOperations.addDependency(moduleName, JUNIT_DEPENDENCY); projectOperations.addDependency(moduleName, ASSERTJ_CORE_DEPENDENCY); projectOperations.addDependency(moduleName, SPRING_TEST_DEPENDENCY); projectOperations.addDependency(moduleName, SPRING_BOOT_TEST_DEPENDENCY); // Add plugin maven-failsafe-plugin Pom module = projectOperations.getPomFromModuleName(moduleName); // Stop if the plugin is already installed for (final Plugin plugin : module.getBuildPlugins()) { if (plugin.getArtifactId().equals("maven-failsafe-plugin")) { return; } } final Element configuration = XmlUtils.getConfiguration(getClass()); final Element plugin = XmlUtils.findFirstElement("/configuration/plugin", configuration); // Now install the plugin itself if (plugin != null) { projectOperations.addBuildPlugin(moduleName, new Plugin(plugin)); } }
cxfPlugin = new Plugin(pluginElement); getProjectOperations().addBuildPlugin(wsdlModuleName, cxfPlugin); break;
Plugin plugin = new Plugin(pluginElement); if (plugin.getArtifactId().equals("querydsl-maven-plugin")) { queryDslPlugin = plugin;
/** * Install plugins defined in external XML file * * @param configuration */ @SuppressWarnings("unused") private void updatePlugins(Element configuration) { List<Element> jasperReportsPlugins = XmlUtils.findElements( "/configuration/gvnix/jasperReports/plugins/plugin", configuration); for (Element pluginElement : jasperReportsPlugins) { projectOperations.addBuildPlugin(projectOperations .getFocusedModuleName(), new Plugin(pluginElement)); } }
/** * Add maven-jar-plugin to provided module. * * @param moduleName the name of the module. */ private void addMavenJarPlugin(String moduleName) { // Add plugin maven-jar-plugin Pom module = projectOperations.getPomFromModuleName(moduleName); // Stop if the plugin is already installed for (final Plugin plugin : module.getBuildPlugins()) { if (plugin.getArtifactId().equals(MAVEN_JAR_PLUGIN)) { return; } } final Element configuration = XmlUtils.getConfiguration(getClass()); final Element plugin = XmlUtils.findFirstElement("/configuration/plugin", configuration); // Now install the plugin itself if (plugin != null) { projectOperations.addBuildPlugin(moduleName, new Plugin(plugin), false); } }
private void installMavenPlugin() { // Stop if the plugin is already installed for (final Plugin plugin : projectOperations.getFocusedModule() .getBuildPlugins()) { if (plugin.getArtifactId().equals("selenium-maven-plugin")) { return; } } final Element configuration = XmlUtils.getConfiguration(getClass()); final Element plugin = XmlUtils.findFirstElement( "/configuration/selenium/plugin", configuration); // Now install the plugin itself if (plugin != null) { projectOperations.addBuildPlugin( projectOperations.getFocusedModuleName(), new Plugin(plugin)); } }
new Plugin(plugin)); getFileManager().commit();
private void installMavenPlugins(String moduleName) { final Element configuration = XmlUtils.getConfiguration(getClass()); // Add properties List<Element> properties = XmlUtils.findElements( "/configuration/properties/*", configuration); for (Element property : properties) { projectOperations.addProperty(moduleName, new Property(property)); } // Add Plugins List<Element> elements = XmlUtils.findElements( "/configuration/plugins/plugin", configuration); for (Element element : elements) { Plugin plugin = new Plugin(element); projectOperations.addBuildPlugin( moduleName, plugin); } }
new Plugin(pluginTemplate)); getFileManager().commit();
/** * Installs Java2ws plugin into the pom.xml from a template. */ protected void addPlugin() { // Get the plugin from the template and write into de project (pom.xml) getProjectOperations().updateBuildPlugin( getProjectOperations().getFocusedModuleName(), new Plugin(XmlUtils.findFirstElement("/jaxws-plugin/plugin", XmlUtils.getRootElement(this.getClass(), "dependencies-export-jaxws-plugin.xml")))); // What is this for ? getFileManager().commit(); }
/** * Install wsdl2java maven plugin in pom.xml */ public void installWsdl2javaPlugin() { // Add plugin and write this modifications to disk getProjectOperations().updateBuildPlugin( getProjectOperations().getFocusedModuleName(), new Plugin(XmlUtils.findFirstElement( "/cxf-codegen/cxf-codegen-plugin/plugin", XmlUtils.getRootElement(this.getClass(), "dependencies-export-wsdl2java-plugin.xml")))); getFileManager().commit(); }
getProjectOperations().addBuildPlugin(module.getModuleName(), new Plugin(plugin));
XmlUtils.findElements("/configuration/plugins/plugin", configuration); for (final Element pluginElement : unitTestPlugins) { getProjectOperations().updateBuildPlugin(projectType.getModule(), new Plugin(pluginElement));
Plugin plugin = new Plugin(pluginElement); if (plugin.getArtifactId().equals("querydsl-maven-plugin")) { queryDslPlugin = plugin;