final PluginExecution validate = new PluginExecution(); validate.setId("talend-validate"); validate.addGoal("validate"); validate.setPhase("process-classes"); executions.add(validate); final PluginExecution dependencies = new PluginExecution(); dependencies.setId("talend-dependencies"); dependencies.addGoal("dependencies"); dependencies.setPhase("process-classes"); executions.add(dependencies); final PluginExecution documentation = new PluginExecution(); documentation.setId("talend-asciidoc"); documentation.addGoal("asciidoc"); documentation.setPhase("process-classes"); executions.add(documentation);
private void install() throws XmlPullParserException, IOException { MavenCoreFacet mvn = project.getFacet(MavenCoreFacet.class); Model pom = mvn.getPOM(); org.apache.maven.model.Plugin plugin = new org.apache.maven.model.Plugin(); plugin.setArtifactId(dep.getArtifactId()); plugin.setGroupId(dep.getGroupId()); plugin.setVersion(dep.getVersion()); Xpp3Dom dom = Xpp3DomBuilder.build(new ByteArrayInputStream("<configuration></configuration>".getBytes()), "UTF-8"); List<PluginExecution> executions = plugin.getExecutions(); PluginExecution execution = new PluginExecution(); execution.setPhase("package"); execution.addGoal("shade"); execution.setConfiguration(dom); executions.add(execution); pom.getBuild().getPlugins().add(plugin); mvn.setPOM(pom); }
execution.addGoal("configure"); execution.setConfiguration(dom); executions.add(execution);
PluginExecution execution = new PluginExecution(); execution.setId("package-war"); execution.addGoal("war"); execution.setConfiguration(generateCustomWarGoalConfiguration(manifestEntries)); mavenHPIPlugin.addExecution(execution);
PluginExecution execution = new PluginExecution(); execution.setId("package-war"); execution.addGoal("custom-war"); execution.setConfiguration(generateCustomWarGoalConfiguration()); mavenHPIPlugin.addExecution(execution);
plugin.setConfiguration(configuration); PluginExecution execution = new PluginExecution(); execution.addGoal("java"); plugin.addExecution(execution);