public boolean isInstalledInModule(final String moduleName) { if (projectOperations == null) { projectOperations = getProjectOperations(); } Validate.notNull(projectOperations, "ProjectOperations is required"); final Pom pom = projectOperations.getPomFromModuleName(moduleName); if (pom == null) { return false; } for (final Plugin buildPlugin : pom.getBuildPlugins()) { if ("com.force.sdk".equals(buildPlugin.getArtifactId())) { return true; } } return false; }
public boolean isInstalledInModule(final String moduleName) { if (projectOperations == null) { projectOperations = getProjectOperations(); } Validate.notNull(projectOperations, "ProjectOperations is required"); final Pom pom = projectOperations.getPomFromModuleName(moduleName); if (pom == null) { return false; } for (final Plugin buildPlugin : pom.getBuildPlugins()) { if ("appengine-maven-plugin".equals(buildPlugin.getArtifactId())) { return true; } } return false; }
public void updateBuildPlugin(final String moduleName, final Plugin plugin) { final Pom pom = getPomFromModuleName(moduleName); Validate.notNull(pom, "The pom is not available, so plugins cannot be modified at this time"); Validate.notNull(plugin, "Plugin required"); for (final Plugin existingPlugin : pom.getBuildPlugins()) { if (existingPlugin.equals(plugin)) { // Already exists, so just quit return; } } // Delete any existing plugin with a different version removeBuildPlugin(moduleName, plugin); // Add the plugin 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); } }
/** * 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)); } }
public boolean isInstalledInModule(final String moduleName) { if (projectOperations == null) { projectOperations = getProjectOperations(); } Validate.notNull(projectOperations, "ProjectOperations is required"); final Pom pom = projectOperations.getPomFromModuleName(moduleName); if (pom == null) { return false; } for (final Plugin buildPlugin : pom.getBuildPlugins()) { if ("appengine-maven-plugin".equals(buildPlugin.getArtifactId())) { return true; } } return false; }
public boolean isInstalledInModule(final String moduleName) { if (projectOperations == null) { projectOperations = getProjectOperations(); } Validate.notNull(projectOperations, "ProjectOperations is required"); final Pom pom = projectOperations.getPomFromModuleName(moduleName); if (pom == null) { return false; } for (final Plugin buildPlugin : pom.getBuildPlugins()) { if ("com.force.sdk".equals(buildPlugin.getArtifactId())) { return true; } } return false; }
/** * 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)); } }
for (final Plugin plugin : module.getBuildPlugins()) { if (plugin.getArtifactId().equals("maven-failsafe-plugin")) { return;